-
Notifications
You must be signed in to change notification settings - Fork 248
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
[Core][MPI] Adding SpatialSearchResultContainer
and SpatialSearchResultContainerMap
#11205
Conversation
…rToPyList` and `MatrixToPyList`" This reverts commit 13dee67.
Ready @pooyan-dadvand |
@roigcarlo do you want to meet to advance with the review of this? |
@loumalouomega Thanks for the implementation and large effort to make the spatial search MPI parallel. Before going into the details of the implementation I would like to put here my comments (after talking directly with you about the global design)
for(auto& result : search_results){
auto& geometry = result.Get()->GetGeometry();
double distance = result.GetDistance();
if(distance....)
}
@roigcarlo and @jcotela I would like to hear your design comments and concerns. |
Closing as included in #11719 |
📝 Description
This PR introduces a new class named
SpatialSearchResultContainer
andSpatialSearchResultContainerMap
. The class provides storage and operations related to spatial search results. This is a transition PR to finally give support for MPI search usingGeometricalObjectBins
.The
SpatialSearchResultContainer
class stores:PointerVectorSet
)The class includes functions such as,
SynchronizeAll
,HasResult
,GetResultIndices
,AddResult
... The interesting part is that integrates a global pointer communicator, so it is possible to calculate anything passing a functor. The most common operations required are already implemented:GetResultShapeFunctions
,GetResultIndices
andGetResultCoordinates
,The
SynchronizeAll
method synchronizes the container between partitions. TheAddResult
method adds a result to the local pointers. There is apush_back
which does the same.The
SpatialSearchResultContainerMap
class stores an unordered map ofSpatialSearchResultContainer
, using an integer as hash. The hash is computed from the point coordinates which we are computing the results.This commit seems to be a significant enhancement, providing a new means of handling and manipulating spatial search results in the Kratos library.
🆕 Changelog
spatial_search_result_container.cpp
andspatial_search_result_container.h
files have been added, representing the implementation and header for theSpatialSearchResultContainer
andSpatialSearchResultContainerMap
classes.SpatialSearchResultContainer
andSpatialSearchResultContainerMap
SpatialSearchResultContainer
andSpatialSearchResultContainerMap
GlobalPointer
class in global_pointer.h #11206== operator
inSpatialSearchResult
#11221