1
0
mirror of https://github.com/PhasicFlow/phasicFlow.git synced 2025-08-07 03:37:02 +00:00

Merge branch 'develop' into MPIdev

This commit is contained in:
Hamidreza Norouzi
2024-05-18 19:14:01 +03:30
111 changed files with 2006 additions and 703 deletions
solvers
src
Geometry
geometry
geometryMotion
Interaction
MotionModel
entities
stationary
rotatingAxisMotion
stationaryWall
vibratingMotion
Particles
phasicFlow
setHelpers
utilities
CMakeLists.txt
Utilities
CMakeLists.txt
geometryPhasicFlow
checkPhasicFlow
geometryPhasicFlow
pFlowToVTK
particlesPhasicFlow

@ -74,7 +74,8 @@ pFlow::particles::particles(systemControl& control)
dynPointStruct_,
zero3
),
idHandler_(particleIdHandler::create(dynPointStruct_))
idHandler_(particleIdHandler::create(dynPointStruct_)),
baseFieldBoundaryUpdateTimer_("baseFieldBoundaryUpdate",&timers())
{
this->addToSubscriber(dynPointStruct_);
@ -84,18 +85,18 @@ pFlow::particles::particles(systemControl& control)
bool
pFlow::particles::beforeIteration()
{
zeroForce();
zeroTorque();
if( !dynPointStruct_.beforeIteration())
{
return false;
}
zeroForce();
zeroTorque();
baseFieldBoundaryUpdateTimer_.start();
shapeIndex_.updateBoundariesSlaveToMasterIfRequested();
accelertion_.updateBoundariesSlaveToMasterIfRequested();
idHandler_().updateBoundariesSlaveToMasterIfRequested();
baseFieldBoundaryUpdateTimer_.end();
return true;
}

@ -54,6 +54,8 @@ private:
/// handling new ids for new particles
uniquePtr<particleIdHandler> idHandler_ = nullptr;
Timer baseFieldBoundaryUpdateTimer_;
/// messages for this objects
static inline const message defaultMessage_{ message::DEFAULT };

@ -15,8 +15,11 @@ pFlow::regularParticleIdHandler::regularParticleIdHandler
pFlow::Pair<pFlow::uint32, pFlow::uint32>
pFlow::regularParticleIdHandler::getIdRange(uint32 nNewParticles)
{
if(nNewParticles==0) return {0,0};
uint32 startId;
if(maxId_==-1)
if(maxId_== static_cast<uint32>(-1))
{
startId = 0;
}
@ -37,7 +40,7 @@ bool pFlow::regularParticleIdHandler::initialIdCheck()
uint32 maxId = max( *this );
/// particles should get ids from 0 to size-1
if(maxId == -1)
if(maxId == static_cast<uint32>(-1))
{
fillSequence(*this,0u);
maxId_ = size()-1;

@ -31,7 +31,7 @@ class regularParticleIdHandler
{
private:
uint32 maxId_ = -1;
uint32 maxId_ = static_cast<uint32>(-1);
bool initialIdCheck()override;
public:

@ -132,7 +132,7 @@ public:
return true;
}
}
idx = -1;
idx = static_cast<uint32>(-1);
return false;
}
@ -144,6 +144,8 @@ public:
// - IO
using fileDictionary::write;
bool write(iOstream& os)const override;
};