TOC PREV NEXT INDEX

DVmagnitude

Synopsis

calculate the magnitude of a vector field

module DVmagnitude {
int+IPort2 component = 0;
Mesh+Node_Data+IPort2 ∈
Node_Data out_nd {
nnodes => in.nnodes;
nnode_data = 1;
node_data {
veclen+nres = 1;
values+nres => cache(magnitude(in.node_data[component].values));
null_flag+nres => in.node_data[component].null_flag;
null_value+nres => in.node_data[component].null_value;
&min => in.node_data[component].min;
&max => in.node_data[component].max;
labels+nres = "magnitude_update";
};
};
Mesh+Node_Data+OPort2 &out => merge(out_nd,in);
};

Description

DVmagnitude calculates the magnitude of a vector field.

Input

component

An integer. Selects which component of the input field to use in the magnitude calculation. The component should contain 1, 2, or 3 vector subcomponents. The default is the first (0th) component.

&in

The input is a reference to a field with any mesh and Node_Data.

Output

&out

The output is a reference to the merge of the new magnitude Node_Data, plus a reference to the original input mesh. The new Node_Data has the same extents and null data is the input, but contains just one scalar component that is the magnitude, plus the label "magnitude".

#Algorithm

The equation used to compute the magnitude is:{bmc \Help_dev\R982RefPages\RefpageWorking\DV\WINHELP\FH794040.tmp}where a1, a2, etc. are the individual vector subcomponents within the selected component.

Example

Libraries.Main.Filters.magnitude

File

v/dv.v

See also

DVcurl
DVdivrg
DVgrad

TOC PREV NEXT INDEX