Skip to content
Snippets Groups Projects
Commit a9ae7317 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 34d2219f
No related branches found
No related tags found
No related merge requests found
// 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];
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment