DVscat_to_tet


Synopsis

convert a scattered grid into triangular or tetrahedral unstructured mesh


group DVscat_to_tet {
Mesh+Node_Data+Iparam &in { /* input field */
nnodes+req;
xform+nonotify;
};
int+Iparam triangle=0;
Cells+write+nonotify out_mesh;
};
Mesh+Node_Data+nonotify+OPort2 &out => merge(out_mesh, in);
method+notify_val+notify_inst upd_scat_to_tet = "scat_to_tet";
};

Description

DVscat_to_tet converts a field with a scattered grid into a triangular or tetrahedral mesh. A "scattered grid" means that there is a structured mesh made up of disconnected nodes in space. An example would be seismic data where the coordinates are the latitude, longitude, (and perhaps elevation) of a sensing station, and the Node_Data is a set of observations. The grid is "scattered" because the data samples are located at arbitrary positions in space, not on any grid.

Fields whose meshes have nspace=2 are always converted to triangular unstructured meshes. nspace=3 meshes are usually converted to tetrahedral unstructured meshes. But, if triangle does not equal 0, they are converted to triangular meshes (2D surface existing in 3-space).

Input

&in

A reference to any mesh with Node_Data.

triangle

An integer. If this flag is 0 and nspace=3, the field is converted to a tetrahedral mesh. If this flag is not 0 and nspace=2 or nspace=3, the field is converted to a triangle mesh.

Output

out_mesh

This output is a new unstructured Mesh object that has been organized into Cells: cell type Tri (for nspace=2 or nspace=3 with triangles on input) or Tet (nspace =3 input).

out

The output is a reference to a merge of the new unstructured Mesh object and the original Node_Data.

Algorithm

DVscat_to_tet uses a proprietary version of the Delauney tesselation algorithm.

Files

v/dv.v
modules/scat_tet.c

Example

Libraries.Main.Mappers.scat_to_tri

See also