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 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);