DVinterp_data
Synopsis
use coordinates from a probe mesh as sample points to interpolate data in a field
module DVinterp_data { /* uses data from the first field to interpolate
data at locations of the second field */
Mesh+Node_Data+Iparam &in { /* input field */
nnodes+req;
coordinates+req;
coordinates.values+req;
};
Mesh+Iparam &probe { /* field grid */
nnodes+req;
coordinates+req;
coordinates.values+req;
};
int+Iparam comps[];
Node_Data+write+nonotify out_nd; /* output field */
Mesh+Node_Data+nonotify+OPort2 &out => merge(out_nd, probe);
method+notify_val+notify_inst interp_data_update<status=1>
= "DVinterp_data_update";
};
Description
DVinterp_data uses the coordinates specified in an input mesh (in_probe) as a set of sample points for a field. It takes each set of coordinates in the mesh (the sample points), locates these same coordinates in the input field, then calculates what the interpolated data value of the selected scalar component would be at that exact location based on the values of the same component in the adjacent nodes.
Input
&in
A reference to a field with any mesh type and Node_Data. The Node_Data's first component will be used. It must be scalar.
&probe
A reference to any mesh whose coordinates represent the sample points. To create this sampling mesh you could, for example, use the plane object in Geometries.plane or the DVslice module.
comps[]
An integer array. Each array value is the number (from 0 up) of a component to interpolate. The specified component must be scalar. For example:(a, b, c, [e, f, g]) --> set map_comp = {0, 2} --> (a, c)causes a and c to be interpolated and sent to the output field.Note that this array is not explicitly dimensioned. It is a variable-length array that will have as many values as you assign to it with the = { n, n, n,...n} notation. The supplied AVS/Express modules that use DVinterp_data implicitly set the dimension to 1 by specifying map_comp = {0}, i.e., the user can specify any one component to send to the output field, and the default is the first (0th) component.
Output
out_nd
This output is a new Node_Data object that contains the interpolated data values at the mesh nodes.
&out
The output is a reference to a new object that is the merge of a new Node_Data out_nd, and a reference to the probe's unstructured mesh. That is, it is a reference to the interpolated data values at the mesh nodes, plus that mesh.
Algorithm
Structured fields use trilinear interpolation. Unstructured fields use shape function interpolation.
Example
Libraries.Main.Mappers.interp_data Libraries.Main.Mappers.probe
File
v/dv.v
modules/int_data.cUtility DVM macrosDVMinterp_param, InterpTxt3D
See also