mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
modification to the base code for MPI-developement up to processor boundaries
This commit is contained in:
@ -16,6 +16,11 @@ Insertion/shapeMixture/shapeMixture.cpp
|
||||
Insertion/Insertion/Insertions.cpp
|
||||
)
|
||||
|
||||
if(pFlow_Build_MPI)
|
||||
list(APPEND SourceFiles
|
||||
particles/MPIParticleIdHandler/MPIParticleIdHandler.cpp)
|
||||
endif()
|
||||
|
||||
set(link_libs Kokkos::kokkos phasicFlow Integration Property)
|
||||
|
||||
pFlow_add_library_install(Particles SourceFiles link_libs)
|
||||
|
@ -513,6 +513,14 @@ bool pFlow::sphereParticles::beforeIteration()
|
||||
dynPointStruct().predict(dt, accelertion());
|
||||
rVelIntegration_().predict(dt,rVelocity_, rAcceleration_);
|
||||
intPredictTimer_.end();
|
||||
|
||||
propertyId_.updateBoundariesSlaveToMasterIfRequested();
|
||||
diameter_.updateBoundariesSlaveToMasterIfRequested();
|
||||
mass_.updateBoundariesSlaveToMasterIfRequested();
|
||||
I_.updateBoundariesSlaveToMasterIfRequested();
|
||||
rVelocity_.updateBoundariesSlaveToMasterIfRequested();
|
||||
rAcceleration_.updateBoundariesSlaveToMasterIfRequested();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +31,12 @@ class particleIdHandler
|
||||
:
|
||||
public uint32PointField_D
|
||||
{
|
||||
|
||||
|
||||
private:
|
||||
|
||||
virtual
|
||||
bool initialIdCheck()=0;
|
||||
|
||||
public:
|
||||
|
||||
/// class info
|
||||
@ -53,7 +58,9 @@ public:
|
||||
Pair<uint32, uint32> getIdRange(uint32 nNewParticles)=0;
|
||||
|
||||
virtual
|
||||
bool initialIdCheck()=0;
|
||||
uint32 maxId()const = 0;
|
||||
|
||||
|
||||
|
||||
// heat change for possible insertion of particles
|
||||
// overrdie from internalField
|
||||
|
@ -78,7 +78,7 @@ pFlow::particles::particles(systemControl& control)
|
||||
{
|
||||
this->addToSubscriber(dynPointStruct_);
|
||||
|
||||
idHandler_().initialIdCheck();
|
||||
//idHandler_().initialIdCheck();
|
||||
}
|
||||
|
||||
bool
|
||||
@ -87,7 +87,16 @@ pFlow::particles::beforeIteration()
|
||||
zeroForce();
|
||||
zeroTorque();
|
||||
|
||||
return dynPointStruct_.beforeIteration();
|
||||
if( !dynPointStruct_.beforeIteration())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
shapeIndex_.updateBoundariesSlaveToMasterIfRequested();
|
||||
accelertion_.updateBoundariesSlaveToMasterIfRequested();
|
||||
idHandler_().updateBoundariesSlaveToMasterIfRequested();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -181,6 +181,12 @@ public:
|
||||
return contactTorque_;
|
||||
}
|
||||
|
||||
inline
|
||||
uint maxId()const
|
||||
{
|
||||
return idHandler_().maxId();
|
||||
}
|
||||
|
||||
bool beforeIteration() override;
|
||||
|
||||
bool iterate() override;
|
||||
|
@ -9,6 +9,7 @@ pFlow::regularParticleIdHandler::regularParticleIdHandler
|
||||
:
|
||||
particleIdHandler(pStruct)
|
||||
{
|
||||
initialIdCheck();
|
||||
}
|
||||
|
||||
pFlow::Pair<pFlow::uint32, pFlow::uint32>
|
||||
|
@ -33,6 +33,7 @@ private:
|
||||
|
||||
uint32 maxId_ = -1;
|
||||
|
||||
bool initialIdCheck()override;
|
||||
public:
|
||||
|
||||
ClassInfo("particleIdHandler<regular>");
|
||||
@ -50,7 +51,10 @@ public:
|
||||
|
||||
Pair<uint32, uint32> getIdRange(uint32 nNewParticles)override;
|
||||
|
||||
bool initialIdCheck()override;
|
||||
uint32 maxId()const override
|
||||
{
|
||||
return maxId_;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user