TOC PREV NEXT INDEX

DVcomb_comp

Synopsis

combine Node_Data components from two fields into one new Node_Data

module DVcomb_comp {
Node_Data+Iparam &nd1 {
nnodes+req;
};
Node_Data+Iparam &nd2 {
nnodes+req;
};
int+Iparam comp1[];
int+Iparam comp2[];
Node_Data+Oparam out {
nnodes+nowrite => nd1.nnodes;
node_data.nvals+nowrite;
// we are only modifying the pointer value of
// node_data. The '*' here prevents us from getting
//dependencies on the upstream guys.
*node_data[];
nnode_data => array_size(node_data);
};
method+notify_val+notify_inst upd_comb_comp<status=1>
= "DVcomb_comp_update";
};

Description

DVcomb_comp combines any combination of components of two Node_Data objects into one new Node_Data object with n components. The user should ensure that the nnodes of the two input Node_Datas are equal.

Input

&nd1

Reference to a Node_Data object.

&nd2

Reference to a Node_Data object.

comp1[]

An integer array of variable length. Sets which components to take from &nd1. For example, if comp1 = {0, 3}, then the first and fourth components will be extracted.

comp2[]

An integer array of variable length. Sets which components to take from &nd2. For example, if comp2 = {1}, then the second component will be extracted.

Output

&out

This is a new Node_Data with the same number of nodes as the first input field, and n components (nnode_data), where n is the sum of the dimensions of comp1 and comp2. Its own Node_Data is a reference (*node_data) to an n object array, where the array values are references to the components in nd1 and nd2.

Example

Libraries.Main.Mappers.cut

File

v/dv.v

modules/combcomp.cUtility DVM macrosDVMcomb_comp_param

See also

DVextract_comp
DVextr_scalar
DVextr_vector

TOC PREV NEXT INDEX