-
Notifications
You must be signed in to change notification settings - Fork 471
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
Support for custom interpolation procedure using FindPointsGSLIB. #4270
base: master
Are you sure you want to change the base?
Conversation
This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch. |
* For custom interpolation (e.g., evaluating strain rate tensor), we provide | ||
* functions that use gslib to send element index and corresponding | ||
* reference-space coordinates for each point to the mpi rank that the element | ||
* is located on. Then, interpolation can be done locally by the user before |
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.
* is located on. Then, interpolation can be done locally by the user before | |
* is located on. Then, custom interpolation can be defined locally by the user before |
virtual void SendElementsAndCoordinatesToOwningMPIRanks(); | ||
/// Send interpolated values back to the mpi-ranks #recv_proc that had sent | ||
/// the element indices and corresponding reference-space coordinates. | ||
virtual Vector SendInterpolatedValuesBack(Vector &int_vals, int vdim, |
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.
Comment how the int_vals
should be structured. And shouldn't it be const
?
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.
Both Send...
functions send and receive at the same time, maybe Distribute...
is a better name.
virtual const Array<unsigned int> &GetReceivedElem() const | ||
{ return recv_elem; } | ||
/// Get reference coords received due to SendCoordinatesToOwningMPIRanks(). | ||
virtual const Vector &GetReceivedReferencePosition() const |
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.
Comment how the returned Vector
is arranged.
we need a mechanism to first send element indices and reference-space | ||
coordinates to the mpi-ranks where each point is found. Then the custom | ||
interpolation can be done locally by the user before sending the | ||
interpolated values back to the mpi-ranks that the query originated from. |
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.
It would help to describe briefly the usual calling sequence:
FindPoints(...)
SendElementsAndCoordinatesToOwningMPIRanks()
Get...
Get...
...some computation...
SendInterpolatedValuesBack()
/// Upon receiving, the information is stored locally in | ||
/// #recv_elem and #recv_ref (ordered by vdim). Use corresponding getters | ||
/// \ref GetReceivedElem and \ref GetReceivedReferencePosition. | ||
virtual void SendElementsAndCoordinatesToOwningMPIRanks(); |
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.
In this case the received values are stored as internal vectors and access through const
getters. The other function returns a non-const Vector
. Not sure why it's different, might be good to unify the setup of the received vectors (I'd do them all as temporary if you don't need to store them internally).
PR Checklist
make style
.CHANGELOG
:CHANGELOG
to group with other related features?INSTALL
:make
orcmake
have a new target?.github
.appveyor.yml
.gitignore
:make distclean; git status
shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.examples/makefile
:SEQ_EXAMPLES
andPAR_EXAMPLES
variables.clean
target..gitignore
file.examples/CMakeLists.txt
:ALL_EXE_SRCS
variable.THIS_TEST_OPTIONS
is set correctly for the new example.doc/CodeDocumentation.dox
.examples/pumi
), list it indoc/CodeDocumentation.conf.in
src/examples.md
.src/examples.md
andsrc/img
.examples.md
, list the example under the appropriate categories, add new categories if necessary.features.md
.makefile
andmakefile
in corresponding miniapp directory..gitignore
file.CMakeLists.txt
file in theminiapps
directory, if the new miniapp is in a new directory.CMakeLists.txt
file in the new miniapp directory.doc/CodeDocumentation.dox
miniapps/nurbs
), add it toMINIAPP_SUBDIRS
in themakefile
.miniapps/nurbs
), list it indoc/CodeDocumentation.conf.in
src/meshing.md
andsrc/electromagnetics.md
files.src/examples.md
andsrc/img
.features.md
.mfem/web
repo.README
(rare).doc/CodeDocumentation.dox
(rare).make unittest
to make sure all unit tests pass.tests/scripts
.