DVthreshold_cell


Synopsis

threshold cell-based data


module DVthreshold_cell { /* sets NULL data for all values below and/or
above min/max threshold level(s) */
Mesh+Cell_Data+Iparam &in { /* input field */
nnodes+req;
};
int+Iparam check_vector;
int+Iparam check_comp;
int+Iparam thresh_vector;
int+Iparam below; /* toggle to turn on lower thresholding */
int+Iparam above; /* toggle to turn on upper thresholding */
float+Iparam min_value; /* lower threshold value */
float+Iparam max_value; /* upper threshold value */
float+Iparam null_value; /* value to set when data is out of range */

int dim => in.ncell_sets;
group+nonotify out_data[dim] {
int ncells => in.cell_set[index_of(out_data)].ncells;
int ncell_data=1;
Data_Array cell_data[ncell_data] {
nvals => ncells;
};
};
group+nonotify out_sets[dim] {
group &out_set => merge(out_data[index_of(out_sets)],
in.cell_set[index_of(out_sets)]);
};
Cells+Cell_Data+nonotify+write out_cd {
*cell_set[];
ncell_sets => array_size(cell_set);
};
Mesh+OPort2+nonotify &out =>merge(out_cd, in);
method+notify_val+notify_inst upd_data_math<status=1> =
"DVthreshold_cell";
};

 

Description

DVthreshold_cell sets the values of a given component of a cell-based data set to the null value if the value of another component (usually the same one) is above or below a given threshold.

Input Ports

in

Mesh+Cell_Data. The cell data set to be thresholded.

check_vector

int. Selects which component to check. If this component exceeds the threshold(s) at some node, the value of the threshold_component at that node is set to the null data value.

check_comp

int. If the selected component is a vector, this selects which element of that vector to threshold. If the selected component is scalar, this value is ignored.

thresh_vector

int. Selects which component to threshold, based on the value of "check_comp."

below

int. When set (nonzero), values below the selected min value are set to the null value.

above

int. When set (nonzero), values above the selected max value are set to the null value.

min_value

float. The min value to check against.

max_value

float. The max value to check against.

null_value

float. The value to use in the output as the null value. Select a value for this which does not occur in the input data set.

Output Ports

out

The thresholded data set.

Example

Libraries.Main.Mappers.threshold_cell

File

v/dv.v

See also

Related modules