![]() |
![]() |
![]() |
![]() |
DVaverage_coord
Synopsis
average the coordinates between two meshes
module DVaverage_coord {
Mesh+Node_Data+IPort2 &in1;
Mesh+Node_Data+IPort2 &in2;
float+IPort2 t=0.5;
Grid+Xform out_grid {
nnodes => in1.nnodes;
nspace => in1.nspace;
&xform => in1.xform;
int npoints => nnodes;
float points[nnodes][nspace];
coordinates {
values+nres => (1-t)*in1.coordinates.values
+t*in2.coordinates.values ;
};
};
Mesh+Node_Data+OPort2 &out
=> merge(out_grid, in1);
};Description
DVaverage_coord takes the meshes of two input fields and produces an output field whose Grid equals: (1-t) * in1.coordinates.values + t * in2.coordinates.values where t is a user-settable value. Its Node_Data is that of the first input field..
Input
References to two input fields containing any type of mesh and Node_Data. The nnodes and nspace of the two meshes should be equal.
Output
The output is a reference to a merged object that contains the new Grid, plus a reference to all the non-Grid portions of &in1.
Example
File
See Also
![]() |
![]() |
![]() |
![]() |