![]() |
![]() |
![]() |
![]() |
DVextract_comp
Synopsis
extract a single data component from a field
module DVextract_comp {
int+IPort2 component = 0;
Mesh+Node_Data+IPort2 ∈
Node_Data out_nd {
nnodes => switch((in.nnodes>0)+1, 0, in.nnodes);
nnode_data => switch((component<in.nnode_data)+1, 0, 1);
&node_data+nres => {switch(component<in.nnode_data,
in.node_data[component])};
};
Mesh+Node_Data+OPort2 &out => merge(out_nd,in);
};Description
DVextract_comp creates a new field object that is a reference to one component of an existing Node_Data. The component can be scalar or vector. Most modules that work on Node_Data work on just one component of Node_Data. DVextract_comp is the base module that they use to acquire this single component.
Input
An integer. Sets which component of the input Node_Data to extract. The default is the first (0th) component.
Output
A reference to a merged object. That object's first member is a reference to the extracted Node_Data component. The object's second member is a reference to the remainder of the input field.
Example
Libraries.Main.Mappers.advector
File
Libraries.Main.Filters.clamp Libraries.Main.Mappers.cut Libraries.Main.Filters.extract_scalar and many others
See also
![]() |
![]() |
![]() |
![]() |