DVextract_comp


Synopsis

extract a single data component from a field


group DVextract_comp {
int+IPort2 component = 0;
Mesh+Node_Data+IPort2 ∈
Node_Data out_nd {
nnodes => in.nnodes;
nnode_data = 1;
&node_data+nres => {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

component

An integer. Sets which component of the input Node_Data to extract. The default is the first (0th) component.

&in

A reference to a field containing a Mesh and Node_Data.

Output

&out

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.

Files

v/dv.v

Utility DVM macros

DVMextr_comp_param

Example

Libraries.Main.Filters.clamp
Libraries.Main.Mappers.cut
Libraries.Main.Filters.extract_scalar
and many others

See also