DVextr_cell_comp


Synopsis

extract one cell_data component from each Cell_Data cell_set


group DVextr_cell_comp {
Mesh+Cell_Data+Iparam ∈
int+Iparam comp;
int+nres+nonotify dim => in.ncell_sets;
group+nonotify out_data[dim] {
int+nres ncells => in.cell_set[index_of(out_data)].ncells;
int ncell_data=1;
group+nres &cell_data =>
{in.cell_set[index_of(out_data)].cell_data[comp]};
};
group+nonotify out_sets[dim] {
group+nres &out_set => merge(out_data[index_of(out_sets)],
in.cell_set[index_of(out_sets)]);
};
Cells+Cell_Data+Oparam out_cd {
*cell_set[];
ncell_sets => array_size(cell_set);
};
Mesh+Oparam &out =>merge(out_cd, in);
method+notify_val+notify_inst upd_extr_cell_comp = "extr_cell_comp";
};

Description

DVextr_cell_comp extracts one cell_data component from each Cell_Data cell_set. If there are multiple Cell_Data cell_sets, the same component is extracted from each cell_set. DVextr_cell_comp is the cell data equivalent of DVextract_comp for node data.

Since the renderer draws just the first component it finds in each cell_set, you use DVextr_cell_comp to obtain the right component from a multi-component Cell_Data field.

Input

&in

A reference to a field that contains a Mesh and Cell_Data.

comp

An integer that specifies which component (0-n) to extract. This is often obtained from a combination of a UIradioBoxLabels and the DVcell_data_labels base module.

Output

&out

The output is a reference to a merged object that contains the new Cell_Data, plus references to all other unchanged objects in the input Mesh.

Files

v/dproc.c
modules/extr_cll.c

Example

Libraries.Main.Filters.extract_cell_component
v/modules.v

See also