mphmeshstats
Return mesh statistics and mesh data information.
Syntax
stats = mphmeshstats(model)
stats = mphmeshstats(model, meshtag, ...)
[stats,data] = mphmeshstats(model, meshtag, ...)
Description
stats = mphmeshstats(model) returns mesh statistics of the model mesh case in the structure str.
stats = mphmeshstats(model, meshtag, ...) returns mesh statistics of a mesh case meshtag in the structure str.
[stats,data] = mphmeshstats(model, meshtag, ...) returns in addition the mesh data information such as vertex coordinates and definitions of elements in the structure data.
The function mphmeshstats accepts the following property/value pairs:
domain | boundary | edge | point
condition | growth | maxangle | skewness | volcircum | vollength
ctx | edg | tri | quad | tet | pyr | prism | hex
* Selection and Entity properties cannot be set if the data structure is returned.
The output structure stats contains the following fields:
* Provides statistics for the entire selection regardless of the element type property.
The output structure data contains the following fields:
Example
Get the mesh statistics:
model = mphopen('model_tutorial_llmatlab');
model.component('comp1').mesh.run;
stats = mphmeshstats(model)
Show the mesh quality distribution in a figure:
bar(linspace(0,1,20),stats.qualitydistr)
Get the mesh statistics and the mesh data:
[stats,data] = mphmeshstats(model);
Show the element vertices in a plot:
plot3(data.vertex(1,:), data.vertex(2,:), data.vertex(3,:), '.')
axis equal
Get the number of edge element:
numedgeelem = stats.numelem(strcmp(stats.types,'edg'))
See also
mphmesh