[Gmsh] DisplacementRaise Plugin

Christophe Geuzaine geuzaine at acm.caltech.edu
Fri Aug 6 17:13:48 CEST 2004


Nicolas Tardieu wrote:

> Hi! I wish you all a nice summer! :o)
> 
> Here is my question : I would like to apply a time varying displacement 
> field
> on another view. Since the DisplacementRaise Plugin only works with ONE
> given displacement field, I tried to write a little Gmsh script to get 
> different displacement
> fields from a view and apply them on another view but unsuccessfully : I 
> don't know how to
> define several different DisplacementRaise plugins....
> The attachment contains some datas and the script.
> 

Right... "Duplicata" creates a duplicate "display" of the view, but the
core data is not duplicated (so that you only use the memory once). 
Since Plugin(DiplacementRaise) actually modifies the data inside the 
view, you need to load the view several times in memory. Here is a 
modified script that should do what you want:

Merge "U.pos";
For i In {0:View[0].NbTimeStep-1}
   Merge "Gap.pos";
   View[i+1].TimeStep = i; // choose what to display
   Plugin(DisplacementRaise).iView=i+1;
   Plugin(DisplacementRaise).dView=0;
   Plugin(DisplacementRaise).dTimeStep=i;
   Plugin(DisplacementRaise).Factor=0.1;
   Plugin(DisplacementRaise).Run;
EndFor
Delete View[0];

Best,

Christophe

PS: we should probably think about a simpler way to do this...

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org