-
Notifications
You must be signed in to change notification settings - Fork 575
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
WIP: Panzer Owned and Ghosted GlobalEvaluationData Changes #1521
Conversation
Including @ssmabuza on the discussion. He requests:
Sibu, can we talk this through in the meeting I set up for next Wednesday? I'm afraid I don't see right off the bat how this relates to this PR. |
I would say add it to PureBasis, though I also don't see what it has to do with the PR. |
@ssmabuza Do you have a patch for such a thing (a particularly design and set of members in mind?) This would not be hard to add. |
@eric-c-cyr This is to provide the layout for I'll send you a patch shortly. |
Outcomes from yesterday's code review:
|
@eric-c-cyr, @rppawlo: It looks like we have forward declarations outside the |
The issue with forward declarations will be handled for all of Panzer through #1548. |
|
Moved |
Tests pass. Rebasing on latest Trlinos/develop and DrekarBase/master. |
The ReadOnlyVector_ and WriteVector_GlobalEvaluationData classes now have Kokkos::Views of the owned and ghosted vectors. Previously ghosted vectors contained duplicates of all the information in the owned vectors; now these two vectors are non-overlapping so we avoid data duplication. operator[]() routines were added to the GlobalEvaluationData classes to hide the logic of element access from users. Previously one would call getGhostedVector() on the GlobalEvaluationData and then index into that; now simply index into the GlobalEvaluationData itself. The LinearObjFactory classes were updated with "version 2" routines to build these GlobalEvaluationDatas with non-overlapping owned and ghosted vectors. Eventually the original routines will be replaced by these new ones, but not yet. The Gather*Epetra* classes have been updated to use this new syntax when working with GlobalEvaluationData containers. When dealing with the older EpetraLinearObjContainers, they still use the old way of doing things.
155a638
to
c9475c8
Compare
@eric-c-cyr and @rppawlo, we already did a code review of this refactor a while back, but changes pushed to Drekar required a refactor of the refactor (yay!).
The gist of it is Panzer's
GlobalEvaluationData
classes now haveoperator[]()
andat()
methods which take a local ID and give you the appropriate element of either the owned or ghosted vector. This way the user (in Panzer, Drekar, or elsewhere) doesn't need to know anything about the data being split out under the hood.Should we ditch the
at()
routines? I included them for the sake of completeness and to mimmic the functionality of STL containers, but perhaps the bounds checking should happen inoperator[]()
surrounded by some#ifdef
. Or maybe it already happens if-D Trilinos_ENABLE_DEBUG
since they'reEpetra_Vector
s andThyra::VectorBase
s behind the scenes—is that right?In order to build and test this PR, you'll also need to pull the
panzerGatherScatter
branch fromDrekarBase
.Note that I'll clean up the commit history of this branch before the merge to
develop
. This is just so we can talk it over.