www.cemf.ir
boundaryIntegration.cpp
Go to the documentation of this file.
2 #include "pointStructure.hpp"
3 
4 
6  const boundaryBase &boundary,
7  const pointStructure &pStruct,
8  const word &method,
9  integration& intgrtn
10 )
11 :
12  generalBoundary(boundary, pStruct, "", method),
13  integration_(intgrtn)
14 {}
15 
17  const boundaryBase &boundary,
18  const pointStructure &pStruct,
19  const word &method,
20  integration& intgrtn
21 )
22 {
23 
24  word bType = angleBracketsNames2(
25  "boundaryIntegration",
26  boundary.type(),
27  method);
28 
29  word altBType{"boundaryIntegration<none>"};
30 
31  if( boundaryBasevCtorSelector_.search(bType) )
32  {
33  pOutput.space(4)<<"Creating boundary "<< Green_Text(bType)<<
34  " for "<<boundary.name()<<endl;
35  return boundaryBasevCtorSelector_[bType](boundary, pStruct, method, intgrtn);
36  }
37  else if(boundaryBasevCtorSelector_.search(altBType))
38  {
39  pOutput.space(4)<<"Creating boundary "<< Green_Text(altBType)<<
40  " for "<<boundary.name()<<endl;
41  return boundaryBasevCtorSelector_[altBType](boundary, pStruct, method, intgrtn);
42  }
43  else
44  {
45  printKeys(
46  fatalError << "Ctor Selector "<< bType<<
47  " and "<< altBType << " do not exist. \n"
48  <<"Avaiable ones are: \n",
49  boundaryBasevCtorSelector_
50  );
51  fatalExit;
52  }
53 
54  return nullptr;
55 }
Green_Text
#define Green_Text(text)
Definition: iOstream.hpp:42
pFlow::pOutput
processorOstream pOutput
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::integration
Base class for integrating the first order ODE (IVP)
Definition: integration.hpp:51
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::boundaryIntegration::boundaryIntegration
boundaryIntegration(const boundaryBase &boundary, const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegration.cpp:5
boundaryIntegration.hpp
pFlow::boundaryBase::type
const word & type() const
Definition: boundaryBase.hpp:252
pFlow::angleBracketsNames2
word angleBracketsNames2(const word &base, const word &w1, const word &w2)
Output base<w1,w2>
Definition: bTypesFunctions.cpp:162
pFlow::pointStructure
Definition: pointStructure.hpp:34
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
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::boundaryIntegration::create
static uniquePtr< boundaryIntegration > create(const boundaryBase &boundary, const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegration.cpp:16
pFlow::iOstream::space
virtual iOstream & space(int32 n=1)
Write space to stream.
Definition: iOstream.cpp:119
pointStructure.hpp
pFlow::generalBoundary
Definition: generalBoundary.hpp:38