Coder Social home page Coder Social logo

glvis / glvis Goto Github PK

View Code? Open in Web Editor NEW
231.0 31.0 51.0 4.75 MB

Lightweight OpenGL tool for accurate and flexible finite element visualization

Home Page: http://glvis.org

License: BSD 3-Clause "New" or "Revised" License

C++ 80.04% C 15.49% Makefile 0.97% Shell 0.85% CMake 1.33% GLSL 0.53% Objective-C++ 0.24% Rich Text Format 0.07% Python 0.49%
finite-elements opengl visualization computational-science data-viz radiuss

glvis's Introduction

                       GLVis visualization tool

                 _/_/_/  _/      _/      _/  _/
              _/        _/      _/      _/        _/_/_/
             _/  _/_/  _/      _/      _/  _/  _/_/
            _/    _/  _/        _/  _/    _/      _/_/
             _/_/_/  _/_/_/_/    _/      _/  _/_/_/

                         https://glvis.org

Release Build License Doxygen License License

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.

  • For building instructions, see INSTALL.

  • The GLVis key commands and mouse functions are documented below.

  • GLVis is distributed under the terms of the BSD-3 license. All new contributions must be made under this license. See LICENSE and NOTICE for details.

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

Mouse functions

Basic

  • Left – Rotate the viewpoint
  • Right – Zoom in (up) / Zoom out (down)
  • Middle – Translate the viewpoint
  • Left + Shift – Start spinning the viewpoint (according to the dragging vector)

Advanced

  • Left + Alt – Tilt
  • Left + Ctrl – Spherical rotation
  • Left + Ctrl + Shiftz-spinning
  • Right + 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)

Key commands

Basic

  • h – Print a short help message in the terminal
  • r – Reset the plot to 3D view
  • R – Cycle through the six 2D projections (camera looking above/below in x/y/z directions)
  • j – Turn on/off perspective
  • s – Turn on/off unit cube scaling
  • A – Turn on/off the use of anti-aliasing/multi-sampling
  • L – Turn on/off logarithmic scale
  • c – Toggle the colorbar and caption display state
  • C – Change the main plot caption
  • p / 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 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 axes
  • 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
    • (2D only) show element attributes
    • (2D only) show element det(J)
    • (2D only) show element 1/det(J)
    • (2D only) show element \kappa
    • (2D only) show element \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) 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 format
  • Ctrl + 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 – Exit

