diff --git a/src/phasicFlow/repository/IOobject/IOobject.cpp b/src/phasicFlow/repository/IOobject/IOobject.cpp index 6fae2f0a..4442332f 100644 --- a/src/phasicFlow/repository/IOobject/IOobject.cpp +++ b/src/phasicFlow/repository/IOobject/IOobject.cpp @@ -126,6 +126,7 @@ bool pFlow::IOobject::writeObject() const { if(auto ptrOS = outStream(); ptrOS ) { + pOutput<<"Should write field "<name()<name()<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;