Model.setelementcheckmethod#

Model.setelementcheckmethod(check_name, method)#

Sets the method (solver) used for calculating specific element quality check parameters which are generally those used by an FE solver. For the available element quality check parameters, their meaning and allowable values for each quality check parameter, see Model.elementchecksettings().

Setting the “solver” parameter to a valid FE solver ID results in setting of the “global” solver mode. This means that most of the element quality checks (aspect_2d, aspect_3d, skew_2d, skew_3d, angle, warpage, taper, chord, tet_collapse, time_step ) are set to use the specified FE solver methods.

Parameters:
  • check_name (hwString) – Specifies the interrogated element quality check parameter. Valid values are angle, aspect_2d, aspect_3d, chord_dev, jacobian_2d, jacobian_3d, min_len_2d, min_len_3d, skew_2d, skew_3d, solver, taper, tetra_collapse, time_step, warpage.

  • method (int) – Specifies the ID of the method to be used for the specified element quality check parameter. See Model.elementchecksettings() for allowable method IDs for specific element quality checks.

Example#

Example of usage of the function applied to 3D Jacobian. The method is temporarily being set to use corner elements points for the Jacobian. After execution, the previous Jacobian method is restored.#
import hm
import hm.entities as ent

model = hm.Model()

integration_points = 0
corner_points_method = 1

_, result = model.hm_getelementcheckmethod(check_name="jacobian_3d")
old_jacobian_method = result.calculationMethod

# Use corner elements points for jacobian
model.setelementcheckmethod(check_name="jacobian_3d", method=corner_points_method)

# Change to old method for jacobian
model.setelementcheckmethod(check_name="jacobian_3d", method=old_jacobian_method)