diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index c1b34e87..a7b8ba91 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -9,8 +9,6 @@ # terms of the BSD-3 license. We welcome feedback and contributions, see file # CONTRIBUTING.md for details. -# GLVis - an OpenGL visualization server based on the MFEM library - name: builds on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21ad65d4..94fe8edb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,8 +9,6 @@ # terms of the BSD-3 license. We welcome feedback and contributions, see file # CONTRIBUTING.md for details. -# GLVis - an OpenGL visualization server based on the MFEM library - name: release on: diff --git a/CHANGELOG b/CHANGELOG index 67f4af1c..f343c8e2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,48 +9,51 @@ https://glvis.org -Version 4.4.1 (development) +Version 4.5 released on Feb X, 2026 =================================== Unlike previous GLVis releases, this version requires a C++17 compiler. +- Added visualization of the finite element DOF numbering in 2D scalar mode, + with the 'n'/'N' keys that now cycles through: None → Elements → Edges → + Vertices → DOFs. In parallel, the default numbering is the "local" one for + each rank. This can be switched to the "global" parallel numbering with + 'Alt+n' (the former numbering method). + +- Added visualization of complex data for grid functions from MFEM's class + (Par)ComplexGridFunction. The complex values are represented by their + magnitude, phase, real part or imaginary part, which can be cycled with the + 'Q' key. Additionally, complex functions can be animated by an added harmonic + phase. The phase frequency can be increased/decreased with keys ';'/':'. + +- Added the option to choose palettes by name using the command line argument + -pname or --palette-name. This option is also available in scripts and streams + using the keyword "palette_name". + +- Color palettes defined in an external file can now also be specified in + scripts and streams using the keyword 'palette_file'. + - Added headless (no GUI) visualization, relying on the EGL (Linux) or CGL - (MacOS) interface. It is available through '-hl' command-line option or - 'headless' script command (before the visualization commands). The end of the - loaded stream or script file ends the visualization in this mode. Note GLVis - must be compiled with with EGL/CGL (see INSTALL). - -- Added non-persistent mode of the server, when the server terminates after all - visualization windows are closed. - -- Added visualization of complex function data originating from - '(Par)ComplexGridFunction' class in MFEM. The complex values are represented - by their magnitude, phase, real part or imaginary part, which can be switched - by 'Q' key. Additionally, the complex function can be animated by an added - harmonic phase. To increase or decrease the phase frequency, use ';' or ':', - respectively. - -- Implemented DOF numbering in 2D scalar mode, pressing the `n` or `N` key cycles - through: None → Elements → Edges → Vertices → DOFs. Parallel numbering is now by - default 'local' to each rank; 'global' vs. 'local' numbering can be toggled with - 'Alt+n'. - -- Refactored code base enabling automatic generation of the script and stream - command lists (shown as help when an unrecognized option is entered). Other - improvements include: - * Unified window initialization between the app and GLVis-js. + (macOS) interface. It is available through '-hl' command-line option or the + 'headless' script command (before the visualization commands). In this mode, + visualization ends at the end of the stream or script file. Note that GLVis + must be compiled with EGL/CGL (see INSTALL). + +- Refactored the code base to enable automatic generation of the script and + stream command lists. Other improvements include: + * Unified window initialization between the app and glvis-js. * Unified handling of streams and improved data storage, enabling animation of all data types. * Fixed the flag for real attributes of distributed meshes. * Fixed setting of padding digits for data collections. * Fixed cycling of the vector-to-scalar function in 2D with raw data. -- Added the option to choose palettes by name using the command line argument - '-pname' or '--palette-name'. This option is also available in scripts and - streams using the keyword 'palette_name'. +- Added non-persistent mode for the GLVis server, where the server terminates + after all visualization windows are closed. + +- Added single-color palettes with a linear gradient of opacity to + share/palettes-variable-opacity.txt. -- Color palettes defined in an external file can now also be specified in - scripts and streams using the keyword 'palette_file'. - Generalized and unified processing of stream commands for glvis-js to support all commands. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 623a34a9..a40ae44b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,10 +3,9 @@

-Release +Release Build License -Doxygen License License

