boundaryListPtr is created and other classes were changed accordingly

This commit is contained in:
HRN
2025-02-01 22:14:41 +03:30
parent af2572331d
commit 64c041a753
37 changed files with 468 additions and 161 deletions

View File

@ -77,6 +77,11 @@ public:
return true;
}
bool isActive()const override
{
return false;
}
static
uniquePtr<boundaryIntegration> create(
const boundaryBase& boundary,

View File

@ -7,11 +7,11 @@ pFlow::boundaryIntegrationList::boundaryIntegrationList(
integration &intgrtn
)
:
ListPtr<boundaryIntegration>(6),
boundaryListPtr<boundaryIntegration>(),
boundaries_(pStruct.boundaries())
{
for(uint32 i=0; i<6; i++)
ForAllBoundariesPtr(i, this)
{
this->set(
i,
@ -19,25 +19,23 @@ pFlow::boundaryIntegrationList::boundaryIntegrationList(
boundaries_[i],
pStruct,
method,
intgrtn
)
);
intgrtn
)
);
}
}
bool pFlow::boundaryIntegrationList::correct(real dt, realx3PointField_D &y, realx3PointField_D &dy)
{
for(auto& bndry:*this)
ForAllActiveBoundariesPtr(i,this)
{
if(!bndry->correct(dt, y, dy))
if(!boundaryPtr(i)->correct(dt, y, dy))
{
fatalErrorInFunction<<"Error in correcting boundary "<<
bndry->boundaryName()<<endl;
boundaryPtr(i)->boundaryName()<<endl;
return false;
}
}
}
return true;
}
@ -46,14 +44,15 @@ bool pFlow::boundaryIntegrationList::correctPStruct(
pointStructure &pStruct,
const realx3PointField_D &vel)
{
for(auto& bndry:*this)
ForAllActiveBoundariesPtr(i,this)
{
if(!bndry->correctPStruct(dt, vel))
if(!boundaryPtr(i)->correctPStruct(dt, vel))
{
fatalErrorInFunction<<"Error in correcting boundary "<<
bndry->boundaryName()<<" in pointStructure."<<endl;
boundaryPtr(i)->boundaryName()<<" in pointStructure."<<endl;
return false;
}
}
return true;
}

View File

@ -4,7 +4,7 @@
#include "boundaryList.hpp"
#include "ListPtr.hpp"
#include "boundaryListPtr.hpp"
#include "boundaryIntegration.hpp"
@ -15,7 +15,7 @@ class integration;
class boundaryIntegrationList
:
public ListPtr<boundaryIntegration>
public boundaryListPtr<boundaryIntegration>
{
private: