www.cemf.ir
boundaryGrainParticles.cpp
Go to the documentation of this file.
1
#include "
boundaryGrainParticles.hpp
"
2
#include "
boundaryBase.hpp
"
3
#include "
grainParticles.hpp
"
4
5
6
pFlow::boundaryGrainParticles::boundaryGrainParticles
(
7
const
boundaryBase
&boundary,
8
grainParticles
&prtcls
9
)
10
:
11
generalBoundary
(boundary, prtcls.
pStruct
(),
""
,
""
),
12
particles_(prtcls)
13
{
14
15
}
16
17
pFlow::grainParticles
&
pFlow::boundaryGrainParticles::Particles
()
18
{
19
return
particles_;
20
}
21
22
const
pFlow::grainParticles
&
pFlow::boundaryGrainParticles::Particles
()
const
23
{
24
return
particles_;
25
}
26
27
pFlow::uniquePtr<pFlow::boundaryGrainParticles>
pFlow::boundaryGrainParticles::create
(
28
const
boundaryBase
&boundary,
29
grainParticles
&prtcls
30
)
31
{
32
33
word
bType =
angleBracketsNames2
(
34
"boundaryGrainParticles"
,
35
pFlowProcessors
().localRunTypeName(),
36
boundary.
type
());
37
38
word
altBType{
"boundaryGrainParticles<none>"
};
39
40
if
( boundaryBasevCtorSelector_.search(bType) )
41
{
42
pOutput
.
space
(4)<<
"Creating boundary "
<<
Green_Text
(bType)<<
43
" for "
<<boundary.
name
()<<
endl
;
44
return
boundaryBasevCtorSelector_[bType](boundary, prtcls);
45
}
46
else
if
(boundaryBasevCtorSelector_.search(altBType))
47
{
48
pOutput
.
space
(4)<<
"Creating boundary "
<<
Green_Text
(altBType)<<
49
" for "
<<boundary.
name
()<<
endl
;
50
return
boundaryBasevCtorSelector_[altBType](boundary, prtcls);
51
}
52
else
53
{
54
printKeys
(
55
fatalError
<<
"Ctor Selector "
<< bType<<
56
" and "
<< altBType <<
" do not exist. \n"
57
<<
"Avaiable ones are: \n"
,
58
boundaryBasevCtorSelector_
59
);
60
fatalExit
;
61
}
62
63
return
nullptr
;
64
}
Green_Text
#define Green_Text(text)
Definition:
iOstream.hpp:42
pFlow::pOutput
processorOstream pOutput
fatalExit
#define fatalExit
Fatal exit.
Definition:
error.hpp:98
boundaryBase.hpp
pFlow::grainParticles
Definition:
grainParticles.hpp:42
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
grainParticles.hpp
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
pStruct
auto & pStruct
Definition:
setPointStructure.hpp:24
boundaryGrainParticles.hpp
pFlow::pFlowProcessors
localProcessors & pFlowProcessors()
Definition:
pFlowProcessors.cpp:5
pFlow::uniquePtr
Definition:
uniquePtr.hpp:42
pFlow::iOstream::space
virtual iOstream & space(int32 n=1)
Write space to stream.
Definition:
iOstream.cpp:119
pFlow::boundaryGrainParticles::boundaryGrainParticles
boundaryGrainParticles(const boundaryBase &boundary, grainParticles &prtcls)
Definition:
boundaryGrainParticles.cpp:6
pFlow::generalBoundary
Definition:
generalBoundary.hpp:38
pFlow::boundaryGrainParticles::create
static uniquePtr< boundaryGrainParticles > create(const boundaryBase &boundary, grainParticles &prtcls)
Definition:
boundaryGrainParticles.cpp:27
pFlow::boundaryGrainParticles::Particles
grainParticles & Particles()
Definition:
boundaryGrainParticles.cpp:17
src
Particles
GrainParticles
boundaryGrainParticles.cpp
Generated by
1.8.17