Skip to content

Commit

Permalink
Use create_xi_reference_jacobian_determinant_field in getLowestElemen…
Browse files Browse the repository at this point in the history
…tJacobian.
  • Loading branch information
hsorby committed Feb 13, 2025
1 parent dd2f337 commit 9556aad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scaffoldfitter/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

from cmlibs.maths.vectorops import add, mult, sub
from cmlibs.utils.zinc.field import assignFieldParameters, createFieldFiniteElementClone, getGroupList, \
findOrCreateFieldFiniteElement, findOrCreateFieldStoredMeshLocation, getUniqueFieldName, orphanFieldByName, create_jacobian_determinant_field
findOrCreateFieldFiniteElement, findOrCreateFieldStoredMeshLocation, getUniqueFieldName, orphanFieldByName, \
create_xi_reference_jacobian_determinant_field
from cmlibs.utils.zinc.finiteelement import evaluate_field_nodeset_range, findNodeWithName, get_scalar_field_minimum_in_mesh
from cmlibs.utils.zinc.general import ChangeManager
from cmlibs.utils.zinc.region import write_to_buffer, read_from_buffer
Expand Down Expand Up @@ -863,7 +864,7 @@ def getLowestElementJacobian(self, mesh_group=None):
:return: Element identifier, minimum jacobian value. Values are -1, inf if there is no data or bad fields.
"""
with ChangeManager(self._fieldmodule):
jacobian = create_jacobian_determinant_field(self._modelCoordinatesField)
jacobian = create_xi_reference_jacobian_determinant_field(self._modelCoordinatesField)
result = get_scalar_field_minimum_in_mesh(jacobian, mesh_group)
del jacobian

Expand Down

0 comments on commit 9556aad

Please sign in to comment.