Mesh Information and Statistics
You can retrieve a variety of mesh information and statistical quantities, such as element quality, the total number of elements, the total mesh volume, and so on. The figure below shows part of an application displaying such information.
Assuming that you would like to link the various mesh quantities to variables declared under the
Declarations
node, the corresponding method code would include the following lines of code:
a = model.component("comp1").mesh("mesh1").getNumElem();
b = model.component("comp1").mesh("mesh1").getMinQuality("tet");
c = model.component("comp1").mesh("mesh1").getMeanQuality("tet");
d = model.component("comp1").mesh("mesh1").getMinVolume("tet");
e = model.component("comp1").mesh("mesh1").getVolume("tet");
For more information on available mesh quantities, see the
COMSOL Multiphysics Programming Reference Manual
.