-
Notifications
You must be signed in to change notification settings - Fork 37
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 local face fields #868
Conversation
…FillGhost or WithFluxes
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.
This is cool! A few questions/nitpicks below.
@lroberts36 Just to let you know, I'm getting through a review of this PR, best bet I'll be able to finish it tomorrow |
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.
Looks good so far. I have a few questions relating to feature directions:
-
Right now the different faces, edges, are packaged into one array, which means some wasted space. Does the outward facing interface have room to separate out those arrays in case we want to do internal code surgery to save that space?
-
I can see a few useful operations that might go into Parthenon to help with topological elements -- interpolating from faces to cells and vice versa, Curls on faces to cell centers, etc. I think we should get those into Parthenon rather than downstream codes.
WIth one approval from LANL and one from AthenaPK, are we good to merge this? |
I think so, but let's wait til the next Parthenon meeting. |
I think it shouldn't be too hard to switch to having no wasted space, but at the expense of three times as many allocations.
I think things like curls, etc. should maybe go into |
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.
As I said I've been using this for a while without problems -- or at least, without problems caused by this code.
Debug builds were my friend when moving to face-centered variables, even for non-segfault issues. I like them and I think we should push them at users more aggressively as the solution to a broad range of bugs, not just segfaults and bounds errors.
PR Summary
This PR starts to implement face, edge, and nodal variables. Specifically, it makes the changes required within the
Variable
andMetadata
classes to allowVariable
s to store any type of field and allows these types of variables to be included in packs (both legacy and sparse packs). It does not deal with any non-block local operations on these types of variables (e.g. boundary communication, prolongation, restriction), mainly to keep the PR small. This borrows heavily from #764 and is built on #867. Please review #867 first if you haven't already.Todo:
Metadata
and allocateVariable
data and coarse data based on these shapes.ParArray6D
s toParArrayND
s so we can add an extra index for indexing the face.PR Checklist