********************************************************** * * interpolate_mesh_to_points.lgi * version 1.0 * July 2006 * * This LaGriT control file will interpolate node attributes from * a source mesh (INPUT_AVS) onto a point distribution (sink mesh) defined * within this script (sink mesh). * * Carl Gable * gable@lanl.gov * ********************************************************** * BEGIN Set user controled variables. ********************************************************** * infile user_control_variables.lgi * *********************************************************** * END Set user controled variables. ********************************************************** * * Read in the source mesh. * read / avs / INPUT_AVS / cmo_src cmo setatt cmo_src imt 1 0 0 / 1 * * Create the mesh data structure to hold the points * cmo / create / cmo_sink * * Create the sink point distribution. * createpts / xyz / NX_POINTS NY_POINTS NZ_POINTS & XMIN_PTS YMIN_PTS ZMIN_PTS & XMAX_PTS YMAX_PTS ZMAX_PTS & 1 1 1 * * Print to the screen the min/max xyz coordinates of the source mesh and * the sink point distribution. * cmo / printatt / cmo_sink / -xyz- / minmax cmo / printatt / cmo_src / -xyz- / minmax * * Add attributes to the sink mesh. * cmo / addatt / cmo_sink / ATTRIBUTE1 / vdouble / scalar / nnodes cmo / addatt / cmo_sink / ATTRIBUTE2 / vdouble / scalar / nnodes cmo / addatt / cmo_sink / ATTRIBUTE3 / vdouble / scalar / nnodes * * Interpolate node attributes from cmo_src to points in cmo_sink * The source mesh can be any of the element types: * triangle, quadralateral, tetrahedra, prism, pyramide, hexahedra * (tri, quad, tet, pri, pyr, hex) * * The interpolation method will be linear. A quad will be treated a * 4 triangles with a point added at the median point, a prism will * be treated as 3 tets with no point addition, a hex will be treated * as 24 tets with points added to the median point of the element and * points added to the median point of each of the six faces. * interpolate / continuous / cmo_sink / ATTRIBUTE1 / 1 0 0 / & cmo_src / ATTRIBUTE1 / IF_OUTSIDE_FLAG keepatt interpolate / continuous / cmo_sink / ATTRIBUTE2 / 1 0 0 / & cmo_src / ATTRIBUTE2 / IF_OUTSIDE_FLAG keepatt interpolate / continuous / cmo_sink / ATTRIBUTE3 / 1 0 0 / & cmo_src / ATTRIBUTE3 IF_OUTSIDE_FLAG * * Turn off output of some default attributes. * cmo/modatt/cmo_sink/ imt /ioflag/l cmo/modatt/cmo_sink/ itp /ioflag/l cmo modatt cmo_sink/ isn /ioflag/l cmo modatt cmo_sink/ icr /ioflag/l cmo / printatt / cmo_sink / ATTRIBUTE1 / minmax cmo / printatt / cmo_sink / ATTRIBUTE2 / minmax cmo / printatt / cmo_sink / ATTRIBUTE3 / minmax dump / avs / OUTPUT_AVS / cmo_sink dump / gmv / OUTPUT_GMV / cmo_sink / ascii cmo / addatt / cmo_sink / xcoord / vdouble / scalar / nnodes cmo / addatt / cmo_sink / ycoord / vdouble / scalar / nnodes cmo / addatt / cmo_sink / zcoord / vdouble / scalar / nnodes cmo / copyatt / cmo_sink / cmo_sink / xcoord / xic cmo / copyatt / cmo_sink / cmo_sink / ycoord / yic cmo / copyatt / cmo_sink / cmo_sink / zcoord / zic dump / avs2 / OUTPUT_TAB / cmo_sink / 0 0 1 0 * cmo / delete / cmo_src cmo / delete / cmo_sink finish