Overview
Certain deformed linear meshes with bad Jacobians can trigger the check_orientation method to report broken elements, which is only due to the calculation procedure of determining the tangential and normal vectors of the element faces.
Furthermore, the debugging process of visualizing the "broken" elements is cumbersome and in the case of using meshScale != 1, the output of the element global index is wrong, because the element sorting changes the IDs.
Proposals
- Replace the check in
mesh_orient.py with the one used in basis_watertight.py (eval_nsurf)
- Extend the error output by additionally adding the "broken" elements and/or faces and/or tangential/normal vectors to the
_DebugMesh.xdmf for better visualization (maybe by simply using the meshio.msh(...) method
- idea: IO debug (
NGeo=1) for vol/surf in _DebugMesh.xdmf as a 3rd container for broken elements
- if an element is an error elements, show as solid?
- Move the check behind the element sorting algorithm so the reported element IDs of the broken elements are correct
Reproduction of the error
Download the three files and run
for file in ./*.txt; do mv "$file" "${file%.txt}"; done
Create the msh file with gmsh
gmsh 70degCone_3D_model.geo -parse_and_exit
run pyhope
Deactivate Mesh.OptimizeNetgen = 1 to change the output of gmsh, which prevents the error from being triggered.
Deactivate the check in pyhope via CheckSurfaceNormals = F to skip the check entirely.
pyhope.ini.txt
70degCone_3D_model.step.txt
70degCone_3D_model.geo.txt
Overview
Certain deformed linear meshes with bad Jacobians can trigger the
check_orientationmethod to report broken elements, which is only due to the calculation procedure of determining the tangential and normal vectors of the element faces.Furthermore, the debugging process of visualizing the "broken" elements is cumbersome and in the case of using
meshScale != 1, the output of the element global index is wrong, because the element sorting changes the IDs.Proposals
mesh_orient.pywith the one used inbasis_watertight.py(eval_nsurf)_DebugMesh.xdmffor better visualization (maybe by simply using themeshio.msh(...)methodNGeo=1) for vol/surf in_DebugMesh.xdmfas a 3rd container for broken elementsReproduction of the error
Download the three files and run
Create the
mshfile withgmshrun
pyhopeDeactivate
Mesh.OptimizeNetgen = 1to change the output ofgmsh, which prevents the error from being triggered.Deactivate the check in
pyhopeviaCheckSurfaceNormals = Fto skip the check entirely.pyhope.ini.txt
70degCone_3D_model.step.txt
70degCone_3D_model.geo.txt