makeing beforeIteration step-wise for boundaryBase to implement non-bloking communications
This commit is contained in:
parent
d5ff1d7906
commit
d1b6a04292
|
@ -339,7 +339,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
bool beforeIteration(uint32 iterNum, real t, real dt) = 0 ;
|
bool beforeIteration(uint32 step, uint32 iterNum, real t, real dt) = 0 ;
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
bool iterate(uint32 iterNum, real t, real dt) = 0;
|
bool iterate(uint32 iterNum, real t, real dt) = 0;
|
||||||
|
|
|
@ -42,12 +42,13 @@ pFlow::boundaryExit::boundaryExit
|
||||||
|
|
||||||
bool pFlow::boundaryExit::beforeIteration
|
bool pFlow::boundaryExit::beforeIteration
|
||||||
(
|
(
|
||||||
|
uint32 step,
|
||||||
uint32 iterNum,
|
uint32 iterNum,
|
||||||
real t,
|
real t,
|
||||||
real dt
|
real dt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if(step!= 2 )return true;
|
||||||
if( !boundaryListUpdate(iterNum))return true;
|
if( !boundaryListUpdate(iterNum))return true;
|
||||||
|
|
||||||
// nothing have to be done
|
// nothing have to be done
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
dictionary
|
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;
|
bool iterate(uint32 iterNum, real t, real dt) override;
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,17 @@ pFlow::boundaryList::beforeIteration(uint32 iter, real t, real dt, bool force)
|
||||||
|
|
||||||
for (auto bdry : *this)
|
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 "
|
fatalErrorInFunction << "Error in beforeIteration in boundary "
|
||||||
<< bdry->name() << endl;
|
<< bdry->name() << endl;
|
||||||
|
|
|
@ -34,6 +34,7 @@ pFlow::boundaryNone::boundaryNone
|
||||||
|
|
||||||
bool pFlow::boundaryNone::beforeIteration
|
bool pFlow::boundaryNone::beforeIteration
|
||||||
(
|
(
|
||||||
|
uint32 step,
|
||||||
uint32 iterNum,
|
uint32 iterNum,
|
||||||
real t,
|
real t,
|
||||||
real dt
|
real dt
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
dictionary
|
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;
|
bool iterate(uint32 iterNum, real t, real dt) final;
|
||||||
|
|
||||||
|
|
|
@ -51,10 +51,12 @@ pFlow::realx3 pFlow::boundaryPeriodic::boundaryExtensionLength() const
|
||||||
|
|
||||||
|
|
||||||
bool pFlow::boundaryPeriodic::beforeIteration(
|
bool pFlow::boundaryPeriodic::beforeIteration(
|
||||||
|
uint32 step,
|
||||||
uint32 iterNum,
|
uint32 iterNum,
|
||||||
real t,
|
real t,
|
||||||
real dt)
|
real dt)
|
||||||
{
|
{
|
||||||
|
if(step!=2)return true;
|
||||||
// nothing have to be done
|
// nothing have to be done
|
||||||
if(empty())
|
if(empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
|
|
||||||
//const plane& boundaryPlane()const override;*/
|
//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;
|
bool iterate(uint32 iterNum, real t, real dt) override;
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ pFlow::boundaryReflective::boundaryReflective
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pFlow::boundaryReflective::beforeIteration(
|
bool pFlow::boundaryReflective::beforeIteration(
|
||||||
|
uint32 step,
|
||||||
uint32 iterNum,
|
uint32 iterNum,
|
||||||
real t,
|
real t,
|
||||||
real dt)
|
real dt)
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
dictionary
|
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;
|
bool iterate(uint32 iterNum, real t, real dt) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue