2024-09-21 13:37:03 +03:30
|
|
|
#include "boundaryIntegrationList.hpp"
|
|
|
|
#include "integration.hpp"
|
|
|
|
|
|
|
|
pFlow::boundaryIntegrationList::boundaryIntegrationList(
|
|
|
|
const pointStructure &pStruct,
|
|
|
|
const word &method,
|
|
|
|
integration &intgrtn
|
|
|
|
)
|
|
|
|
:
|
2025-02-01 22:14:41 +03:30
|
|
|
boundaryListPtr<boundaryIntegration>(),
|
2024-09-21 13:37:03 +03:30
|
|
|
boundaries_(pStruct.boundaries())
|
|
|
|
{
|
2025-02-01 22:14:41 +03:30
|
|
|
|
|
|
|
ForAllBoundariesPtr(i, this)
|
2024-09-21 13:37:03 +03:30
|
|
|
{
|
|
|
|
this->set(
|
|
|
|
i,
|
|
|
|
boundaryIntegration::create(
|
|
|
|
boundaries_[i],
|
|
|
|
pStruct,
|
|
|
|
method,
|
2025-02-01 22:14:41 +03:30
|
|
|
intgrtn
|
|
|
|
)
|
|
|
|
);
|
2024-09-21 13:37:03 +03:30
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool pFlow::boundaryIntegrationList::correct(real dt, realx3PointField_D &y, realx3PointField_D &dy)
|
|
|
|
{
|
2025-02-01 22:14:41 +03:30
|
|
|
ForAllActiveBoundariesPtr(i,this)
|
2024-09-21 13:37:03 +03:30
|
|
|
{
|
2025-02-01 22:14:41 +03:30
|
|
|
if(!boundaryPtr(i)->correct(dt, y, dy))
|
2024-09-21 13:37:03 +03:30
|
|
|
{
|
2024-10-18 23:13:20 +03:30
|
|
|
fatalErrorInFunction<<"Error in correcting boundary "<<
|
2025-02-01 22:14:41 +03:30
|
|
|
boundaryPtr(i)->boundaryName()<<endl;
|
2024-09-21 13:37:03 +03:30
|
|
|
return false;
|
|
|
|
}
|
2025-02-01 22:14:41 +03:30
|
|
|
}
|
2024-09-21 13:37:03 +03:30
|
|
|
return true;
|
|
|
|
}
|
2024-10-18 23:13:20 +03:30
|
|
|
|
|
|
|
bool pFlow::boundaryIntegrationList::correctPStruct(
|
|
|
|
real dt,
|
|
|
|
pointStructure &pStruct,
|
|
|
|
const realx3PointField_D &vel)
|
|
|
|
{
|
2025-02-01 22:14:41 +03:30
|
|
|
ForAllActiveBoundariesPtr(i,this)
|
2024-10-18 23:13:20 +03:30
|
|
|
{
|
2025-02-01 22:14:41 +03:30
|
|
|
if(!boundaryPtr(i)->correctPStruct(dt, vel))
|
2024-10-18 23:13:20 +03:30
|
|
|
{
|
|
|
|
fatalErrorInFunction<<"Error in correcting boundary "<<
|
2025-02-01 22:14:41 +03:30
|
|
|
boundaryPtr(i)->boundaryName()<<" in pointStructure."<<endl;
|
2024-10-18 23:13:20 +03:30
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2025-02-01 22:14:41 +03:30
|
|
|
|
2024-10-18 23:13:20 +03:30
|
|
|
return true;
|
|
|
|
}
|