[Gmsh] Mailing list innacessible
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Thu Jun 19 08:10:26 CEST 2008
Thomas-externe PINCHARD wrote:
>
>
> Ps : je souhaitais me renseigner sur la possibilité de "fabriquer" un
> tenseur sous GMSH à partir de composantes données. Je sais que faire
> l'inverse (extraire des composantes d'un tenseur) se fait très
> facilement, et je voulais savoir s'il y avait un moyen simple d'aboutir
> à ce que je désire. Je voulais utiliser la fonction combiner, mais
> puisque l'aide n'est pas disponible, je ne sais pas si cela fonctionne.
>
It's a bit tricky but here is for example how you could create a vector
view from 3 scalar views:
// A little script to combine 3 scalar views into a single vector view
// (with no reinterpolation, hence the temporary creation of the 3
// vector views, instead of just using Plugin(Evaluate) on a vector
// view, with external scalar views--we should probably make the
// plugin more intelligent instead...)
// merge the 3 scalar views
Merge "view1.pos";
Merge "view2.pos";
Merge "view3.pos";
// create three vector views with all 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];
///////////////////////////
You could do something similar in your case... (We should definitely
enhance/merge the evaluate/extract Plugins to make these kinds of
manipulations easier!)
>
> Thomas Pinchard
> Stagiaire EDF-CIH
> Savoie Technolac
> 73373 Le Bouget du Lac CEDEX
> 04 79 60 62 10
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine