Model.elementtestjacobian#

Model.elementtestjacobian(collection, jacobian, outputcollection, dimension, contour, title)#

Tests 2D and 3D elements for whether or not they pass the Jacobian ratio element quality check, and puts those that fail on the specified outputcollection.

Parameters:
  • collection (Collection) – The collection containing the element entities to test.

  • jacobian (double) – The value to use as a threshold beyond which elements should be considered to have failed the test.

  • outputcollection (Collection) – The collection containing the failed element entities.

  • dimension (int) –

    A code telling to measure the dimension of:

    2 - Measure 2D elements.

    4 - Measure 3D elements.

  • contour (int) –

    A code telling if should:

    0 - Display the results of the test normally.

    1 - Display the elements color coded by their ratings.

    2 - Build a histogram showing the distribution of ratings.

  • title (hwString) – The title to label the curve in the histogram.

Example#

Test all displayed elements for a Jacobian ratio value less than 0.7#
import hm
import hm.entities as ent

model = hm.Model()

elems1 = model.CreateCollectionByDisplayed(ent.Element)
elems2 = hm.Collection(model, hm.FilterByEnumeration(ent.Element, ids=hm.hwUIntList([])))

model.elementtestjacobian(
    collection=elems1,
    jacobian=0.7,
    outputcollection=elems2,
    dimension=2,
    contour=0,
    title="2D Element Jacobian"
)

Note

The details of the Jacobian ratio element quality check can be found in the online help for the Check Elements panel.