[Gmsh] GMSH postprocessing

Christophe Geuzaine cag32 at case.edu
Tue Mar 7 02:48:49 CET 2006


an_koch at arcor.de wrote:
> Hi,
> 
> I have a queation concerning the postprocessing of time dependent
> data with GMSH which is really a useful program with a lot of nice
> features. I use GMSH for visualizing results of nonlinear
> FE-calculations, mainly structural problem. Therefore I define for
> each variable a seperate VIEW in GMSH (binary file format), i.e. each
> time-dependent variable (stress, total strain, plastic strain...) is
> stored in a separate VIEW . For each VIEW I have to store the whole
> topology of the model which is quiet ineffective in my opinion, since
> the underlying mesh is the same for all the variables. Is there
> another more efficient way to do this? 

If the mesh is the same for all the time steps, you can simply store all
the values in a single view.

For example, in the parsed format a scalar line with 3 time steps would 
look like this: SL(0,0,0, 1,0,0){0,0, 1,1, 2,2}. The same works in the 
ASCII or binary formats.


> Another remark: the way
> variables have to be stored in the postprocessing file confused me.,
> e.g. nodes have to be stored like this
> node1.x node2.x node3.x ...
> node1.y node2.y node3.y ...
>  
> rather than
> 
> node1.x, node1.y, node1.z
> node2.x, node2.y, node2.z ...
> 
> the second method is more natural in my opinion, since it's
> representing the way variables are stored in an array. Morover it's

Yes, we've kept this for backward compatibility. (Maybe we should jump
the gun and fix this in the next version of the format...)

Christophe


> easier an more efficient to write
> fwrite(node1.x, sizeof(double), 3, out)
> rather than 
> for n=0, number of  nodes
>   for i=0, all directions
>      fwrite(node[n].x[i], sizeof(double),1,out)
> It's the same for time-dependent data.
> 
> Looking forward to hearing from you.
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 


-- 
Christophe Geuzaine
Assistant Professor, Case Western Reserve University, Mathematics
http://www.case.edu/artsci/math/geuzaine