Fix reordering Prisms for ProcessPerAlign
Issue/feature addressed
In NekMesh, process PerAlign sometimes failed because the IDs of the vertices of a prism is badly ordered.
Proposed solution
The function ReorderPrisms() should re-orders the IDs of the vertices of a prism from small to large. In a prism element, when one triangle face is reordered and the other face is wait to be re-ordered, the old way of sorting vertices failed.
Implementation
Use a lambda function to sorting the IDs of the vertices
Tests
Here is the case of a extruded naca. The linear mesh is generated using StarCCM++. Sometimes I got the following error where the orientation of triangles are not consistent. It worked after the fix.
Suggested reviewers
Please suggest any people who would be appropriate to review your code.
Notes
Please add any other information that could be useful for reviewers.
Checklist
-
Functions and classes, or changes to them, are documented. -
User guide/documentation is updated. -
Changelog is updated. -
Suitable tests added for new functionality. -
Contributed code is correctly formatted. (See the contributing guidelines). -
License added to any new files. -
No extraneous files have been added (e.g. compiler output or test data files).
Edited by Jingtian Zhou