[Gmsh] Create a vector view from 3 scalar views

Christophe Geuzaine cag32 at case.edu
Fri Oct 28 13:23:07 CEST 2005


Nicolas TARDIEU wrote:
> Hi folks,
> 
> I would like to know if it is possible to create a vector view from 3 scalar views??
> 

Here is one way:

http://www.geuz.org/pipermail/gmsh/2005/001655.html

And here is another way that avoids reinterpolation:

// merge the 3 scalar views 

Merge "view1.pos";
Merge "view2.pos";
Merge "view3.pos";

// create three vector views with components set to the values of the 

// scalar views 

Plugin(Extract).Expression0 = "v0";
Plugin(Extract).Expression1 = "v0";
Plugin(Extract).Expression2 = "v0";
Plugin(Extract).iView = 0;
Plugin(Extract).Run;
Plugin(Extract).iView = 1;
Plugin(Extract).Run;
Plugin(Extract).iView = 2;
Plugin(Extract).Run;

// remove the scalar views 

Delete View[0]; Delete View[0]; Delete View[0];

// set the last two components of the first vector view to 

// the components of the other two 

Plugin(Evaluate).Expression = "w0";
Plugin(Evaluate).iView = 0;
Plugin(Evaluate).ExternalView = 1;
Plugin(Evaluate).Component = 1;
Plugin(Evaluate).Run;
Plugin(Evaluate).ExternalView = 2;
Plugin(Evaluate).Component = 2;
Plugin(Evaluate).Run;

// remove the extra vector views 

Delete View[2]; Delete View[1];



> Thanks,
> 
> Nicolas
> 
> 
> 
> 
> _______________________________________________
> 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