trixi-framework / HOHQMesh

High Order Hex-Quad Mesh (HOHQMesh) package to automatically generate all-quadrilateral meshes with high order boundary information.
https://trixi-framework.github.io/HOHQMesh
Other
45 stars 8 forks source link

Symmetrize #99

Closed DavidAKopriva closed 2 weeks ago

DavidAKopriva commented 3 weeks ago

Add capability to take a mesh and reflect it about a (straight line) boundary with the name "symmetry". This should answer the request of some users for a symmetric mesh. TODO: Add example, testing, documentation, and test the mesh files.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 95.05300% with 14 lines in your changes missing coverage. Please review.

Project coverage is 74.88%. Comparing base (80ac66f) to head (6e3e480).

Files Patch % Lines
Source/Project/Model/SMModel.f90 75.60% 10 Missing :warning:
Source/Mesh/MeshGeneratorMethods.f90 97.69% 3 Missing :warning:
Source/HOHQMesh.f90 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #99 +/- ## ========================================== + Coverage 74.19% 74.88% +0.69% ========================================== Files 67 68 +1 Lines 10155 10429 +274 Branches 2 2 ========================================== + Hits 7534 7810 +276 + Misses 2621 2619 -2 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/HOHQMesh/pull/99/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trixi-framework/HOHQMesh/pull/99/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `74.88% <95.05%> (+0.69%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DavidAKopriva commented 2 weeks ago

I've updated everything I can think of. One thing especially open for discussion is that I append "R" to a boundary name on the reflected portion of the mesh. I guess if one does not want that, it's a quick search/replace (maybe) in the file. Maybe something else truly unique would be better ? "#R?

DavidAKopriva commented 2 weeks ago

No, there's nothing that you have to do. Just call at least one of the boundary curves "symmetry" when you are generating a model and off it will go. (Hey, this might be a way to define an interior boundary! If one of the curves along a line is called symmetry and the others aren't, then the nodes will be duplicated, along those others and the curve names are not deleted. Hmm.) This is what one user was asking for at one point. This does work, but messages saying that there are duplicate nodes are posted. That's OK, because one expects that to happen. Huh.

andrewwinters5000 commented 2 weeks ago
Reflection