discover the type of mesh, then call the corresponding cropping base module
group DVcrop {
Mesh_Struct+Node_Data+Iparam &in {
nnodes+req;
};
int+Iparam min[in.ndim];
int+Iparam max[in.ndim];
DVcrop_struct DVcrop_struct {
&min => <-.min;
&max => <-.max;
};
DVcrop_unif DVcrop_unif {
&min => <-.min;
&max => <-.max;
};
DVcrop_rect DVcrop_rect {
&min => <-.min;
&max => <-.max;
};
DVfld_match DVfld_match {
Mesh_Struct+IPort2 &in=> <-.in;
links {
link0 => DVcrop_unif.in;
link1 => DVcrop_rect.in;
link2 => DVcrop_struct.in;
};
};
DVswitch DVswitch {
in => {DVcrop_unif.out, DVcrop_rect.out, DVcrop_struct.out};
index => DVfld_match.index;
};
olink out => DVswitch.out;
};
DVcrop is a utility base module. It discovers what type of mesh (Mesh_Struct, Mesh_Rect, or Mesh_Unif) its input field has, then passes control through DVswitch to the corresponding base module (DVcrop_struct, DVcrop_rect, or DVcrop_unif).
A reference to a field containing any type of structured mesh, plus Node_Data.
The cropping parameters. These are passed through to the selected base module.