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

Permit mesh smoothers to move boundary/interface nodes #3385

Open
dschwen opened this issue Aug 30, 2022 · 12 comments · May be fixed by #3399
Open

Permit mesh smoothers to move boundary/interface nodes #3385

dschwen opened this issue Aug 30, 2022 · 12 comments · May be fixed by #3399

Comments

@dschwen
Copy link
Member

dschwen commented Aug 30, 2022

LibMesh mesh smoothers do not touch boundary nodes or nodes at the interface between subdomains. We could allow those nodes to move parallel to the boundary if - for example - the local curvature of the boundary is below a given threshold value.

@dschwen
Copy link
Member Author

dschwen commented Aug 30, 2022

This mesh would benefit greatly from such a change, as node movement along the perfectly straight boundaries would significantly improve element quality.

original2
smoothed2

dschwen added a commit to dschwen/libmesh that referenced this issue Sep 13, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 13, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 13, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 14, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 14, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 14, 2022
@dschwen
Copy link
Member Author

dschwen commented Sep 14, 2022

better

Better but not quite there

dschwen added a commit to dschwen/libmesh that referenced this issue Sep 14, 2022
@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

Here we go!

best

@roystgnr
Copy link
Member

What was going on near the middle corners on that first pic?

@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

What was going on near the middle corners on that first pic?

If only I knew. I reorganized the code to catch some edge cases, and retesting suddenly gave the correct result.

@roystgnr
Copy link
Member

Ha! I shouldn't laugh too hard, though. If we understood all our code as well as we should then I'd be recommending you add new features to the fancy variational smoother rather than the simple Laplace smoother... and I'd have done a much better job on our last set of Exodus upgrades, for that matter.

@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

There is a variational smoother? I could generalize this a bit by making the lambdas base class members...

dschwen added a commit to dschwen/libmesh that referenced this issue Sep 15, 2022
@roystgnr
Copy link
Member

mesh_smoother_vsmoother.h

mesh_smoother_vsmoother.C

Nice fancy mathematics in the underlying thesis+papers, immunity to the failure cases you can see with Laplace, but the code is kind of orphaned; the original author didn't want to open source it at all (out of fear of getting hammered with maintenance requests), and it's never been properly adopted or even thoroughly refactored since, just translated (from Fortran?) to C++ code by Derek and later to C++ idioms by John.

@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

Oh, that even has a mechanism to tag movable boundary nodes. I have this for 2D and 3D, the vsmoother only has it for 2D (and not for subdomain boundaries).

@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

Hm, we're not making the VariationalMeshSmoother available in MOOSE, and after giving it a quick try I might have an idea why:

uhm_what

Fancy maths for the win?

@roystgnr
Copy link
Member

Regressed code, probably. We've never had exodiff tests in libMesh and in hindsight we really should have...

@dschwen
Copy link
Member Author

dschwen commented Sep 15, 2022

It should be pretty straight forward with AD to code up arbitrary element quality metrics, and implement nodal repositioning based on the derivative of the quality metric w.r.t. the nodal positions. E.g. the element Jacobian could be such a metric. That'd be a class of smoothers with well defined underlying maths, too.

dschwen added a commit to dschwen/libmesh that referenced this issue Sep 17, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 17, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 17, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 17, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 17, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 19, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 19, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 19, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 19, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 22, 2022
dschwen added a commit to dschwen/libmesh that referenced this issue Sep 28, 2022
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 a pull request may close this issue.

2 participants