periodict boundary condition ->DEBUG and some minor changes boundaries

This commit is contained in:
HRN
2025-02-03 19:16:14 +03:30
parent f5ba30b901
commit fac5576df1
10 changed files with 146 additions and 115 deletions

View File

@ -93,7 +93,7 @@ bool pFlow::contactSearch::boundaryBroadSearch
bTimer_.start();
for(uint32 i=0u; i<6u; i++)
{
output<<" boundarySearch "<< i <<" for iter "<< ti.iter()<<endl;
//output<<" boundarySearch "<< i <<" for iter "<< ti.iter()<<endl;
if(!BoundaryBroadSearch(
i,
ti,

View File

@ -10,8 +10,8 @@ pFlow::boundarySphereInteractionList<CFModel, gMModel>::boundarySphereInteractio
boundaryListPtr<boundarySphereInteraction<CFModel,gMModel>>(),
boundaries_(sphPrtcls.pStruct().boundaries())
{
ForAllActiveBoundariesPtr(i, this)
output<<boundaries_.size()<<endl;
ForAllBoundariesPtr(i, this)
{
this->set(
i,

View File

@ -145,6 +145,11 @@ pFlow::sphereInteraction<cFM,gMM, cLT>::sphereInteraction
{
fatalExit;
}
for(uint32 i=0; i<6; i++)
{
activeBoundaries_[i] = boundaryInteraction_[i].ppPairsAllocated();
}
}
template<typename cFM,typename gMM,template <class, class, class> class cLT>
@ -190,10 +195,14 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
ComputationTimer().start();
ForAllActiveBoundaries(i, boundaryInteraction_)
//for(size_t i=0; i<6; i++)
{
auto& BI = boundaryInteraction_[i];
BI.ppPairs().beforeBroadSearch();
BI.pwPairs().beforeBroadSearch();
if(activeBoundaries_[i])
{
auto& BI = boundaryInteraction_[i];
BI.ppPairs().beforeBroadSearch();
BI.pwPairs().beforeBroadSearch();
}
}
ComputationTimer().end();
@ -214,18 +223,22 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
}
ForAllActiveBoundaries(i, boundaryInteraction_)
//for(size_t i=0; i<6; i++)
{
auto& BI = boundaryInteraction_[i];
if(!contactSearchRef.boundaryBroadSearch(
i,
ti,
BI.ppPairs(),
BI.pwPairs())
)
if(activeBoundaries_[i])
{
fatalErrorInFunction<<
"failed to perform broadSearch for boundary index "<<i<<endl;
return false;
auto& BI = boundaryInteraction_[i];
if(!contactSearchRef.boundaryBroadSearch(
i,
ti,
BI.ppPairs(),
BI.pwPairs())
)
{
fatalErrorInFunction<<
"failed to perform broadSearch for boundary index "<<i<<endl;
return false;
}
}
}
ComputationTimer().end();
@ -245,11 +258,15 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
contactListMangementBoundaryTimer_.resume();
ComputationTimer().start();
ForAllActiveBoundaries(i, boundaryInteraction_ )
ForAllActiveBoundaries(i, boundaryInteraction_)
//for(size_t i=0; i<6; i++)
{
auto& BI = boundaryInteraction_[i];
BI.ppPairs().afterBroadSearch();
BI.pwPairs().afterBroadSearch();
if(activeBoundaries_[i])
{
auto& BI = boundaryInteraction_[i];
BI.ppPairs().afterBroadSearch();
BI.pwPairs().afterBroadSearch();
}
}
ComputationTimer().end();
@ -265,6 +282,7 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
while(requireStep.anyElement(true) && step <= 10)
{
ForAllBoundaries(i, boundaryInteraction_)
//for(size_t i=0; i<6; i++)
{
if(requireStep[i] )
{
@ -304,6 +322,7 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
while( requireStep.anyElement(true) && step < 20 )
{
ForAllBoundaries(i, boundaryInteraction_)
//for(size_t i=0; i<6; i++)
{
if(requireStep[i])
{