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

Improve support for 2d meshes embedded in 3d space #4064

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from

Conversation

nmnobre
Copy link
Member

@nmnobre nmnobre commented Jan 27, 2025

No description provided.

@moosebuild
Copy link

moosebuild commented Jan 28, 2025

Job Coverage, step Generate coverage on e525e69 wanted to post the following:

Coverage

159f51 #4064 e525e6
Total Total +/- New
Rate 63.22% 63.23% +0.00% 96.30%
Hits 74214 74218 +4 26
Misses 43168 43169 +1 1

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@nmnobre
Copy link
Member Author

nmnobre commented Jan 29, 2025

John (@jwpeterson), Roy (@roystgnr), do we have support for transforming vector functions/solutions (Lagrange, Hierarchical, Monomial) after a mesh transformation?

For instance, FE<3, MONOMIAL_VEC>::shape() exists and gives a vector basis function, but then monomial_vec_nodal_soln() falls back to the scalar basis functions again for some reason? Equipped with the vector function, it'd be easier to formulate 2d problems in 3d. Is the functionality (partially) implemented somewhere - it feels like it must be?

@jwpeterson
Copy link
Member

do we have support for transforming vector functions/solutions (Lagrange, Hierarchical, Monomial) after a mesh transformation?

I don't know the answer to your question for sure, but I fear it's probably "no". If I understand correctly, you are asking about mapping a vector solution from an initial mesh to a stretched/translated version of that same mesh?

@nmnobre
Copy link
Member Author

nmnobre commented Jan 30, 2025

I don't know the answer to your question for sure, but I fear it's probably "no". If I understand correctly, you are asking about mapping a vector solution from an initial mesh to a stretched/translated version of that same mesh?

Yep, or rotated for instance. Because that's the same map we'd need if solving 1d/2d problems in a higher dimensional space. If each dof maps to a vector function, then I can transform that function the same way I transformed the mesh.
If the problem is formulated effectively as 3 scalar variables (whose transformation is just the identity) then I'm guessing the answer is no indeed. But I'm wondering if we could assemble/formulate from 3 vector variables with zeros on the two other components instead. Just like what FE<3, MONOMIAL_VEC>::shape() returns.

@nmnobre nmnobre force-pushed the exp_embedded branch 2 times, most recently from 74cbc69 to 7593ef4 Compare February 4, 2025 01:51
@nmnobre
Copy link
Member Author

nmnobre commented Feb 4, 2025

To answer myself above, I'm now convinced the proper and natural way of supporting Lagrange-like vector FEs embedded in higher dimensional spaces is to change FEGenericBase<RealGradient>::build() to take a vector dimension vdim. That'd imply changing the constructor FE<Dim,T>::FE(), from there the no. of dofs/functions to consider vdim, and from there shape() and derivative friends. It's going to be a bit of work...

So, I suggest we try to converge on a compromise here. It'll be a bit bizarre perhaps, having better support for ND/RT than classical FEs, but it's still a pure addition, with no loss in current functionality. Thoughts?

@nmnobre nmnobre marked this pull request as ready for review March 7, 2025 12:52
Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

I'm still terrified of what happens when we have a curved but not C1 2D manifold in 3D space, but for cases where we're only caring about continuity between coplanar elements this looks great

@roystgnr
Copy link
Member

I'm still terrified of what happens when we have a curved but not C1 2D manifold in 3D space

To be fair: I'm not talking about this PR in particular, I'm talking about a mistake that's easy to make in general that I'd love to protect against somehow but can't figure out how to. In KellyErrorEstimator we have the exact problem I'm worried about: instead of using the normal vectors on both sides of a face to compute flux jumps, we use the normal vectors on one side and just assume that the normals on the opposite side are their negative.

I'll see if I can cook up a unit test that demonstrates that for that case.

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.

4 participants