Advanced

  • 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 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 rotation
  • 1, 2, 3, 4, 5, 6, 7, 8, 9 – Manual rotation along coordinate axes
  • Ctrl + , , , – Translate the viewpoint
  • Ctrl + o – Toggle an element ordering curve
  • n / N – Cycle through numberings. The options are:
    • none
    • show element numbering
    • show edge numbering
    • show vertex numbering
  • ` – 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. 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)
  • F5 – Change the range and number of the level lines
  • F6 – Palette menu (negative repeat number flips the palette)
  • F7 – Change the minimum and maximum values
  • Shift + F7 – Set the bounding box from the terminal

2D scalar data

  • i – Toggle cutting (clipping) plane in 2D
  • y / Y – Rotate cutting plane (\theta) in 2D
  • z / Z – Translate cutting plane in 2D
  • o / O – Control element subdivisions in 2D
    • there are two subdivision factors in this case: element (s1) and boundary (s2).
    • O cycles through the following "subdivision functions", (prints a message in the terminal when changed):
      • Increase element subdivision factor: s1 += s2
      • Decrease element subdivision factor: s1 -= s2
      • Increase boundary subdivision factor: s2++
      • Decrease boundary subdivision factor: s2--
    • o – performs the currently selected function
  • b – Toggle the boundary in 2D scalar mode. The options are:
    • no boundary
    • black boundary
    • boundary colored with the boundary attribute
    • Use 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 shapes
  • 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)

3D scalar data

  • i – Toggle cutting (clipping) plane in 3D. The options are:
    • none
    • cut through the elements
    • show only elements behind the cutting plane
  • I – Toggle the cutting plane algorithm used when the option cut through the elements is selected. The two algorithms are:
    • slower, more accurate algorithm for curved meshes (default)
    • faster algorithm suitable for meshes with planar faces
  • x / X – Rotate cutting plane (\phi) in 3D
  • y / Y – Rotate cutting plane (\theta) in 3D
  • z / Z – Translate cutting plane in 3D
  • E – Display/Hide the elements in the cutting plane
  • M – Display/Hide the mesh in the cutting plane
  • o / O – Refine/de-refine elements in 3D
  • 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)

2D vector data

  • 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 – Toggle 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{v_x^2+v_y^2}
      • direction from -\pi to \pi: atan2(v_y,v_x)
      • x-component: v_x
      • y-component: v_y
      • divergence: div(v)
      • curl: curl(v) [skipped for H(div) elements]
      • anisotropy in grad(v) [skipped for H(div) elements]

3D vector data

  • 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{v_x^2+v_y^2+v_z^2}
    • x-component: v_x
    • y-component: v_y
    • z-component: v_z

glvis's People

Contributors

adrienbernede avatar benson31 avatar benyee avatar dalcinl avatar e-aranda avatar gelever avatar jakubcerveny avatar jandrej avatar luzpaz avatar mlstowell avatar pazner avatar pkubaj avatar publixsubfan avatar rw-anderson avatar rwa avatar stefanozampini avatar termi-official avatar tomstitt avatar tzanio avatar v-dobrev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glvis's Issues

compilation problems

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

fail compiling glvis-3.4 on Ubuntu 18.04 LTS

I have this error when compiling on Ubuntu 18.04 LTS

/usr/bin/ld: lib/libglvis.a(aux_vis.o): undefined reference to symbol 'XGetWindowAttributes'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line

This does not happen with glvis3.3, so I think this issue is recently introduced.

Too many open files when reading parallel mesh & solution

After some recent changes in GLVis (meshes and solutions in the same file), it is no longer able to open a larger parallel solution (like 4096 CPUs). The error you get is something like

Can not open mesh file: sedov_500_mesh.001013!

while the file clearly exists and can be opened. It turns out GLVis is trying to open all of the files at once and the default limit on Ubuntu is ~1000 concurrently open files per process. The workaround is to increase the limit with something like ulimit -n 10000, but I think it shouldn't be necessary to keep all the files open and that we should eventually fix this.

Compiling glvis

Hi All,

I am new to using glvis and mfem so please bear with me as I am just getting started.. I am using a mac, and I have just gotten MFEM to build and run on my machine. I had to build mfem in a "build" folder inside the mfem directory using cmake and make.
Now I am trying to get GLVis to build by specifying "make MFEM_DIR=../mfem/build -j" but I get the error "makefile:177: *** The MFEM library is not built. Stop."
I am not really sure what is causing this since I have confirmed by running MFEM examples that my MFEM build was successful. Any pointers on how I could get around this?

Thanks,
Ketan

glvis not running

 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

Obscure error for periodic meshes without boundary attributes

If you don't specify the boundary attributes in 3D, and MFEM cannot compute automatically the boundary mesh (like in a fully periodic cube) , then GLVis errors out with a very obscure message for the user (this is because Array::Max() cannot be called)

bdr_attr_to_show.SetSize(mesh->bdr_attributes.Max());

What should be the proper fix for this? I see that the rest of the code for the 3D visualization makes heavy use of the boundary mesh, and I don't see any simple fix except aborting at line 600 with a nice error message like "you need to specify the boundary attributes". Thoughts?

Problem compiling glvis in Windows Subsystem Linux Ubuntu 18.04

Dear all,

I am trying to compile glvis 3.4 in WSL Ubuntu 18.04 and ran into some issues. When I run make, I saw the following message:

shwang@SJC-PRE-16-5301:/mnt/e/mfem/glvis-3.4$ make MFEM_DIR=../mfem-3.4 -j
g++ -O3 -I../mfem-3.4 -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.4 -I/usr/include -DGLVIS_USE_LIBPNG -DGLVIS_USE_FREETYPE -I/usr/include/freetype2 -o glvis glvis.cpp -Llib -lglvis -L../mfem-3.4 -lmfem -lrt -L -lX11 -lGL -lGLU -lpng -lfreetype -lfontconfig -lpthread
/usr/bin/ld: lib/libglvis.a(aux_vis.o): undefined reference to symbol 'XGetWindowAttributes'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
makefile:187: recipe for target 'glvis' failed
make: *** [glvis] Error 1

I have updated my libx11-dev to the latest version; the X server seems to be running property with VcXsrv (gedit is running up fine). Could you please help provide some hints?

Best,
Shawn

-lX11 and vtk unstructured problem

Hi,

  1. comment: I need -lX11 to compile glvis on my linux mint tara,

  2. question: When I do 'glvis -m test.vtk (with the attached test.vtk) I get the next, why?
    test.zip

    MFEM abort: VTK mesh is not UNSTRUCTURED_GRID!
    ... in function: void mfem::Mesh::ReadVTKMesh(std::istream&, int&, int&)
    ... at line 387 of file: mesh/mesh_readers.cpp
    Aborted (core dumped)

Save a snapshot after transformation in a command line

Dear All,

I'm trying to save a snapshot after transforming it to 2D view using the following command:

glvis -m mesh -g solution -k RjlkaSq

i.e. I set 2D (R), turn off perspective (j), turn off light (l), make it slightly transparent to see the left bottom coordinate (k), display axis (a), then I want to save the resulting view as a snapshot (S), and exit (q). However, GLVis saves the snapshot at an earlier stage in 3D (I guess before all the transformations happen).

I know I can save the desirable snapshot when GLVis window is open, but I'd like to execute this command in a script.

Any suggestion would be highly appreciated!

Thanks,
Mikhail

GLvis doesn't build against an out-of-source MFEM build

I tried building glvis-3.3 against an MFEM build that was "out-of-source" and it doesn't work. GLvis is looking for config.mk in $(MFEM_DIR)/config. If I specify MFEM_DIR=../mfem/build (which is where the built libmfem.a and mfem.hpp files are), the glvis make fails looking for config.mk

Bad keystrokes result in runaway glvis windows crashing X server

Unfortunately, I can't recall exact key strokes that caused this. However, in a terminal window I am running mesh-explorer and I have a glvis process running as well moving back and forth between terminal window and glvis window to enter key strokes and change things. On more than a few occasions now, I've accidentally hit the wrong key in the wrong window causing mesh-explorer to loop endlessly...

S) Save
--> Generating coloring starting with element 7 / 8
Number of colors: 2

What would you like to do?
q) Quit
r) Refine
c) Change curvature
s) Scale
t) Transform
j) Jitter
v) View
m) View materials
b) View boundary
e) View elements
h) View element sizes, h
k) View element ratios, kappa
x) Print sub-element stats
f) Find physical point in reference space
p) Generate a partitioning
S) Save
--> Generating coloring starting with element 7 / 8
Number of colors: 2

What would you like to do?
q) Quit
r) Refine
c) Change curvature
s) Scale
t) Transform
j) Jitter
v) View
m) View materials
b) View boundary
e) View elements
h) View element sizes, h
k) View element ratios, kappa
x) Print sub-element stats
f) Find physical point in reference space
p) Generate a partitioning
S) Save
--> Generating coloring starting with element 7 / 8
Number of colors: 2

What would you like to do?
q) Quit
r) Refine
c) Change curvature
s) Scale
t) Transform
j) Jitter
v) View
m) View materials
b) View boundary
e) View elements
h) View element sizes, h
k) View element ratios, kappa
x) Print sub-element stats
f) Find physical point in reference space
p) Generate a partitioning

and worse, upon each iteration, it generates a new glvis window. If I catch it and bring things under control soon enough, I think all I wind up having to do is kill glvis and restart it manually. However, it can also sometimes crash my X server.

This is happening on OSX 10.11 with glvis-3.3 and mfem (master).

Using a socket to update the plot caption

Heya,

I'm using GLVis + MFEM for my research, and have an application that is continuously pushing new solutions to GLVis through a socket, like you are doing in your MFEM example code.

I found in your GLVis CHANGELOG file a reference to an undocumented socket command plot_caption, which I've been trying to get to work.

My current code is (somewhat like) the one from your examples:

char vishost[] = "localhost";
int  visport   = 19916;
socketstream sol_sock(vishost, visport);
sol_sock.precision(8);
sol_sock << "solution" << endl << *mesh << solution << flush;

How do I push a new plot_caption? I tried a couple of things, like

sol_sock << "solution" << endl << *mesh << solution << flush;
sol_sock << "plot_caption" << endl << "heya" << flush;


sol_sock << "solution" << endl << *mesh << solution << flush;
sol_sock << "plot_caption" << endl << "heya" << endl << flush;


sol_sock << "solution" << endl << *mesh << solution << endl
         << "plot_caption" << endl << "heya" << endl << flush;

but these all mess up GLVis more or less completely, in the sense that it tries to read the next mesh data into the caption.

Is there something I am missing?

Linking with shared libraries and RPATH

Using the CMake build and linking with shared libraries doesn't produce consistent RPATH flags.

ldd glvis 
	linux-vdso.so.1 =>  (0x00007ffff7d42000)
	libmfem.so => not found
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f61394c9000)
...

First, the project name has to be set before using FIND_* so global properties aren't overwritten. Refer

project(glvis)

But that doesn't solve the RPATH issue with libmfem.so. Any ideas?

GLVis in MS Windows

I’m interested use MFEM and GLVis to do some experimented.
But my work platform is MS Windows. I read that MFEM can work on it but GLVis will work only on in X11 bases.
I’m writing you to ask how I can see the MFEM results without GLVis ou how can I make GLVis work in Windows.
Thanks in advance!
Ricardo

master compilation failure due to undef'd fontbase

I happened to download master because I needed a cmake-enabled glvis.

I tried to build on OSX 10.11.6. I had to turn off PNG and FREETYPE due to...

ld: warning: ld: warning: ignoring file /sw/lib/libpng.dylib, file was built for i386 which is not the architecture being linked (x86_64): /sw/lib/libpng.dylibignoring file /sw/lib/libfreetype.dylib, file was built for i386 which is not the architecture being linked (x86_64): /sw/lib/libfreetype.dylib

But, then I ran into this error...

/Users/miller86/fastmath/atpesc17_examples/mfem/glvis/lib/vssolution.cpp:1020:16: error: use of undeclared identifier 'fontbase'

Adding extern GLuint fontbase; declaration to to vssolution.cpp fixes

Error compiling

I followed the instructions given in the website. I also have
all the dependencies listed here.
But I obtain the follwing error:

cd lib; g++ -O3 -I/home/nguarinz/software/mfem-3.3 -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.4 -I/usr/X11R6/include -DGLVIS_USE_LIBPNG -DGLVIS_USE_FREETYPE -I/usr/X11R6/include/freetype2 -I/usr/include/freetype2 -c aux_vis.cpp
aux_vis.cpp:36:35: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
makefile:167: recipe for target 'lib/aux_vis.o' failed
make: *** [lib/aux_vis.o] Error 1

I already have fontconfig installed, so I don't know what the problem is.

CMAKE BINARY DIR

@v-dobrev I'm not sure this is a problem on my Fedora 26 or a buggy CMakeLists.txt
This is the first time I'm trying an out-of-source cmake build of GLVis. For some reasons, ${CMAKE_SOURCE_DIR} and ${CMAKE_BINARY_DIR} are the same. Anyway, declaring the project before the check fixes the issue

index e33428a..7d5d334 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 
+project(glvis)
+
 # Prohibit in-source builds
 if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
   message(FATAL_ERROR "In-source builds are prohibited.")
@@ -14,7 +16,6 @@ if (NOT CMAKE_CXX_COMPILER AND MFEM_CXX_COMPILER)
   set(CMAKE_CXX_COMPILER "${MFEM_CXX_COMPILER}")
 endif()
 
-project(glvis)
 
 # Default options match the Makefile
 if (NOT CMAKE_BUILD_TYPE)

Implement level surfaces for hexahedral meshes

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

Can't get master to connect to display on OSX

After building master (according to #52), I can't get it to run correctly...

[scratlantis:mfem/build/data] miller86% glvis -m escher.mesh

       _/_/_/  _/      _/      _/  _/
    _/        _/      _/      _/        _/_/_/
   _/  _/_/  _/      _/      _/  _/  _/_/
  _/    _/  _/        _/  _/    _/      _/_/
   _/_/_/  _/_/_/_/    _/      _/  _/_/_/

Generating coloring starting with element 18 / 42
Number of colors: 3
Can't connect to display!
Initializing the visualization failed.

I know glxgears works fine here.

CMake build

Hi,

since i had to recompile my libraries a few times now, i wanted to ask if there is still interest in a CMake build system for glvis to keep it compatible with MFEM?

I have a pretty compact working example which needs work to meet the requirements that the makefile provides. I could file that as a PR if there isn't some internal work done already.

Best regards

metis dependence

Hello,

I am trying to install glvis once I have installed mfem with suitesparse. Do I need metis? because I have a linking error with that.

Thanks,
Ernesto

Cutting plane for curved meshes

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

Setting min/max value does not work

The key F7 for setting min/max value does not work in server mode. I have tried to track it back and it is broken since the commit c05738f , which added the key combination Shift+F7 for setting the whole bounding box.

Interest in MATLAB wrapper?

I am currently working on a simplistic MATLAB wrapper of GLVis. Originally, I intended to create a repo for it on my account. However, if this organization is interested in it, I could create the repository inside the GLVis organization.

installing glvis on Mac OS 10.8

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

VTK xml file support with high order lagrange elements

Hi,
I am wondering if the VTK xlm file are supported at all (I get an error when I try to open them) or only the legacy format? How about chances to use their recently added support for high order Lagrange elements.

BTW: this statement on http://glvis.org/curvilinear-vtk-meshes/ is a bit misleading, as it is true for the legacy format only: 'Currently VTK does not support cubic, and higher-order meshes.' The XML format can now handle arbitrary order.

thanks for your time and providing a very useful tool,
Martin

parallel nurbs mesh issue

Hello,

I encountered problems when trying to visualize a grid based on nurbs elements from a set of files.
It works well when using a single file, but when using multiple files only the grid contained in the last file is actually visible.

I would like to know if you have an example corresponding to such a case ?
If necessary, I can also provide my case to fix the problem.

Thanks a lot.
Regis

Mfem file format for curved elements

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

Min coordinates in a XY plane don't appear

Hi All,

I'm visualizing the following solution mesh_and_sol.zip

When I make a 2D view (Shift+r) in the first XY plane the min coordinates of the domain don't show up. In all other planes they do.
glvis_s16

I tried that with GLVis 3.1, but the same happens in GLVis 3.0.

Thanks,
Mikhail

socket not opening

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

Can I redistribute the binary?

I use the glvis executable in my Matlab code. My Matlab program is in a private repository on Bitbucket and it may later become public. However, I never intend my code to be used outside academia. Is it allowed to ship the compiled glvis with my code? It would simplify the usage.

I read the GNU license, I just want to make sure if I can do so.

Problems on building glvis

I am new to Linux. I use ubuntu on a virtualbox. Following the procedure on mfem.org, I can build and mfem-3.3.2 and run examples in it without problems. But when I was building glvis following exactly the procedure on mfem.org, I keep having troubles, both for glvis 3.3 applied to mfem3.3.2 and glvis 3.0 applied to mfem-3.0. Please see the pictures.
screenshot from 2017-12-17 02-37-11
screenshot from 2017-12-17 02-37-37

Can't connect to display on Ubuntu bash shell (running as subsystem on Windows 10)

Hello there!

nemo@Skyzerks:/mnt/e/_Workspace/FEM/attempt/glvis-3.4$ ./glvis -m ../mfem-3.4/data/star.mesh

       _/_/_/  _/      _/      _/  _/
    _/        _/      _/      _/        _/_/_/
   _/  _/_/  _/      _/      _/  _/  _/_/
  _/    _/  _/        _/  _/    _/      _/_/
   _/_/_/  _/_/_/_/    _/      _/  _/_/_/

Generating coloring starting with element 19 / 20
Number of colors: 3
Can't connect to display!
Initializing the visualization failed.

Wanted to look at how it will display a mesh example as I intend to build a custom mesh to use it in my magister work. Would be great to get a solution to this as soon as possible. Thanks~

Second order mesh, MFEM format vs VTK format

I have written a second order PUMI mesh to MFEM format then print it once using 'MFEM::Mesh::Print()' and once using 'MFEM::Mesh:PrintVTK()'.

The VTK format loaded in Paraview shows a second order mesh as expected, however the MFEM format loaded in glvis shows a linear mesh as you can see in the attached snapshots. The MFEM format do have the nodes section required for the higher order meshes.

mfem_print
mfem_print_vtk

MFEMformat.mesh.tar.gz

X Error of failed request: BadValue (integer parameter out of range for operation)

I am trying to visualize a mesh output from MFEM on Quartz, but get a BadValue error from GLVIS:

../buildOptTOSS3/glvis-3.3/glvis -m last_run_problem.mesh 

       _/_/_/  _/      _/      _/  _/
    _/        _/      _/      _/        _/_/_/
   _/  _/_/  _/      _/      _/  _/  _/_/
  _/    _/  _/        _/  _/    _/      _/_/
   _/_/_/  _/_/_/_/    _/      _/  _/_/_/

Generating coloring starting with element 221 / 1024
Number of colors: 2
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  20
  Current serial number in output stream:  21

The -DGLVIS_GLX10 (as suggested in Issue 5) is already in my makefile. Any other tips here?

Cannot start GLVis

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:

Plotting cut finite elements

The CutFEM method is easy to implement to existing FE softwares and enables the representation of discontinuities within an element. It is done by restricting the FE basis functions on a cut part of the element.

My question is the following: is it possible in GLVis to plot the mesh or a solution field only on part of a finite element? Example: consider a Q4 element cut by a straight discontinuity into two parts: a triangle and a pentagon. The plot on the pentagon/triangle can be easily created by interpolating the calculated nodal FE values to the vertices of the pentagon/triangle.

Installing glvis and mfem on a Win10 machine

I am new to cygvin and unix. I followed exactly the instructions in [http://mfem.org/building/]: Installed cygvin on my computer, downloaded mfem.tgz and glvis.tgz. I continued with building the serial version of MFEM: This is the current contents of the mfem folder:

Tomy@HP-3 ~/mfem/mfem-3.3.2
$ ls
CHANGELOG COPYRIGHT examples INSTALL makefile mfem-performance.hpp
CMakeLists.txt data fem LICENSE mesh miniapps
config doc general linalg mfem.hpp README

The make serial command does not seem to work:
`Tomy@HP-3 ~/mfem/mfem-3.3.2
$ make serial -j

