LLNL / conduit

Simplified Data Exchange for HPC Simulations
https://software.llnl.gov/conduit/
Other
207 stars 63 forks source link

Strange normals for braid 3d mixed case #1290

Open JustinPrivitera opened 1 week ago

JustinPrivitera commented 1 week ago

image

On the left is braid mixed 3d with normals plotted in visit. On the right is braid hexes 3d with normals plotted in visit.

This is using the new mixed topo support in the blueprint plugin, which takes a lot of liberties to make things work. Braid mixed 3d uses polyhedral elements as well as hexs and tets. The mixed polyhedral topo support thresholds out polyhedral elements into a new topology and runs them through generate sides, so the problem could be with generate sides. It could also be with braid mixed 3d and the way it is set up. It could also be an artifact of the mesh transforms I do to make things work inside the visit plugin. More investigation is needed.

To make those plots, add an external surface operator and a defer expression operator. Make a vector expression for the normals with point_surface_normal(mixed_mesh) and add that expression to the defer expression operator.

BradWhitlock commented 1 week ago

The PH zone needs to define each face so it is counter-clockwise with respect to that zone. This works fine for the first PH element. The 2nd element to use a face needs to reverse the node ordering when it uses the face for anything or normals for that 2nd element will be wrong. I've run into this, though maybe there's more going on here as you suggested.

BradWhitlock commented 1 week ago

The left image reminds me of VisIt being stupid about mesh lines with PH zones. It looks like you have some non-PH zones that it gets the right mesh lines on and then some PH zones where it omits the mesh lines because of how the original zones logic works. Passing up VTK_POLYHEDRON for the zone eliminates the mesh line problem.