Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poly2TriMeshGenerator, upgraded and rebased #21800

Merged
merged 73 commits into from Sep 16, 2022

Conversation

roystgnr
Copy link
Contributor

@roystgnr roystgnr commented Aug 8, 2022

Reason

This is now both sufficient and necessary to close #20192; Rocstar's stuff isn't going to be integrated in the near term, for sure.

Design

PolyLineMeshGenerator gives us the ability to specify arbitrary boundary loops, then Poly2TriMeshGenerator lets us triangulate boundaries specified by those loops (or by the boundary of some input 2D Mesh), with optional holes (that can either be left unfilled or can be stitched to the mesh defining them) defined by other input meshes, with various options for mesh and/or boundary refinement and for mesh smoothing.

Impact

This adds two new mesh generators, along with tests and documentation.

Along the way I added input file support for vector parameters, and fixed a typo in the doc I was using as an example for how to write MOOSE docs. DistributedMesh support for StitchedMeshGenerator is also in here.

This obsoletes #21303. The main changes since then are in the checklist there.

@roystgnr roystgnr mentioned this pull request Aug 8, 2022
@roystgnr roystgnr force-pushed the mesh_generators_distributed branch 3 times, most recently from 04e81b7 to 816b8b5 Compare August 8, 2022 21:56
@moosebuild
Copy link
Contributor

moosebuild commented Aug 8, 2022

Job Documentation on bac2360 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Aug 9, 2022

Job Coverage on bac2360 wanted to post the following:

Framework coverage

03cebc #21800 bac236
Total Total +/- New
Rate 84.19% 84.21% +0.02% 94.17%
Hits 79087 79308 +221 226
Misses 14856 14870 +14 14

Diff coverage report

Full coverage report

Modules coverage

Coverage did not change

Full coverage reports

Reports

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

Job End user mac on 816b8b5 : invalidated by @milljm

Old packages were pulled by mistake

@roystgnr
Copy link
Contributor Author

roystgnr commented Aug 9, 2022

Looks like this might be an real exodiff on Mac. I've been afraid of this potentially happening for a while, trying to avoid cases where there are multiple valid Delaunay triangulations of a test case, but looks like something of that sort caught up with me.

@GiudGiud
Copy link
Contributor

GiudGiud commented Sep 1, 2022

lemme know when/if you want my eyes on this

@roystgnr
Copy link
Contributor Author

roystgnr commented Sep 2, 2022

I'd appreciate that, thanks! I committed the responses to Logan's concerns last week, but he's a bit busy lately, and in any case the more eyes the better.

@roystgnr
Copy link
Contributor Author

roystgnr commented Sep 2, 2022

... and apparently it needs more attention from my eyes too. I've now discovered that, just because a feature has test coverage for bugs in libMesh and has an interface here doesn't mean the interface doesn't have bugs. I'll fix that, and scan the code coverage misses for anything else important I'm not hitting.

@YaqiWang
Copy link
Contributor

YaqiWang commented Sep 2, 2022

I was check the doc of this mesh generator and noticed this:
Screen Shot 2022-09-02 at 5 10 33 PM
There is a space before/after 2 in the name.

@roystgnr
Copy link
Contributor Author

roystgnr commented Sep 2, 2022

There is a space before/after 2 in the name.

Right!

If you know anyone who can fix it, just about every number in https://mooseframework.inl.gov/source/index.html gets rendered with the same bug.

In this case, though, for reasons discussed in the previous PR, Poly2TriMeshGenerator shouldn't be the final name, it's just a placeholder until we have a final decision on something better. I'm currently leaning towards XYDelaunayGenerator, but open to other suggestions+opinions.

@YaqiWang
Copy link
Contributor

YaqiWang commented Sep 2, 2022

So, @roystgnr this is indeed doing triangulation? I am very excited about this capability. What triangulator is this using?

@roystgnr
Copy link
Contributor Author

roystgnr commented Sep 2, 2022

Poly2Tri does the initial triangulation; all the triangulation refinement code is my own ... and the result gets handed back to Poly2Tri before the user sees it, just in case I've made a mistake and come up with something non-Delaunay.

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes. Also please move the images to large_media

framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
framework/src/meshgenerators/Poly2TriMeshGenerator.C Outdated Show resolved Hide resolved
roystgnr added a commit to roystgnr/large_media that referenced this pull request Sep 6, 2022
This avoids libMesh misidentifying a conflict when desired_area_func is
set.
We should probably support stitching in 1D, but that'd be a major
change.
Poly2Tri was flexible enough to handle either ordering, but the libMesh
hole boundary refinement code wasn't.
@moosebuild
Copy link
Contributor

Job Precheck on ca4e811 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/21800/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format 7e8e791a29c7fbfb347afee4b91998030b4278b4

Thanks to Logan for catching these.
Thanks to Yaqi for prompting this
Just to make sure something screams if that option is ever mistakenly
removed.
Didn't realize I'd missed this one until I was double-checking Logan's
suggestions before resolving them.
Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cat-jam-cat

@roystgnr roystgnr merged commit a9629f4 into idaholab:next Sep 16, 2022
@roystgnr roystgnr deleted the mesh_generators_distributed branch September 16, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement or Add a open-source 2D native Delaunay Triangulator
5 participants