qiangf / glvis Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/glvis
License: GNU Lesser General Public License v2.1
Automatically exported from code.google.com/p/glvis
License: GNU Lesser General Public License v2.1
GLVis visualization tool version 3.0 _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/_/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/ _/_/_/_/ _/ _/ _/_/_/ http://glvis.googlecode.com GLVis is an OpenGL tool for visualization of finite element meshes and functions. For building instructions, see the file INSTALL. Copyright information and licensing restrictions can be found in the file COPYRIGHT. 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'. In both cases, it 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. Here 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. Mouse functions =============== Left - Rotate the viewpoint Middle - Translate the viewpoint Right - Zoom in (up) / Zoom out (down) Left+Shift - Start spinning the viewpoint (according to dragging vector) Basic key commands ================== h - Prints a short help message in the terminal r - Reset the plot to 3D view R - Cycle through the six 2D projections (camera looking in +/- x/y/z direction) j - Turn on/off perspective s - Turn on/off unit cube scaling c - Display/Hide the colorbar p - Cycle through color palettes (lots of options, use F6 for a menu) t - Cycle materials and lights (5 states) l - Turns on/off the light g - Toggle background color (white -> black) a - Toggle the bounding box axes The options are: -> none -> bounding box with coordinates of the corners -> bounding box without coordinates -> red, green, blue colored main x, y, z axes; dashed box m - Toggle the "mesh" state The options are: -> no mesh or level lines -> draw the element edges (i.e. the mesh) -> draw the level lines (use F5 to modify the level lines) e - Toggle the "elements" state (see below for vector functions) The options are: -> show surface elements (corresponding to the function) -> show no surface elements -> show surface elements corresponding to det(J) -> show surface elements corresponding to 1/det(J) S - Take an image snapshot or record a movie (in spinning mode). By default, the screenshots are taken using the (external) command 'xwd' generating files with .xwd extension. When GLVis is compiled with libtiff support (see INSTALL) then the screenshots are taken internally and saved in TIFF format (.tif extension). In both cases, the generated image files can be easily converted to a more suitable format using e.g. ImageMagick's 'convert' tool or the GIMP. P - Print to a PostScript file (in non-texture mode) q - Exit Advanced key commands ===================== f - Change the shading type (the way the elements and mesh are drawn) The options are: -> one triangle / quad per element with a constant normal -> one triangle / quad per element with normals averaged at the vertices -> multiple triangles / quads per element, also allowing for the visualization of discontinuous functions and curvilinear elements (use i/I to control subdivisions) i/I - Control element subdivisions there are two subdivision factors: -> element subdivision factor s1 -> boundary subdivision factor s2 I - Cycle through the "subdivision functions", (prints a message in the terminal when changed) The options are: -> Increase subdivision factor: s1 += s2 -> Decrease subdivision factor: s1 -= s2 -> Increase bdr subdivision factor: s2++ -> Decrease bdr subdivision factor: s2-- i - perform the current "subdivision function" A - Turn on/off the use of anti-aliasing/multi-sampling b - Display/Hide the boundary in 2D scalar mode L - Turn on/off logarithmic scale \ - Set light source position (see Right+Shift) * - Zoom in / - Zoom out + - Stretch in z-direction - - Compress in z-direction [ - Enlarge the bounding box (relative to the colorbar) ] - Shrink the bounding box (relative to the colorbar) ( - Shrink the visualization window ) - Enlarge the visualization window . - Start/stop z-spinning (speed/direction can be controlled with '0'/'Enter') w - Toggle clipping (cutting) plane in 2D (see also 'i' in 3D) y/Y - Rotate clipping plane (theta) in 2D z/Z - Translate clipping plane in 2D ` - Toggle a ruler, with initial origin at the center of the bounding box. The origin can be later moved with '~'. The options are: -> none -> coordinate axes lines -> coordinate axes planes ~ - Enter new ruler origin k/K - Adjust the transparency level (works only when texture is off, see '!'). The balance of transparency can be further adjusted with ',' and '<'. ! - Toggle the use of (1D) texture (smooth interpolation of colors) The options are: -> use discrete texture, the number of colors used depends on the current palette -> use smooth texture (interpolated from current palette) -> do not use texture; colors are set at the vertices; color interpolation may be bad Ctrl+arrow keys - Translate the viewpoint F3/F4 - Shrink/Zoom each element towards its center, to better visualize the different element shapes F5 - Change the range and number of the level lines F6 - Palette menu (negative repeat number flips the pallete) F7 - Change the minimum and maximum values F8 - List of material subdomains to show F9/F10 - Walk through material subdomains F11/F12 - Shrink/Zoom material subdomains (to the centers of the attributes) Advanced mouse functions ======================== Middle+Ctrl - Object translation (moves the camera left/right/up/down) Middle+Ctrl+Shift - Object translation (turns 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) Right+Ctrl - Object scaling (see also '[' and ']') Left+Alt - Tilt Right+Shift - Change light source position (see '\') Vector data commands ==================== v - Toggle the "vector" state (uses vector subdivision factor, accept u/U) The options are: -> do not show vectors -> show vectors as displacement -> show vector field; vectors are uniformly scaled; the color varies with the magnitude (or the current "vector-to-scalar function", see keys u/U) -> show vector field as above, but the vectors are scaled proportionally to their magnitude V - Change the scaling of the vectors relative to the default d - Toggle the "displaced mesh" state: (see also keys 'n'/'b') The options are: -> do not show displaced mesh -> show displaced mesh -> assuming displacement field show deformation using Cartesian lines -> assuming displacement field show deformation using polar lines 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 - Display/Hide the boundary in 2D vector mode e - Toggle the "elements" state (vector data version) The options are: -> show surface elements corresponding to the current "vector-to-scalar function" -> do not show surface elements -> assuming a displacement field show det(J)/det(J_d) -> assuming a displacement field show det(J_d)/det(J) u/U - Change the "vector-to-scalar function" and the vector subdivision factor U - Toggle the functionality of 'u' (prints a message in the terminal when changed). The options are: -> Increase the vector subdivision factor -> Decrease the vector subdivision factor -> Cycle through "vector-to-scalar functions" choices: -> magnitude: sqrt(vx^2+vy^2) -> direction from -pi to pi: atan2(vy,vx) -> x-component: vx -> y-component: vy -> divergence: div(v) -> curl: curl(v) [skipped for H(div) elements] -> anisotropy in grad(v) [skipped for H(div) elements] 3D data commands ================ i - Toggle clipping (cutting) plane The options are: -> none -> cut through the elements -> show only elements behind the clipping plane x/X - Rotate clipping plane (phi) y/Y - Rotate clipping plane (theta) z/Z - Translate clipping plane E - Display/Hide the elements in the clipping plane M - Display/Hide the mesh in the clipping plane o/O - Refine/de-refine elements (similar to 'i' in 2D) u/U - Move level surface value up/down v/V - Add/Delete a level surface value w/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 show F9/F10 - Walk through boundary subdomains F11/F12 - Shrink/Zoom material subdomains (to the centers of the attributes) 3D vector data commands ======================= v - Toggle the "vector" state The options are: -> do not show vectors -> show vectors as displacement -> show vector field; vectors are uniformly scaled; the color varies with the magnitude (or the current "vector-to-scalar function", see key F) -> show vector field as above, but the vectors are scaled proportionally to their magnitude -> show the subset of the vector field with scalar function around a given value (adjusted with keys u/U and w/W) -> show the vector field restricted to the boundary of the domain 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: -> do not show displaced mesh -> show displaced mesh 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: -> magnitude: sqrt(vx^2+vy^2+vz^2) -> x-component: vx -> y-component: vy -> z-component: vz
Level surfaces have not been implemented for hex meshes. One possible way to
implement them is to construct the level surfaces based on a tetrahedral
sub-division of the grid.
Original issue reported on code.google.com by tzanio
on 21 Jul 2010 at 8:21
I issued the command
./glvis -m ../mfem/examples/refined.mesh -g ../mfem/examples/sol.gf
and a transient window appeared momentarily and then disappeared with following
error:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 53 (X_CreatePixmap)
Resource id in failed request: 0x5000004
Serial number of failed request: 41
Current serial number in output stream: 42
Any handle to solve the issue?
Thanks
Original issue reported on code.google.com by [email protected]
on 14 May 2013 at 7:15
Hello,
would it please be possible to provide examples of curved meshes in mfem file format in 2D and 3D? Ideally I would like to have an example mesh with one or two P2/P3 triangles in 2D, one P2/P3 tetra in 3D and so on.
From your description on the wiki, I don't understand how to write a curved mesh to a file. Looking at escher-p2.mesh, for example, it seems that only the vertices of the tetra and boundary triangles are given in connectivity sections. Does it mean that the mesh nodes have to be indexed so that the first N nodes are only P1 vertices and the remaining nodes of the mesh (with index higher than N) are the additional nodes?
It's not clear to me what is the ordering convention in the 'FiniteElementSpace' section and what do the numbers actually mean. You say that the mesh description is 'based on a vector finite element grid function with degrees of freedom in the "nodes" of the mesh'. What function? Some values are smaller than -1 or bigger than 1, so I suppose it's not Lagrange shape function values that you store here. Does 'nodes' mean all nodes (i.e. higher-order nodes included)? How are they indexed - is there any correspondence with the node ordering in the 'elements' section? Could you please provide a sketch or an example of a __very__ simple mesh file for each element shape? Deciphering your conventions from a 3D mesh with more than 10 elements is just too hard.
Mfem supports discontinuous elements. Is it possible to store a discontinuous
mesh, i.e. mesh where each element has it's own degrees of freedom not shared
with its neighbours, in native mfem file format?
Thank you for your help and for making glvis opensource.
Best regards,
Martin Vymazal
Original issue reported on code.google.com by [email protected]
on 25 Dec 2013 at 12:00
What steps will reproduce the problem?
1. make
2.
3.
What is the expected output? What do you see instead?
threads.cpp:320: error: ‘socketstream’ was not declared in this scope
threads.cpp:320: error: ‘isock’ was not declared in this scope
threads.cpp:320: error: expected type-specifier before ‘socketstream’
threads.cpp:320: error: expected `>' before ‘socketstream’
threads.cpp:320: error: expected `(' before ‘socketstream’
threads.cpp:320: error: expected primary-expression before ‘>’ token
threads.cpp:320: error: expected `)' before ‘;’ token
make: *** [lib/threads.o] Error 1
What version of the product are you using? On what operating system?
2.0 on Mac OS 10.6.8
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Jun 2012 at 3:54
I started with $glvis <enter> and the system remains hanging with message
"Waiting for data on port 19916 ... ". I am using OpenSuse 12.3 and firewall is
not running. The internet connection is behind proxy (which I do not think
matters). Since socket was not opened running "./glvis -m
../mfem/TESTING_by_VEGA/refined.mesh" gives error messages like "Generating
coloring starting with element 9297 / 39424
Number of colors: 4
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 53 (X_CreatePixmap)
Resource id in failed request: 0x5000004
Serial number of failed request: 41
Current serial number in output stream: 42"
Can you kindly help me?
Original issue reported on code.google.com by [email protected]
on 24 Jul 2013 at 8:13
The cutting plane for 3D curved meshes is incorrect. Try refining the volume
elements (instead of their boundary) for a more accurate computation.
Original issue reported on code.google.com by tzanio
on 21 Jul 2010 at 8:24
Dear all, I am trying to install glvis on my iMac where I see X11, GL and GLU
dynamic lib in the folder /usr/X11R6/lib
I don't see header file directories in X11R6.
So, I would like to know what is the way to modify makefile in order to install
glvis.
Currently, I have the following error:
make
cd lib; g++ -I/usr/X11R6/include -O3 -DGLVIS_MULTISAMPLE=4
-DGLVIS_MS_LINEWIDTH=1.4 -I../../mfem-68e941f8fe -c aux_gl.cpp
aux_gl.cpp:40:22: error: X11/Xlib.h: No such file or directory
aux_gl.cpp:41:23: error: X11/Xutil.h: No such file or directory
aux_gl.cpp:42:24: error: X11/keysym.h: No such file or directory
aux_gl.cpp:43:20: error: GL/glx.h: No such file or directory
aux_gl.cpp:44:19: error: GL/gl.h: No such file or directory
….
Could you help me?
Thanks a lot, Pasqua
Original issue reported on code.google.com by [email protected]
on 29 May 2014 at 9:53
Hello,
I would very much like to use your software to visualize curved meshes, but I'm not able to start it properly. After I start the GLVis server, an attempt to visualize a mesh ends up with an error (I tried to open beam-hex.mesh from your website):
Generating coloring starting with element 4 / 8
Number of colors: 2
X Error of failed request: BadColor (invalid Colormap parameter)
Major opcode of failed request: 1 (X_CreateWindow)
Resource id in failed request: 0x4a00002
Serial number of failed request: 33
Current serial number in output stream: 38
'ldd glvis' does not show anything suspicious:
linux-vdso.so.1 (0x00007fff47fff000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fbfb8e8d000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fbfb8b70000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007fbfb88f1000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fbfb86d5000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fbfb83d2000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fbfb80d4000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fbfb7ebf000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fbfb7b12000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fbfb78f3000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fbfb76ef000)
libnvidia-tls.so.304.64 => /usr/lib/libnvidia-tls.so.304.64 (0x00007fbfb74ec000)
libnvidia-glcore.so.304.64 => /usr/lib/libnvidia-glcore.so.304.64 (0x00007fbfb5101000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fbfb4eee000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbfb91c6000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fbfb4ce9000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fbfb4ae3000)
I tried with several meshes in the data directory of mfem to make sure it's not
a mesh issue, but none of the files works.
The message
'Generating coloring starting with element 4 / 8'
is random - when I run GLVis several times, the first number changes. Sometimes
it's 3/8, sometimes it's 8/8.
I also attached my makefile. Mfem is in my ~/local/mfem-2.0, glvis is in
~/local/glvis-2.0
glxinfo | grep glx gives me this:
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
I'm not sure GLVis actually supports opengl 1.4. If that's the cause of my
problems, could you please update GLVis version on your website or suggest an
alternative program to visualize curved elements?
Thank you very much for your help.
Best regards,
Martin Vymazal
Original issue reported on code.google.com by [email protected]
on 17 Mar 2013 at 9:36
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.