discover the type of mesh, then call the corresponding slicing base module
group DVslice {
Mesh+Node_Data+Iparam &in { /* input field */
nnodes+req;
};
Plane_Grid+Xform+Iparam &plane; /* slice plane */
float+notify+IPort2 dist; /* plane distance */
int+Iparam map_comp[];
DVslice_gen DVslice_gen {
plane => <-.plane;
&dist => <-.dist;
&map_comp => <-.map_comp;
};
DVslice_unif DVslice_unif {
plane => <-.plane;
&dist => <-.dist;
&map_comp => <-.map_comp;
};
DVslice_rect DVslice_rect {
plane => <-.plane;
&dist => <-.dist;
&map_comp => <-.map_comp;
};
DVfld_match DVfld_match {
in => <-.in;
links {
link0 => DVslice_unif.in;
link1 => DVslice_rect.in;
link2 => DVslice_gen.in;
};
};
DVswitch DVswitch {
in => {DVslice_unif.out, DVslice_rect.out, DVslice_gen.out};
index => DVfld_match.index;
};
olink out => DVswitch.out;
};
DVslice is a utility base module. It discovers what type of mesh (general (structured or unstructured), Mesh_Rect, or Mesh_Unif) its input field has, then passes control through DVswitch to the corresponding base module (DVslice_gen, DVslice_rect, or DVslice_unif).
A reference to a field containing any type of mesh, plus Node_Data.
The slicing parameters. These are passed through to the selected base module.
The output is the same as the DVswitch selection.