-bash: make: command not found`

I would very much appreciate help how to resolve this issue.

Thanks
Tomy

About install on Ubuntu 2018.04 LTS

I tried to install the glvis on Ubuntu 2018.04 LTS, but failed with the following error.

/usr/bin/x86_64-linux-gnu-ld: lib/libglvis.a(aux_vis.o): Symbol 'XGetWindowAttributes' is not defined
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line

After searching on Google, I got the answer as follows.

https://askubuntu.com/questions/1035062/glvis-linker-error-undefined-reference-to-symbol-xgetwindowattributs

Hope that this will be helpful to people with the same problem.

Visualising 1D mesh embedded in 2D segfaults

In Example 7 of MFEM, we look at a surface mesh: a 2D mesh of triangles embedded in 3D space.

For my own research, I want to take this a step easier and look at a 1D mesh of segments embedded in 2D space.
From the MFEM side, I think things work well enough. However, when I try to visualize this mesh inside GLVis, I get a segmentation fault. I do realise GLVis is not made to visualise 1D data, but still it may be beneficial to debug the segfault.

This is the mesh I am using:

MFEM mesh v1.0

dimension
1

elements
4
1 1 0 1
1 1 1 2
1 1 2 3
1 1 3 0

boundary
0

vertices
4
2
-1 -1
1 -1
1 1
-1 1

Understanding the Mesh NURBS format

Hello

I have trouble understanding the NURBS mesh format used in Glvis. If I understood it correctly, each element represents a patch and each edge represents a patch boundary. The vertices of the element are the patch corners. The inner control points indexing are not described. Therefore I'm not clear how the control points in the FiniteElementSpace section relate to the patch. In the other way around, I do not know which control points the element shall own. Anyone can give a hint?

XIO error

glvis-3.3 nicely works, but after quitting, the following appears in the terminal:

XIO:   fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
       after 2822 requests (2822 known processed) with 0 events remaining.

It doesn't seem to have any effect on my workflow, but still wondering what causes it.

Title or legend

Dear All,

Is it possible to put a text in a GLVis graphics window that then will be saved as a snapshot? The text can represent a title of a simulation result or a legend.

Thanks,
Mikhail

Bug with periodic meshes

I don't know if this is a known bug but the cutting plane doesn't work as I would expect with periodic meshes.
bug_glvis

Cheers,
Y

Save PDF without background color

Hi All,

I was wondering if there is a way to save pdf's without any printable background (i.e. no white background) in GLVis?

Thanks,
Ketan

Modern OpenGL port

Hello, I am currently working on creating a Jupyter add-on that uses GlVis, by building the library with emscripten. In the process, I have been porting over some of the immediate-mode OpenGL to a modern OpenGL featureset.

So far I have implemented:

  • Replacing the fixed-function lighting/matrix stack with shaders
  • Using a texture atlas to render text
  • Using SDL2 for window/input management instead of X11

I currently have a couple more call lists left to convert into VBOs, before the GlVis library can be built with emscripten and used.

I'd be interested in hearing your thoughts or suggestions!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.