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

Add support for meshes and/or vectors with fewer than 3 dimensions #78

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

cmacmackin
Copy link
Collaborator

@cmacmackin cmacmackin commented Feb 3, 2025

Currently Platypus makes all finite element spaces 3D, meaning that 3D meshes must be used. It does not support any situation where either meshes or vectors have fewer than 3 dimensions. This pull request seeks to add support for those cases. It implements a test problem (MFEM example 31) for a 2D mesh. It also adds support for and L2 error post-processor.

A change was made to ensure that mixed bilinear forms are correctly initialised. This was to support an earlier, naive, attempt at a different test case. It is not used in any of the integration tests.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 97.49104% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/problem/MFEMProblem.C 68.18% 7 Missing ⚠️
Files with missing lines Coverage Δ
src/auxkernels/MFEMAuxKernel.C 100.00% <100.00%> (ø)
src/auxkernels/MFEMCurlAux.C 100.00% <100.00%> (ø)
src/auxkernels/MFEMDivAux.C 100.00% <100.00%> (ø)
src/auxkernels/MFEMGradAux.C 100.00% <100.00%> (ø)
src/executioners/MFEMSteady.C 96.29% <100.00%> (+0.06%) ⬆️
src/executioners/MFEMTransient.C 100.00% <100.00%> (ø)
src/fespaces/MFEMFECollection.C 100.00% <100.00%> (ø)
src/fespaces/MFEMFESpace.C 100.00% <100.00%> (ø)
src/kernels/MFEMMixedBilinearFormKernel.C 100.00% <100.00%> (ø)
src/kernels/MFEMMixedScalarCurlKernel.C 100.00% <100.00%> (ø)
... and 11 more

@cmacmackin
Copy link
Collaborator Author

MFEM example 31 used a matrix diffusion coefficient but we haven't yet added support for matrix quantities to Platypus. This seems like something it would be best to think about a bit, rather than rush into. As such, I've decided against using that test problem in this PR.

Instead I decided to merge in #55, so that I can solve the irrotational vortex problem using a velocity potential field, then use an AuxKernel to take the grad of the potential to get the velocity. This test works and demonstrates the use of 2D vectors in 2D space.

This PR will be ready for review once #55 has been merged into main.

@cmacmackin
Copy link
Collaborator Author

CodeCov is complaining because the stuff I added to MFEMProblem to handle mixed bilinear forms isn't being tested. I'm not too concerned about this, but if it is considered important then someone can try adding an additional integration test that will be covered it (I'm not sure I'd have the expertise).

@alexanderianblair
Copy link
Contributor

CodeCov is complaining because the stuff I added to MFEMProblem to handle mixed bilinear forms isn't being tested. I'm not too concerned about this, but if it is considered important then someone can try adding an additional integration test that will be covered it (I'm not sure I'd have the expertise).

I'm happy with this, since @bryceshirley is currently writing a mixed form test for the Darcy problem anyway and these additions will certainly help with that.

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.

2 participants