GLVis
v4.2
Accurate and flexible finite element visualization
|
GLVis visualization tool _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/_/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/ _/_/_/_/ _/ _/ _/_/_/ https://glvis.org
GLVis is an OpenGL tool for visualization of finite element meshes and functions. It is a multiplatform application that can be built on Linux/Unix systems, including macOS, and under Windows. It can also be used in a Jupyter notebook, or in a web browser, see https://glvis.org/live.
We welcome contributions and feedback from the community. Please see the file CONTRIBUTING.md for additional details about our development process.
When started without any options, glvis starts a server which waits for a socket connections (on port 19916
by default) and visualizes any received data. This way the results of simulations on a remote (parallel) machine can be visualized on the local user desktop.
GLVis can also be used to visualize a mesh with or without a finite element function (solution), as in
``` glvis -m cube.mesh3d ```
For parallel computations, GLVis supports input from several parallel socket connections as well as the visualization of parallel meshes and grid functions saved in separate files from the command line as in
``` glvis -np 4 -m mesh -g solution ```
When given parallel input, GLVis will stitch the results to show the global mesh and solution. GLVis can also run a batch sequence of commands (GLVis scripts), or display previously saved socket streams.
For a complete list of command line options, type
``` glvis -h ```
Depending on the data type, variety of manipulations can be performed by using the mouse and by typing (case sensitive) keystrokes in the GLVis window. Below is a partial list of the available functionality. Some of these keys can also be provided as input, using the -k
command-line option and the keys
script command.
SPDX-License-Identifier: BSD-3-Clause
LLNL Release Number: LLNL-CODE-443271
DOI: 10.11578/dc.20171025.1249
Left
– Rotate the viewpointRight
– Zoom in (up) / Zoom out (down)Middle
– Translate the viewpointLeft
+ Shift
– Start spinning the viewpoint (according to the dragging vector)Left
+ Alt
– TiltLeft
+ Ctrl
– Spherical rotationLeft
+ Ctrl
+ Shift
– z
-spinningRight
+ Ctrl
– Object scaling (see also [
and ]
)Right
+ Shift
– Change light source position (see \
)Middle
+ Ctrl
– Object translation (moves the camera left/right/up/down)Middle
+ Ctrl
+ Alt
– Moves the camera forward/backward (vertical mouse motion) and tilts the camera left/right (horizontal mouse motion)Middle
+ Ctrl
+ Shift
– Object translation (turns the camera left/right/up/down)h
– Print a short help message in the terminalr
– Reset the plot to 3D viewR
– Cycle through the six 2D projections (camera looking above/below in x
/y
/z
directions)j
– Turn on/off perspectives
– Turn on/off unit cube scalingA
– Turn on/off the use of anti-aliasing/multi-samplingL
– Turn on/off logarithmic scalec
– Toggle the colorbar and caption display stateC
– Change the main plot captionp
/ P
– Cycle forward/backwards through color palettes (lots of options, use F6
for a menu)t
– Cycle materials and lights (5 states)i
– Toggle cutting plane (different options in 2D and 3D, see below)o
/ O
– Control element subdivisions (different options in 2D and 3D, see below)l
– Turn on/off the lightg
– Toggle background color (white/black)a
– Toggle the bounding box axes. The options are:x
, y
, z
axes + dashed axesm
– Toggle the mesh state. The options are:F5
to modify the level lines)e
– Toggle the elements state (see below for vector functions). The options are:det(J)
1/det(J)
\kappa
\kappa + 1/\kappa
S
– Take an image snapshot or record a movie (in spinning mode). By default, the screenshots are taken in png
format, using libpng. When GLVis is compiled with libtiff
support (see [INSTALL](INSTALL)) then the screenshots are taken internally and saved in TIFF format (.tif
extension). If both of these options are disabled during the build process, GLVis will use SDL
to take screenshots in bmp
format, which it will then convert to png
if ImageMagick's convert
tool is available.G
– 3D scene export to glTF formatCtrl
+ p
– Print to a PDF file using gl2ps
. Other vector formats (SVG, EPS) are also possible, but keep in mind that the printing takes a while and the generated files are big.q
– Exitf
– Change the shading type (the way the elements and mesh are drawn). The options are:o
/ O
to control subdivisions)\
– Set light source position (see Right
+ Shift
)*
/ /
– Zoom in/out+
/ -
– Stretch/compree in z
-direction[
/ ]
– Shrink/enlarge the bounding box (relative to the colorbar)(
/ )
– Shrink/enlarge the visualization window.
– Start/stop z
-spinning (speed/direction can be controlled with 0
/ Enter
)←
, →
, ↑
, ↓
– Manual rotation1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
– Manual rotation along coordinate axesCtrl
+ ←
, →
, ↑
, ↓
– Translate the viewpointCtrl
+ o
– Toggle an element ordering curven
/ N
– Cycle through numberings. The options are:`
– Toggle a ruler, with initial origin at the center of the bounding box. The origin can be later moved with ~
. The options are:~
- Enter new ruler origink
/ K
- Adjust the transparency level. The balance of transparency can be further adjusted with ,
and <
.!
- Toggle the use of (1D) texture (smooth interpolation of colors). The options are:F5
– Change the range and number of the level linesF6
– Palette menu (negative repeat number flips the palette)F7
– Change the minimum and maximum valuesShift
+ F7
– Set the bounding box from the terminali
– Toggle cutting (clipping) plane in 2Dy
/ Y
– Rotate cutting plane (\theta
) in 2Dz
/ Z
– Translate cutting plane in 2Do
/ O
– Control element subdivisions in 2Ds1
) and boundary (s2
).O
cycles through the following "subdivision functions", (prints a message in the terminal when changed):s1 += s2
s1 -= s2
s2++
s2--
o
– performs the curently selected functionb
– Toggle the boundary in 2D scalar mode. The options are:Shift
+ F9
/ F10
to cycle through the boundary attributes.F3
/ F4
– Shrink/Zoom each element towards its center, in order to better visualize the different element shapesF8
– List of material subdomains to showF9
/ F10
– Walk through material subdomainsF11
/ F12
– Shrink/Zoom material subdomains (to the centers of the attributes)i
– Toggle cutting (clipping) plane in 3D. The options are:I
– Toggle the cutting plane algorithm used when the option cut through the elements is selected. The two algorithms are:x
/ X
– Rotate cutting plane (\phi
) in 3Dy
/ Y
– Rotate cutting plane (\theta
) in 3Dz
/ Z
– Translate cutting plane in 3DE
– Display/Hide the elements in the cutting planeM
– Display/Hide the mesh in the cutting planeo
/ O
– Refine/de-refine elements in 3Du
/ U
– Move level surface value up/downv
/ V
– Add/Delete a level surface valuew
/ W
– Move boundary elements up/down in direction of the normal (i.e. "plot" the boundary values in normal direction)F3
/ F4
– Shrink/Zoom boundary elements (to the centers of the attributes)F8
– List of boundary subdomains to showF9
/ F10
– Walk through boundary subdomainsF11
/ F12
– Shrink/Zoom material subdomains (to the centers of the attributes)v
– Toggle the vector state (uses vector subdivision factor, accept u
/ U
). The options are:u
/ U
)V
– Change the scaling of the vectors relative to the defaultd
– Toggle the displaced mesh state: (see also keys n
/ b
). The options are:n
– Increase the displacement amount in 10% steps, wraps around from 100% to 0%b
– Decrease the displacement amount in 10% steps, wraps around from 0% to 100%B
– Toggle the boundary in 2D vector modee
– Toggle the elements state (vector data version). The options are:det(J)/det(J_d)
det(J_d)/det(J)
u
/ U
– Change the vector-to-scalar function and the vector subdivision factorU
– Toggle the functionality of u
(prints a message in the terminal when changed). The options are:\sqrt{v_x^2+v_y^2}
-\pi
to \pi
: atan2(v_y,v_x)
x
-component: v_x
y
-component: v_y
div(v)
curl(v)
[skipped for H(div) elements]grad(v)
[skipped for H(div) elements]v
– Toggle the vector state. The options are:F
)u
/ U
and w
/ W
)V
– Cycle the vector state in the opposite direction of v
u
/ U
– Move the level field vectors (in the appropriate vector state)w
/ W
– Add/Delete level field vector (in the appropriate vector state)d
– Toggle the displaced mesh state (see also keys n
/ b
). The options are:n
– Increase the displacement amount in 10% steps, wraps around from 100% to 0%b
– Decrease the displacement amount in 10% steps, wraps around from 0% to 100%F
– Change the vector-to-scalar function. The options are:\sqrt{v_x^2+v_y^2+v_z^2}
x
-component: v_x
y
-component: v_y
z
-component: v_z