Model.hm_detectmeshpatterns#
- Model.hm_detectmeshpatterns(input_collection, output_collection, define_topology_by_1d=1, detect_singularity=1, smoothness=1, threshold_index=0.5, tria_cluster=1, tria_on_edge=1)#
Evaluates mesh patterns and connectivities on an input quad/mixed mesh, and output problem elements onto a collection. Problem areas include singularities, triangle clusters, triangles on edges, unsmooth local connections etc…
The evaluation can be controlled by the listed <name>=<value> options. If no options are explicitly specified, all of them will be turned on by default. If any options are explicitly turned on, only those specific options will be considered. If any options are explicitly turned off, the other options will still be on. The options may be given in any order.
- Parameters:
input_collection (Collection) – The collection containing the input element entities.
output_collection (Collection) – The collection containing the output element entities.
define_topology_by_1d (int) –
1 - Use 1D elements as topology for defining faces (default)
0 - Treat input elements as a single face
detect_singularity (int) –
0 - Do not detect singularities in terms of mesh flow
1 - Detect singularities in terms of mesh flow, including surrounding elements (default)
smoothness (int) –
0 - Do not consider smoothness between elements
1 - Calculate smoothness between connected elements (default)
threshold_index (double) – The threshold value of the quality index used to find problem elements. Must be between 0.0 and 1.0, default 0.5. This helps to capture local flow perturbation caused by bad smoothness.
tria_cluster (int) –
0 - Do not consider tria clusters
1 - Consider tria clusters (those with multiple trias patched together)
tria_on_edge (int) –
0 - Do not consider trias on boundary edges
1 - Consider trias on boundary edges (default)
- Returns:
hwReturnStatus- Status object
Example#
Find all elements with bad connections ( singularities , triangle clusters etc ) except triangles on edges#import hm import hm.entities as ent model = hm.Model() model.hm_detectmeshpatterns( input_collection=hm.Collection(model, ent.Element), output_collection=hm.Collection(model, ent.Element, populate=False), tria_on_edge=0)