@@ -89,8 +88,10 @@ The GLVis source code has the following structure: ``` . ├── lib - │ └── gl - │ └── shaders + │ ├── egl + │ ├── gl + │ │ └── shaders + │ └── sdl ├── share └── tests ``` @@ -202,8 +203,8 @@ Before you can start, you need a GitHub account, here are a few suggestions: change the code by default. - Code specifics - - All significant new classes, methods and functions have Doxygen-style - documentation in source comments. + - All significant new classes, methods and functions have (preferably + Doxygen-style) documentation in source comments. - Consistent code styling is enforced with `make style` in the top-level directory. This requires [Artistic Style](http://astyle.sourceforge.net) version 3.1 and MFEM's style configuration file, typically located in @@ -265,10 +266,9 @@ Before a PR can be merged, it should satisfy the following: - [ ] Check if `make distclean; git status` shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository. - [ ] Add new patterns (just for the new files above) and re-run the above test. - [ ] New capability: - - [ ] All significant new classes, methods and functions have Doxygen-style documentation in source comments. + - [ ] All significant new classes, methods and functions have (preferably Doxygen-style) documentation in source comments. - [ ] Consider saving cool simulation pictures with the new capability in the Confluence gallery (LLNL only) or submitting them, via pull request, to the gallery section of the `glvis/web` repo. - [ ] If this is a major new feature, consider mentioning it in the short summary inside `README` *(rare)*. - - [ ] List major new classes in `doc/CodeDocumentation.dox` *(rare)*. - [ ] Update this checklist, if the new pull request affects it. @@ -310,7 +310,6 @@ Before a PR can be merged, it should satisfy the following: ``` - [ ] Create the release tarball and push to `glvis/releases`. - [ ] Recreate the `next` branch as described in previous section. -- [ ] Update and push documentation to `glvis/doxygen`. - [ ] Update URL shortlinks: - [ ] Create a shortlink at [http://bit.ly/](http://bit.ly/) for the release tarball, e.g. https://glvis.github.io/releases/glvis-3.1.tgz. - [ ] (LLNL only) Add and commit the new shortlink in the `links` and `links-glvis` files of the internal `glvis/downloads` repo. diff --git a/INSTALL b/INSTALL index 10b6198c..e9db6c8b 100644 --- a/INSTALL +++ b/INSTALL @@ -11,7 +11,7 @@ GLVis is a multiplatform OpenGL application and can be built on Linux/Unix systems, including Mac OS X, and under Windows. -Besides a C++ compiler, GLVis depends on the following external packages: +Besides a C++17 compiler, GLVis depends on the following external packages: - the MFEM library (use the latest release) plus any libraries that MFEM was built to depend on diff --git a/README.md b/README.md index ec95b1ea..2a78818e 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,9 @@ https://glvis.org -Release +Release Build License -Doxygen License License diff --git a/glvis.cpp b/glvis.cpp index 8aef2955..c68418b2 100644 --- a/glvis.cpp +++ b/glvis.cpp @@ -9,7 +9,6 @@ // terms of the BSD-3 license. We welcome feedback and contributions, see file // CONTRIBUTING.md for details. - // GLVis - an OpenGL visualization server based on the MFEM library #include diff --git a/lib/aux_js.cpp b/lib/aux_js.cpp index 8bdabfd6..54c67190 100644 --- a/lib/aux_js.cpp +++ b/lib/aux_js.cpp @@ -70,13 +70,11 @@ void display(StreamCollection streams, const int w, const int h) SendExposeEvent(); } -// // StreamReader::ReadStream requires a list of unique_ptr to istream and since // we cannot directly pass a list of string we need to repack the strings into // a new list. // -// each string in streams must start with `parallel ' -// +// Each string in streams must start with `parallel ' using StringArray = std::vector; StreamCollection processParallelStreams(DataState & state, const StringArray & streams) @@ -122,9 +120,8 @@ void displayStream(const std::string & stream, const int w, const int h) display(std::move(sc), w, h); } -// // update the existing stream -// + int update(DataState & new_state) { double mesh_range = -1.0; @@ -175,9 +172,8 @@ int updateParallelStreams(const StringArray & streams) return update(new_state); } -// // other methods -// + void iterVisualization() { win.wnd->mainIter(); diff --git a/lib/egl/egl.hpp b/lib/egl/egl.hpp index 21097ad0..2c58ff1b 100644 --- a/lib/egl/egl.hpp +++ b/lib/egl/egl.hpp @@ -21,7 +21,7 @@ #endif #ifdef GLVIS_USE_CGL -#define GL_SILENCE_DEPRECATION // CGL has been deprecated since MacOS 10.14 +#define GL_SILENCE_DEPRECATION // CGL has been deprecated since macOS 10.14 #include #endif diff --git a/lib/egl/egl_main.cpp b/lib/egl/egl_main.cpp index 46d767df..1e5cb6fb 100644 --- a/lib/egl/egl_main.cpp +++ b/lib/egl/egl_main.cpp @@ -421,7 +421,7 @@ EglMainThread::Handle EglMainThread::CreateWindow(EglWindow *caller, int w, return out_hnd; } -#endif //GLVIS_USE_EGL +#endif // GLVIS_USE_EGL #ifdef GLVIS_USE_CGL if (!out_hnd.isInitialized()) { return out_hnd; } CGLError err = CGLSetCurrentContext(out_hnd.ctx.get()); diff --git a/lib/glwindow.hpp b/lib/glwindow.hpp index cd6c90e7..eb387ccd 100644 --- a/lib/glwindow.hpp +++ b/lib/glwindow.hpp @@ -147,7 +147,7 @@ class GLWindow /// Set window position virtual void setWindowPos(int x, int y) { } - /// Returns true if the window has been succesfully initialized + /// Returns true if the window has been successfully initialized virtual bool isWindowInitialized() const { return false; } /// Returns true if the OpenGL context was successfully initialized diff --git a/lib/sdl/sdl_main.hpp b/lib/sdl/sdl_main.hpp index 8a4ce5ce..4aee25fa 100644 --- a/lib/sdl/sdl_main.hpp +++ b/lib/sdl/sdl_main.hpp @@ -121,7 +121,6 @@ class SdlMainThread : public MainThread bool terminating {false}; std::unique_ptr bg_wnd{nullptr, SDL_DestroyWindow}; - // ------------------------------------------------------------------------- // Objects for handling passing of window control commands to the main event // loop. @@ -130,7 +129,6 @@ class SdlMainThread : public MainThread int num_windows {-1}; // -1: waiting for window to be created - // ------------------------------------------------------------------------- // Objects for handling dispatching events from the main event loop to // worker threads. diff --git a/lib/stream_reader.cpp b/lib/stream_reader.cpp index 93862c90..c88766b1 100644 --- a/lib/stream_reader.cpp +++ b/lib/stream_reader.cpp @@ -110,7 +110,7 @@ bool StreamReader::CheckStreamIsComplex(std::istream &solin, solin >> ws; // Returning of the characters to stream(buffer) does not work reliably, // so compare only the initial character, which fortunately does not - // conincide with the header of FiniteElementSpace. + // coincide with the header of FiniteElementSpace. return (solin.peek() == header[0]); } diff --git a/lib/threads.cpp b/lib/threads.cpp index f0575d85..d6c4690d 100644 --- a/lib/threads.cpp +++ b/lib/threads.cpp @@ -1076,7 +1076,7 @@ bool communication_thread::execute_one(std::string ident) { break; } - *is[np] >> ident >> ws; // "parallel" + *is[np] >> ident >> ws; // 'parallel' if (ident != "parallel") { cout << "Expected keyword \"parallel\", got \"" << ident diff --git a/lib/vssolution.cpp b/lib/vssolution.cpp index 2c848987..7d25f38f 100644 --- a/lib/vssolution.cpp +++ b/lib/vssolution.cpp @@ -2009,8 +2009,8 @@ void VisualizationSceneSolution::PrepareVertexNumbering() } else { - // Draw the vertices for each element. This is redundant, - // except when the elements or domains are shrunk. + // Draw the vertices for each element. This is redundant, except when the + // elements or domains are shrunk. for (int e = 0; e < mesh->GetNE(); e++) { if (!el_attr_to_show[mesh->GetAttribute(e) - 1]) { continue; } diff --git a/share/Info.cmake.plist.in b/share/Info.cmake.plist.in index 54d0ff0d..c4ab03bb 100644 --- a/share/Info.cmake.plist.in +++ b/share/Info.cmake.plist.in @@ -11,7 +11,7 @@ CFBundleIconFile GLVis.icns CFBundleShortVersionString - 4.4 + 4.5 CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/share/Info.plist b/share/Info.plist index 609ed69b..e360a65a 100644 --- a/share/Info.plist +++ b/share/Info.plist @@ -11,7 +11,7 @@ CFBundleIconFile GLVis.icns CFBundleShortVersionString - 4.4 + 4.5 CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType diff --git a/tests/data b/tests/data index f1d01ff0..2930875a 160000 --- a/tests/data +++ b/tests/data @@ -1 +1 @@ -Subproject commit f1d01ff03a5e1d2149e15adef506a803100b45ec +Subproject commit 2930875afd504d9f6b4835de65abfd43c0338f0f diff --git a/vcpkg.json b/vcpkg.json index 52846354..f689236a 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", "name": "glvis", - "version": "4.4", + "version": "4.5", "dependencies": [ "fontconfig", "freetype",