-
Notifications
You must be signed in to change notification settings - Fork 33
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
Custom refinement ops propagated to fluxes #1100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Glad this worked. Do we want to propogate the exact same refinement functions? Or do we want to create a second set of refinement functions for fluxes? I guess the topological element is always different, so they're always distinguishable?
Yeah the approach we're taking is to have fluxes get the same refinement functions. As you say they are always distinguishable by topological element, and that is a template parameter, so I don't think there is any cost to doing things anyway, and it is compact. If this seems like a bad design choice though lets discuss that here before merge. |
This PR fixes a breaking change for downstream codes needing custom flux correction routines, therefore, we should likely get it in sooner rather than later... One comment for future consideration... If we have a field that is NOT Actually, is |
the answer is yes: parthenon/src/interface/metadata.hpp Line 451 in ff6a943
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I agree that this is a general solution since the restriction operation can choose the method based on the topological element, although in some cases it might be cleaner to allow specifying a separate restriction operation for the flux field.
Nah it's fine. I think as far as user intent goes, maybe a separate function would be clearer. But as far as implementation "cleanliness" it's unclear what the optimal choice is. There's trade-offs. Go ahead and merge this. |
PR Summary
Custom refinement operations enrolled in variable metadata were not being propagated to flux fields if
WithFluxes
was active. This PR addresses that.Note that in this model the refinement operations will need to be able to distinguish between the field and the flux field, presumably by branching based on the
TopologicalElement
.PR Checklist