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

handle case when non-identity and no flux term #683

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

mkstoyanov
Copy link
Collaborator

@stefan-schnake

The flux term should always be at position 0 in the active_terms as this is the one that doesn't get split into upper/lower part. Active term 0 does not require completeness of the hierarchy, the rest of directions can be given in any order.

This fixes the case when we have a term that is a mass term (no flux) but is not identity. We should also double-check the logic in get_flux_direction().

Copy link
Contributor

@stefan-schnake stefan-schnake left a comment

Choose a reason for hiding this comment

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

If were reviewing this now:
pt.coeff_type == coefficient_type::penalty needs to be added to L1199.

Copy link
Contributor

@stefan-schnake stefan-schnake left a comment

Choose a reason for hiding this comment

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

This looks fine. The bug would show itself if we had a term of all masses, but we don't have a PDE that does that (yet). Maybe we should have a test for $u_t + u = \Delta u$.

@mkstoyanov
Copy link
Collaborator Author

@stefan-schnake How does it look now?

@mkstoyanov
Copy link
Collaborator Author

This looks fine. The bug would show itself if we had a term of all masses, but we don't have a PDE that does that (yet). Maybe we should have a test for ut+u=Δu.

True enough, we are missing tests for lots of corner cases. Part of the problem is the clumsy way of adding new PDEs and the need to integrate them into the library as opposed to just having them externally defined.

@stefan-schnake
Copy link
Contributor

BGK includes a mass term, so we'll just wait for that.

@mkstoyanov mkstoyanov merged commit 582c38d into project-asgard:develop Jun 11, 2024
10 of 11 checks passed
@mkstoyanov mkstoyanov deleted the fix_flux_reorder branch June 11, 2024 19:15
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