diff --git a/src/Particles/SphereParticles/processorBoundarySphereParticles.cpp b/src/Particles/SphereParticles/processorBoundarySphereParticles.cpp index c07b356c..8519557d 100644 --- a/src/Particles/SphereParticles/processorBoundarySphereParticles.cpp +++ b/src/Particles/SphereParticles/processorBoundarySphereParticles.cpp @@ -26,7 +26,7 @@ bool pFlow::processorBoundarySphereParticles::acceleration(const timeInfo &ti, c auto I = Particles().I().BoundaryField(thisIndex).neighborProcField().deviceView(); auto cf = Particles().contactForce().BoundaryField(thisIndex).neighborProcField().deviceView(); auto ct = Particles().contactTorque().BoundaryField(thisIndex).neighborProcField().deviceView(); - auto acc = Particles().accelertion().BoundaryField(thisIndex).neighborProcField().deviceView(); + auto acc = Particles().acceleration().BoundaryField(thisIndex).neighborProcField().deviceView(); auto rAcc = Particles().rAcceleration().BoundaryField(thisIndex).neighborProcField().deviceView(); Kokkos::parallel_for( diff --git a/src/phasicFlow/MPIParallelization/dataIOMPI/dataIOMPIs.cpp b/src/phasicFlow/MPIParallelization/dataIOMPI/dataIOMPIs.cpp index 73d307f2..376174b3 100644 --- a/src/phasicFlow/MPIParallelization/dataIOMPI/dataIOMPIs.cpp +++ b/src/phasicFlow/MPIParallelization/dataIOMPI/dataIOMPIs.cpp @@ -16,7 +16,7 @@ template class pFlow::MPI::dataIOMPI; template class pFlow::MPI::dataIOMPI; -template class pFlow::MPI::dataIOMPI; +//template class pFlow::MPI::dataIOMPI; template class pFlow::MPI::dataIOMPI; diff --git a/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.cpp b/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.cpp index 37ecb052..67b56425 100644 --- a/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.cpp +++ b/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.cpp @@ -24,9 +24,9 @@ Licence: #include "scatteredMasterDistribute.hpp" #include "scatteredMasterDistributeChar.hpp" -pFlow::MPI::MPISimulationDomain::MPISimulationDomain(systemControl& control) +pFlow::MPI::MPISimulationDomain::MPISimulationDomain(systemControl& control, real maxBSphere) : - simulationDomain(control), + simulationDomain(control, maxBSphere), communication_(pFlowProcessors()), subDomainsAll_(pFlowProcessors()), numPointsAll_(pFlowProcessors()), diff --git a/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.hpp b/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.hpp index 8949409e..44cbf10c 100644 --- a/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.hpp +++ b/src/phasicFlow/MPIParallelization/domain/MPISimulationDomain.hpp @@ -61,7 +61,7 @@ public: TypeInfo("simulationDomain"); - explicit MPISimulationDomain(systemControl& control); + explicit MPISimulationDomain(systemControl& control, real maxBSphere); ~MPISimulationDomain() final = default; diff --git a/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.cpp b/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.cpp index d622a971..51d4e5ba 100644 --- a/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.cpp +++ b/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.cpp @@ -47,7 +47,7 @@ pFlow::MPI::processorBoundaryField::updateBoundary( ) { #ifndef BoundaryModel1 - if(!this->boundary().performBoundarytUpdate()) + if(!this->boundary().performBoundaryUpdate()) return true; #endif @@ -128,21 +128,19 @@ const typename pFlow::MPI::processorBoundaryField:: template bool pFlow::MPI::processorBoundaryField::hearChanges( - real t, - real dt, - uint32 iter, + const timeInfo & ti, const message& msg, const anyList& varList ) { - BoundaryFieldType::hearChanges(t,dt,iter, msg,varList); + if(msg.equivalentTo(message::BNDR_PROC_SIZE_CHANGED)) { - auto newProcSize = varList.getObject("size"); + auto newProcSize = varList.getObject( + message::eventName(message::BNDR_PROC_SIZE_CHANGED)); neighborProcField_.resize(newProcSize); } - - if(msg.equivalentTo(message::BNDR_PROCTRANSFER_SEND)) + else if(msg.equivalentTo(message::BNDR_PROCTRANSFER_SEND)) { const auto& indices = varList.getObject( message::eventName(message::BNDR_PROCTRANSFER_SEND) @@ -169,7 +167,6 @@ bool pFlow::MPI::processorBoundaryField::hearChanges( thisFieldInNeighbor_.sendData(pFlowProcessors(),transferData); } - } else if(msg.equivalentTo(message::BNDR_PROCTRANSFER_RECIEVE)) { @@ -182,30 +179,38 @@ bool pFlow::MPI::processorBoundaryField::hearChanges( { uint32 numRecieved = neighborProcField_.waitBufferForUse(); - - if(msg.equivalentTo(message::CAP_CHANGED)) + if(numRecieved == 0u) { - auto newCap = varList.getObject( - message::eventName(message::CAP_CHANGED)); - this->internal().field().reserve(newCap); - + return true; } - if(msg.equivalentTo(message::SIZE_CHANGED)) + + if(msg.equivalentTo(message::RANGE_CHANGED)) { - auto newSize = varList.getObject( - message::eventName(message::SIZE_CHANGED)); - this->internal().field().resize(newSize); + auto newRange = varList.getObject( + message::eventName(message::RANGE_CHANGED)); + this->internal().field().resize(newRange.end()); } - const auto& indices = varList.getObject( - message::eventName(message::ITEM_INSERT)); - - this->internal().field().insertSetElement(indices, neighborProcField_.buffer().deviceView()); - - return true; + if(msg.equivalentTo(message::ITEMS_INSERT)) + { + const auto& indices = varList.getObject( + message::eventName(message::ITEMS_INSERT)); + + this->internal().field().insertSetElement( + indices, + neighborProcField_.buffer().deviceView()); + } + } + else + { + if(!BoundaryFieldType::hearChanges(ti, msg,varList) ) + { + return false; + } } return true; + } template void pFlow::MPI::processorBoundaryField::sendBackData() const diff --git a/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.hpp b/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.hpp index bd32d59d..04606a0c 100644 --- a/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.hpp +++ b/src/phasicFlow/MPIParallelization/pointField/processorBoundaryField.hpp @@ -91,9 +91,7 @@ public: } bool hearChanges( - real t, - real dt, - uint32 iter, + const timeInfo & ti, const message& msg, const anyList& varList ) override; diff --git a/src/phasicFlow/MPIParallelization/pointStructure/boundaries/boundaryProcessor.cpp b/src/phasicFlow/MPIParallelization/pointStructure/boundaries/boundaryProcessor.cpp index f781a00c..015850e8 100644 --- a/src/phasicFlow/MPIParallelization/pointStructure/boundaries/boundaryProcessor.cpp +++ b/src/phasicFlow/MPIParallelization/pointStructure/boundaries/boundaryProcessor.cpp @@ -83,15 +83,15 @@ pFlow::MPI::boundaryProcessor::beforeIteration( else if(step == 2 ) { -#ifdef BoundaryModel1 - callAgain = true; -#else - if(!performBoundarytUpdate()) - { - callAgain = false; - return true; - } -#endif + #ifdef BoundaryModel1 + callAgain = true; + #else + if(!performBoundaryUpdate()) + { + callAgain = false; + return true; + } + #endif thisNumPoints_ = size(); @@ -136,7 +136,7 @@ pFlow::MPI::boundaryProcessor::beforeIteration( varList.emplaceBack(msg.addAndName(message::BNDR_PROC_SIZE_CHANGED), neighborProcNumPoints_); - if( !notify(ti.iter(), ti.t(), ti.dt(), msg, varList) ) + if( !notify(ti, msg, varList) ) { fatalErrorInFunction; callAgain = false; @@ -343,8 +343,9 @@ bool pFlow::MPI::boundaryProcessor::transferData( neighborProcPoints_.waitBufferForUse(); internal().insertPointsOnly(neighborProcPoints_.buffer(), msg, varList); - const auto& indices = varList.getObject(message::eventName(message::ITEM_INSERT)); + const auto& indices = varList.getObject(message::eventName(message::ITEMS_INSERT)); + // creates a view (does not copy data) auto indView = deviceViewType1D(indices.deviceView().data(), indices.deviceView().size()); uint32Vector_D newIndices("newIndices", indView); @@ -356,7 +357,7 @@ bool pFlow::MPI::boundaryProcessor::transferData( return false; } - const auto ti = internal().time().TimeInfo(); + const auto& ti = internal().time().TimeInfo(); if(!notify(ti, msg, varList)) { fatalErrorInFunction; diff --git a/src/phasicFlow/containers/pointField/boundaryField/boundaryField/boundaryField.hpp b/src/phasicFlow/containers/pointField/boundaryField/boundaryField/boundaryField.hpp index 5a09932f..aebd2a58 100644 --- a/src/phasicFlow/containers/pointField/boundaryField/boundaryField/boundaryField.hpp +++ b/src/phasicFlow/containers/pointField/boundaryField/boundaryField/boundaryField.hpp @@ -114,8 +114,8 @@ public: return true; } - fatalErrorInFunction<<"Event"<< msg.eventNames()<<"with code "<< msg << - " is not handled in boundaryField."<:: hearChanges else { fatalErrorInFunction<<"hear changes in internal field is not processing "<< - message::eventName(message::RANGE_CHANGED)<< + msg.eventNames()<< " event with message code "<< msg<; template class pFlow::dataIO; template class pFlow::dataIORegular; -template class pFlow::dataIO; -template class pFlow::dataIORegular; +//template class pFlow::dataIO; +//template class pFlow::dataIORegular; template class pFlow::dataIO; template class pFlow::dataIORegular; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp b/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp index 4684d0b0..fb3d1f62 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp @@ -246,7 +246,7 @@ public: /// Is this iter the right time for updating bounday list inline - bool performBoundarytUpdate()const + bool performBoundaryUpdate()const { return updateTime_; } diff --git a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp index acf8fd9c..00003734 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp @@ -60,7 +60,7 @@ bool pFlow::boundaryExit::beforeIteration { callAgain = false; - if( !performBoundarytUpdate()) + if( !performBoundaryUpdate()) { return true; } diff --git a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp index c3f048d8..3249d1d2 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp @@ -60,7 +60,7 @@ bool pFlow::boundaryPeriodic::beforeIteration( return true; } //output<thisBoundaryIndex()<<" ->"<