DVcurl


Synopsis

compute the curl of a vector field


group DVcurl {
Mesh+Node_Data+Iparam &in {
nnodes+req;
xform+nonotify;
coordinates.values+req;
};
int+Iparam comp;
Node_Data+write+nonotify out_nd;
Mesh+Node_Data+nonotify+OPort2 &out => merge(out_nd, in);
method+notify_val+notify_inst upd_curl = "curl";
};

Description

DVcurl computes the curl of a vector field with any mesh type.

Input

&in

The input is a reference to a field with any mesh type. The Node_Data must have one or more 3-vector components.

comp

An integer. Sets which component's curl to compute. The selected component must be a 3-vector.

Output

out_nd

This output is a new Node_Data object. It contains one 3-vector float component at each node that represents the curl.

&out

This output is a new object that is the merge of the new out_nd Node_Data plus a reference to the original input field.

Algorithm

The algorithm used to compute the curl in structured meshes is a finite difference approximation based on a central difference scheme. For unstructured meshes, the function is based on the cell shape functions and their derivatives.

In both cases, where the input is the vector function

FH794034.gif  

The equation used to compute the curl is:

 

fh412064.gif  

Files

v/dv.v
modules/curl.c

Example

Libraries.Main.Filters.curl

See also