extract a subset of a structured field
group DVcrop {
Mesh_Struct+Node_Data+Iparam &in {
xform+nonotify;
nnodes+req;
};
int+Iparam min[in.ndim];
int+Iparam max[in.ndim];
Mesh_Struct+Node_Data+Oparam out{
&xform<weight=-1> => in.xform;
};
method+notify_val+notify_inst upd_crop = "crop";
} ;
DVcrop_struct reduces the size of a structured field (mesh type Mesh_Struct) by extracting the data within a specified range of its dimensions. The process is analogous to "cropping" a photographic image. Typical uses are to eliminate uninteresting portions of the data and to increase processing speed by reducing the amount of data.
A reference to an input that contains a Mesh_Struct and Node_Data. Mesh_Unif and Mesh_Rect will be accepted, but may not produce correct results. (Use DVcrop_rect and DVcrop_unif instead.)
Integers. These are references to 1D arrays that will hold the minimum and maximum X (Y, and Z) coordinates for the cropping operation. The arrays take their length from the ndim of the input Grid_Struct, i.e., a 1D mesh needs only 1 array element to specify X min and max coordinates, a 2D mesh needs 2 array elements for X and Y, etc.
The output field contains a new Mesh_Struct. The output field also contains a new Node_Data associated with the cropped region, and a reference to the input field's xform.