Accessing Mesh Data
To get the number of mesh vertices, use
int model.component(<ctag>).mesh(<tag>).getNumVertex();
To get the coordinates of the mesh vertices, use
double[][] model.component(<ctag>).mesh(<tag>).getVertex();
which gives you a matrix where each column corresponds to a mesh vertex.
To get the element types in the mesh, use
String[] model.component(<ctag>).mesh(<tag>).getTypes();
The following table lists the possible types. See Mesh Element Numbering Conventions for an explanation of each type.
To get the number of elements of a specific type, use
int model.component(<ctag>).mesh(<tag>).getNumElem(type);
To get the elements for a specific type, use
int[][] model.component(<ctag>).mesh(<tag>).getElem(type);
which gives you a matrix where each column contains the mesh vertex indices of an element’s corners.
To get the geometric entity number for the elements of a specific type, use
int[] model.component(<ctag>).mesh(<tag>).getElemEntity(type);
To return the tags of imported mesh selections, use
String[] outputSelection();
The tag for the corresponding selection feature can then be derived by adding component tag and feature tag in front of the mesh selection tag. For example, if a mesh selection feature is imported by a feature imp1 in component comp1, and its tag (returned by the function outputSelection()) is foo, the tag of the selection feature is comp1_imp1_foo.