Skip to content

Problem with surface normal check + add debugging output of broken elements/faces/normals to _DebugMesh.xdmf #157

Description

@scopplestone

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

pyhope pyhope.ini

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions