# PhasicFlow: src/Integration/boundaries/boundaryIntegrationList.cpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

boundaryIntegrationList.cpp
Go to the documentation of this file.
#include "boundaryIntegrationList.hpp"
#include "integration.hpp"
pFlow::boundaryIntegrationList::boundaryIntegrationList(
const pointStructure &pStruct,
const word &method,
integration &intgrtn
)
:
ListPtr<boundaryIntegration>(6),
boundaries_(pStruct.boundaries())
{
for(uint32 i=0; i<6; i++)
{
this->set(
i,
boundaryIntegration::create(
boundaries_[i],
pStruct,
method,
intgrtn
)
);
}
}
bool pFlow::boundaryIntegrationList::correct(real dt, realx3PointField_D &y, realx3PointField_D &dy)
{
for(auto& bndry:*this)
{
if(!bndry->correct(dt, y, dy))
{
fatalErrorInFunction<<"Error in correcting boundary "<<
bndry->boundaryName()<<endl;
return false;
}
}
return true;
}
bool pFlow::boundaryIntegrationList::correctPStruct(
real dt,
pointStructure &pStruct,
const realx3PointField_D &vel)
{
for(auto& bndry:*this)
{
if(!bndry->correctPStruct(dt, vel))
{
fatalErrorInFunction<<"Error in correcting boundary "<<
bndry->boundaryName()<<" in pointStructure."<<endl;
return false;
}
}
return true;
}
pFlow::boundaryIntegrationList::boundaries_
const boundaryList & boundaries_
Definition: boundaryIntegrationList.hpp:22
pFlow::ListPtr
Definition: ListPtr.hpp:37
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::integration
Base class for integrating the first order ODE (IVP)
Definition: integration.hpp:51
pFlow::boundaryIntegrationList::correctPStruct
bool correctPStruct(real dt, pointStructure &pStruct, const realx3PointField_D &vel)
Definition: boundaryIntegrationList.cpp:44
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
pFlow::pointField
Definition: pointField.hpp:33
pFlow::pointStructure
Definition: pointStructure.hpp:34
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
pFlow::boundaryIntegrationList::boundaryIntegrationList
boundaryIntegrationList(const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegrationList.cpp:4
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::boundaryIntegration
Definition: boundaryIntegration.hpp:15
integration.hpp
pFlow::boundaryIntegration::create
static uniquePtr< boundaryIntegration > create(const boundaryBase &boundary, const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegration.cpp:16
boundaryIntegrationList.hpp
pFlow::boundaryIntegrationList::correct
bool correct(real dt, realx3PointField_D &y, realx3PointField_D &dy)
Definition: boundaryIntegrationList.cpp:29
pFlow::ListPtr< boundaryIntegration >::set
uniquePtr< boundaryIntegration > set(size_t i, boundaryIntegration *ptr)
Definition: ListPtrI.hpp:155