[Gmsh] Three questions about Post Processing features

Christophe Geuzaine cag32 at case.edu
Fri Sep 2 03:16:03 CEST 2005


Jean-Francois Rit wrote:
> Hello,
> 
> After reading the reference manual of Gmsh v 1.60, I have a couple of
> questions:  
> 
> 
> 1- Is it  possible to define an identifier for a char-expression  like in 
>   toto = "Mystring"

Unfortunately, no.

> 
> 2- Is it possible to define a vector/tensor field from three/9 scalar
>  fields  like in 
>  View[3]=FieldCombine(View[0],View[1],View[2])

Yes, but it's a little convoluted. Here is one way:

// merge the 3 views View[0], View[1], View[2]
Merge "view0.pos";
Merge "view1.pos";
Merge "view2.pos";

// create a new vector view (here with all components set to
// the first component of View[0])
Plugin(Extract).iView = 0;
Plugin(Extract).Expression0 = "v0";
Plugin(Extract).Expression1 = "v0";
Plugin(Extract).Expression2 = "v0";
Plugin(Extract).Run;

// change the two other components of the new view (View[3]) to
// match the first components of View[1] and View[2]
Plugin(Evaluate).iView = 3;
Plugin(Evaluate).ExternalView = 1;
Plugin(Evaluate).Expression = "w0";
Plugin(Evaluate).Component = 1;
Plugin(Evaluate).Run;
Plugin(Evaluate).ExternalView = 2;
Plugin(Evaluate).Expression = "w0";
Plugin(Evaluate).Component = 2;
Plugin(Evaluate).Run;


> 
> 3- What is the meaning of  # string [ ] in the expression syntactic definition
> ? 
> 

It returns the size of the list "string[]".

Take care,

Christophe



> Yours,
> 
> --
> J-F Rit
> EDF R&D
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 


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


More information about the gmsh mailing list