# PhasicFlow: src/Particles/SphereParticles/boundarySphereParticles.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.

boundarySphereParticles.cpp
Go to the documentation of this file.
#include "boundarySphereParticles.hpp"
#include "boundaryBase.hpp"
#include "sphereParticles.hpp"
pFlow::boundarySphereParticles::boundarySphereParticles(
const boundaryBase &boundary,
sphereParticles &prtcls
)
:
generalBoundary(boundary, prtcls.pStruct(), "", ""),
particles_(prtcls)
{
}
pFlow::sphereParticles &pFlow::boundarySphereParticles::Particles()
{
return particles_;
}
const pFlow::sphereParticles &pFlow::boundarySphereParticles::Particles() const
{
return particles_;
}
pFlow::uniquePtr<pFlow::boundarySphereParticles> pFlow::boundarySphereParticles::create(
const boundaryBase &boundary,
sphereParticles &prtcls
)
{
word bType = angleBracketsNames2(
"boundarySphereParticles",
pFlowProcessors().localRunTypeName(),
boundary.type());
word altBType{"boundarySphereParticles<none>"};
if( boundaryBasevCtorSelector_.search(bType) )
{
pOutput.space(4)<<"Creating boundary "<< Green_Text(bType)<<
" for "<<boundary.name()<<endl;
return boundaryBasevCtorSelector_[bType](boundary, prtcls);
}
else if(boundaryBasevCtorSelector_.search(altBType))
{
pOutput.space(4)<<"Creating boundary "<< Green_Text(altBType)<<
" for "<<boundary.name()<<endl;
return boundaryBasevCtorSelector_[altBType](boundary, prtcls);
}
else
{
printKeys(
fatalError << "Ctor Selector "<< bType<<
" and "<< altBType << " do not exist. \n"
<<"Avaiable ones are: \n",
boundaryBasevCtorSelector_
);
fatalExit;
}
return nullptr;
}
Green_Text
#define Green_Text(text)
Definition: iOstream.hpp:42
pFlow::pOutput
processorOstream pOutput
pFlow::boundarySphereParticles::boundarySphereParticles
boundarySphereParticles(const boundaryBase &boundary, sphereParticles &prtcls)
Definition: boundarySphereParticles.cpp:6
pFlow::boundarySphereParticles::create
static uniquePtr< boundarySphereParticles > create(const boundaryBase &boundary, sphereParticles &prtcls)
Definition: boundarySphereParticles.cpp:27
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
boundarySphereParticles.hpp
boundaryBase.hpp
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
pFlow::boundaryBase::name
const word & name() const
Definition: boundaryBase.hpp:258
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
pFlow::boundaryBase::type
const word & type() const
Definition: boundaryBase.hpp:252
pFlow::sphereParticles
Class for managing spherical particles.
Definition: sphereParticles.hpp:42
pFlow::angleBracketsNames2
word angleBracketsNames2(const word &base, const word &w1, const word &w2)
Output base<w1,w2>
Definition: bTypesFunctions.cpp:162
pFlow::boundaryBase
Definition: boundaryBase.hpp:42
fatalError
#define fatalError
Report a fatal error and exit the applicaiton.
Definition: error.hpp:70
pFlow::boundarySphereParticles::Particles
sphereParticles & Particles()
Definition: boundarySphereParticles.cpp:17
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::pFlowProcessors
localProcessors & pFlowProcessors()
Definition: pFlowProcessors.cpp:5
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
sphereParticles.hpp
pFlow::iOstream::space
virtual iOstream & space(int32 n=1)
Write space to stream.
Definition: iOstream.cpp:119
pFlow::generalBoundary
Definition: generalBoundary.hpp:38