hm_getelemcheckelems

Returns the elements from within a selection that match the specified element check criteria.

Syntax

hm_getelemcheckelems mark_id dimension check_type check_mode ?threshold? ?tolerance? ?time_failure?

Type

HyperMesh Tcl Query

Description

This command returns the elements that match the specified element check criteria. Only the elements on mark_id and of the specified dimension are considered when determining which elements match the specified criteria.

Inputs

mark_id
The ID of the mark containing the elements. Valid values are 1 and 2.
dimension
The dimension of the elements on mark_id to consider. Valid values are:
1 – 1D elements
2 – 2D elements
3 – 3D elements
If no elements of the specified dimension are on mark_id, an error is returned.
check_type
The type of element check to return the bounds from. The allowable values depend on the dimension specified:
dimension = 1:
  • length
  • timestep
dimension = 2:
  • addedmass
  • aspect
  • cellsquish
  • chordaldev
  • equiskew
  • jacobian
  • length
  • maxinterangle
  • maxlength
  • mininterangle
  • minlength
  • skew
  • taper
  • timestep
  • volumeareaskew
  • warpage
dimension = 3:
  • addedmass
  • altitudeaspect
  • aspect
  • cellsquish
  • equiskew
  • jacobian
  • length
  • maxinterangle
  • maxlength
  • mininterangle
  • minlength
  • ortho_3d
  • size_ratio_3d
  • skew
  • tetracollapse
  • timestep
  • volumeareaskew
  • volumetricskew
  • warpage
check_mode
The type of element check to perform. Valid values are:
above – return the entity IDs that are above the specified threshold value of the check_type from the elements on mark_id of the specified dimension.
below – return the entity IDs that are below the specified threshold value of the check_type from the elements on mark_id of the specified dimension.
exact – return the entity IDs that have the specified threshold value (within tolerance) of the check_type from the elements on mark_id of the specified dimension.
max – return the entity ID(s) that have the maximum value of the check_type from the elements on mark_id of the specified dimension.
min – return the entity ID(s) that have the minimum value of the check_type from the elements on mark_id of the specified dimension.
threshold
The threshold value to use when check_mode is set to above, below or exact. This is ignored and not required when check_mode is set to max or min
tolerance
The tolerance value to use when check_mode is set exact. This is ignored and not required when check_mode is set to max, min, above or below.
?time_failure?
The value to use as a threshold beyond which the input elements should be considered to have failed the test. This is required only when check_type is set to addedmass.

Examples

To get the 1D elements that have the minimum length from the elements in comp1:

*createmark elems 1 "by collector name" comp1
set elems [hm_getelemcheckelems 1 1 length min]

To get the 2D elements that have the maximum warpage from the displayed elements:

*createmark elems 1 displayed
set elems [hm_getelemcheckelems 1 2 warpage max]

To get the 2D elements that have a warpage above 5.0 from the displayed elements:

*createmark elems 1 displayed
set elems [hm_getelemcheckelems 1 2 warpage above 5.0]

To get the 3D elements that have a tetracollapse below 0.1 from all elements:

*createmark elems 1 all
set elems [hm_getelemcheckelems 1 3 tetracollapse below 0.1]

To get the 3D elements that have a jacobian of exactly 1.0 from all elements, with a tolerance of 0.01:

*createmark elems 1 all
set elems [hm_getelemcheckelems 1 3 jacobian exact 1.0 0.01]

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10.0

2019 - Added new check_type values minlength and maxlength for both 2D and 3D, and ortho_3d and size_ratio_3d for 3D.