diff --git a/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp b/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp index 978f674b..b1f8008a 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryBase/boundaryBase.hpp @@ -339,7 +339,7 @@ public: virtual - bool beforeIteration(uint32 iterNum, real t, real dt) = 0 ; + bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) = 0 ; virtual bool iterate(uint32 iterNum, real t, real dt) = 0; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp index 9937433c..0f530418 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.cpp @@ -42,12 +42,13 @@ pFlow::boundaryExit::boundaryExit bool pFlow::boundaryExit::beforeIteration ( + uint32 step, uint32 iterNum, real t, real dt ) { - + if(step!= 2 )return true; if( !boundaryListUpdate(iterNum))return true; // nothing have to be done diff --git a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.hpp b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.hpp index f8aa61c5..b4763e26 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryExit/boundaryExit.hpp @@ -63,7 +63,7 @@ public: dictionary ); - bool beforeIteration(uint32 iterNum, real t, real dt) override; + bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) override; bool iterate(uint32 iterNum, real t, real dt) override; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryList.cpp b/src/phasicFlow/structuredData/boundaries/boundaryList.cpp index 0e5ddfed..707e00ea 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryList.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryList.cpp @@ -172,7 +172,17 @@ pFlow::boundaryList::beforeIteration(uint32 iter, real t, real dt, bool force) for (auto bdry : *this) { - if (!bdry->beforeIteration(iter, t, dt)) + if (!bdry->beforeIteration(1, iter, t, dt)) + { + fatalErrorInFunction << "Error in beforeIteration in boundary " + << bdry->name() << endl; + return false; + } + } + + for (auto bdry : *this) + { + if (!bdry->beforeIteration(2, iter, t, dt)) { fatalErrorInFunction << "Error in beforeIteration in boundary " << bdry->name() << endl; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.cpp b/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.cpp index 327330dd..7f228562 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.cpp @@ -34,6 +34,7 @@ pFlow::boundaryNone::boundaryNone bool pFlow::boundaryNone::beforeIteration ( + uint32 step, uint32 iterNum, real t, real dt diff --git a/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.hpp b/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.hpp index 8e103d39..68ddf33f 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryNone/boundaryNone.hpp @@ -52,7 +52,7 @@ public: dictionary ); - bool beforeIteration(uint32 iterNum, real t, real dt) final; + bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) final; bool iterate(uint32 iterNum, real t, real dt) final; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp index cbdecf71..cf111eb5 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.cpp @@ -51,10 +51,12 @@ pFlow::realx3 pFlow::boundaryPeriodic::boundaryExtensionLength() const bool pFlow::boundaryPeriodic::beforeIteration( + uint32 step, uint32 iterNum, real t, real dt) { + if(step!=2)return true; // nothing have to be done if(empty()) { diff --git a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.hpp b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.hpp index 88983fa3..69b0413a 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryPeriodic/boundaryPeriodic.hpp @@ -64,7 +64,7 @@ public: //const plane& boundaryPlane()const override;*/ - bool beforeIteration(uint32 iterNum, real t, real dt) override; + bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) override; bool iterate(uint32 iterNum, real t, real dt) override; diff --git a/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.cpp b/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.cpp index 74ee4d75..8de9b74f 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.cpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.cpp @@ -46,6 +46,7 @@ pFlow::boundaryReflective::boundaryReflective } bool pFlow::boundaryReflective::beforeIteration( + uint32 step, uint32 iterNum, real t, real dt) diff --git a/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.hpp b/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.hpp index 43e1ce13..3f3bc64c 100644 --- a/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.hpp +++ b/src/phasicFlow/structuredData/boundaries/boundaryReflective/boundaryReflective.hpp @@ -59,7 +59,7 @@ public: dictionary ); - bool beforeIteration(uint32 iterNum, real t, real dt) override; + bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) override; bool iterate(uint32 iterNum, real t, real dt) override;