Skip to content

Add transient_ex3 example demonstrating explicit DG/FV formulation of 2D advection equation #4073

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

Merged
merged 11 commits into from
Feb 12, 2025

Conversation

jwpeterson
Copy link
Member

@jwpeterson jwpeterson commented Feb 7, 2025

This example is based on code originally written by @dknez for a class on numerical methods. We do have a DG example (misc_ex5) but it is for an elliptic equation and may or may not support "finite volume" mode (i.e. running with (CONSTANT, MONOMIAL) FEs), but the present example does allow this. This example also lets us demonstrate one way of implementing an explicit timestepping discretization in libmesh, which I'm not sure we have currently. The example runs very fast and gives consistent output for me in both serial and parallel, so it will not add appreciably to test times and shouldn't give us a bunch of test failures.

@jwpeterson
Copy link
Member Author

jwpeterson commented Feb 10, 2025

The failure in the "Test MOOSE ARM mac" recipe:

[0.033s]     FAIL meshgenerators/break_mesh_by_block_generator.hanging_nodes FAILED (CRASH) [min_cpus=12]

is unrelated to this new example.

@moosebuild
Copy link

moosebuild commented Feb 10, 2025

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

Coverage

075f8b #4073 24a5ac
Total Total +/- New
Rate 62.51% 62.51% +0.00% -
Hits 72989 72992 +3 0
Misses 43774 43771 -3 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@jwpeterson jwpeterson requested a review from roystgnr February 11, 2025 14:36
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 can fix up the to-be-deprecated calls after rebasing #4074 later if needed.

Comment on lines 23 to 29
// Allocate NumericVectors in _Fh. I could not figure out
// how to do this in the initialization list, I don't think it's
// possible.
// TODO: the number of problem dimensions is hard-coded here, we should
// make this depend on the input file parameters instead.
for (unsigned int i=0; i<2; ++i)
_Fh.push_back(NumericVector<Number>::build(es.comm()));
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to postpone this until init_data()?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that makes sense. I did the update in 05ef170 and likewise for the extra SparseMatrices in
24a5ac0.

Comment on lines 485 to 490
FEInterface::inverse_map(
elem->dim(),
fe_type,
neighbor,
qface_points,
qface_neighbor_points);
Copy link
Member

Choose a reason for hiding this comment

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

Could we switch this to FEMap::inverse_map(), in preparation for #4074?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in 9e2be1a

Comment on lines 655 to 660
FEInterface::inverse_map(
elem->dim(),
fe_type,
neighbor,
qface_points,
qface_neighbor_points);
Copy link
Member

Choose a reason for hiding this comment

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

Likewise for FEMap::inverse_map here

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in 9e2be1a

@jwpeterson
Copy link
Member Author

The MOOSE compilation failures here are due to idaholab/moose@08c5990, and don't have anything to do with this PR.

@jwpeterson jwpeterson merged commit ae7b885 into libMesh:devel Feb 12, 2025
13 of 20 checks passed
@jwpeterson jwpeterson deleted the transient_ex3 branch February 12, 2025 02:22
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.

None yet

3 participants