modification to the base code for MPI-developement up to processor boundaries

This commit is contained in:
Hamidreza Norouzi
2024-04-27 09:03:19 -07:00
parent 5c65b92008
commit e7215159af
44 changed files with 646 additions and 477 deletions

View File

@ -7,6 +7,8 @@ contactSearch/methods/cellBased/NBS/NBS.cpp
contactSearch/methods/cellBased/NBS/cellsWallLevel0.cpp
contactSearch/boundaries/boundaryContactSearch/boundaryContactSearch.cpp
contactSearch/boundaries/twoPartContactSearch/twoPartContactSearchKernels.cpp
contactSearch/boundaries/twoPartContactSearch/twoPartContactSearch.cpp
contactSearch/boundaries/periodicBoundaryContactSearch/ppwBndryContactSearchKernels.cpp
contactSearch/boundaries/periodicBoundaryContactSearch/ppwBndryContactSearch.cpp
contactSearch/boundaries/periodicBoundaryContactSearch/wallBoundaryContactSearch.cpp
@ -22,6 +24,13 @@ sphereInteraction/sphereInteractionsNonLinearModels.cpp
sphereInteraction/sphereInteractionsNonLinearModModels.cpp
)
if(pFlow_Build_MPI)
list(APPEND SourceFiles
contactSearch/boundaries/processorBoundaryContactSearch/processorBoundaryContactSearch.cpp
sphereInteraction/boundaries/processorBoundarySphereInteraction/processorBoundarySphereInteractions.cpp
)
endif()
set(link_libs Kokkos::kokkos phasicFlow Property Particles Geometry)
pFlow_add_library_install(Interaction SourceFiles link_libs)

View File

@ -130,9 +130,10 @@ public:
csPairContainerType& pwPairs,
bool force = false) override
{
ppTimer().start();
Particles().boundingSphere().updateBoundaries(DataDirection::SlaveToMaster);
const auto& position = Particles().pointPosition().deviceViewAll();
const auto& flags = Particles().dynPointStruct().activePointsMaskDevice();
const auto& diam = Particles().boundingSphere().deviceViewAll();

View File

@ -36,15 +36,16 @@ public:
using NextType = deviceViewType1D<uint32>;
private:
cells searchCells_;
HeadType head_{"periodic::head", 1, 1, 1};
cells searchCells_;
NextType next_{"periodic::next", 1};
HeadType head_{ "periodic::head", 1, 1, 1 };
real sizeRatio_ = 1.0;
NextType next_{ "periodic::next", 1 };
uint32 nextCapacity_ = 0;
real sizeRatio_ = 1.0;
uint32 nextCapacity_ = 0;
void checkAllocateNext(uint32 n);

View File

@ -143,7 +143,9 @@ public:
) override
{
notImplementedFunction;
pOutput<<"Function (hearChanges in boundarySphereInteractions)is not implmented Message "<<
msg <<endl<<" name "<< this->name() <<" type "<< this->type()<<endl;;
//notImplementedFunction;
return true;
}

View File

@ -3,6 +3,7 @@ namespace pFlow::periodicBoundarySIKernels
{
template<typename ContactListType, typename ContactForceModel>
inline
void sphereSphereInteraction
(
real dt,
@ -46,14 +47,6 @@ void sphereSphereInteraction
if( ovrlp >0.0 )
{
/*auto Vi = thisVel[i];
auto Vj = mirrorVel[j];
auto wi = thisRVel[i];
auto wj = mirrorRVel[j];
auto Nij = (xj-xi)/dist;
auto Vr = Vi - Vj + cross((Ri*wi+Rj*wj), Nij);*/
auto Nij = (xj-xi)/dist;
auto wi = rVel[ind_i];
auto wj = rVel[ind_j];

View File

@ -163,9 +163,16 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
auto t = this->currentTime();
auto dt = this->dt();
//output<<"iter, t, dt "<< iter<<" "<< t << " "<<dt<<endl;
bool broadSearch = contactSearch_().enterBroadSearch(iter, t, dt);
/*sphParticles_.diameter().updateBoundaries(DataDirection::SlaveToMaster);
sphParticles_.velocity().updateBoundaries(DataDirection::SlaveToMaster);
sphParticles_.rVelocity().updateBoundaries(DataDirection::SlaveToMaster);
sphParticles_.mass().updateBoundaries(DataDirection::SlaveToMaster);
sphParticles_.I().updateBoundaries(DataDirection::SlaveToMaster);
sphParticles_.propertyId().updateBoundaries(DataDirection::SlaveToMaster);*/
if(broadSearch)
{