www.cemf.ir
boundaryField.cpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 template<class T, class MemorySpace>
23 (
24  const boundaryBase& boundary,
25  const pointStructure& pStruct,
26  InternalFieldType& internal
27 )
28 :
30  (
31  boundary,
32  pStruct,
33  getTypeName<T>(),
34  memory_space::name()
35  ),
36  internal_(internal)
37 {}
38 
39 template<class T, class MemorySpace>
42 {
43  static ProcVectorType dummyVector{"dummyVector"};
44  //notImplementedFunction;
45  //fatalExit;
46  return dummyVector;
47 }
48 
49 template<class T, class MemorySpace>
52 {
53  static ProcVectorType dummyVector{"dummyVector"};
54  //notImplementedFunction;
55  //fatalExit;
56  return dummyVector;
57 }
58 
59 template<class T, class MemorySpace>
62 (
63  const boundaryBase& boundary,
64  const pointStructure& pStruct,
65  InternalFieldType& internal
66 )
67 {
68 
69  word bType = angleBracketsNames3(
70  "boundaryField",
71  boundary.type(),
72  getTypeName<T>(),
73  memory_space::name());
74 
75  word bTypeAlter = angleBracketsNames3(
76  "boundaryField",
77  "none",
78  getTypeName<T>(),
79  memory_space::name());
80 
81  if(boundaryBasevCtorSelector_.search(bType))
82  {
83  return boundaryBasevCtorSelector_[bType](boundary, pStruct, internal);
84  }
85  else
86  {
87  printKeys
88  (
89  fatalError << "Ctor Selector "<< bType << "for type "<<
90  Yellow_Text(getTypeName<T>()) << " does not exist.\n"
91  <<"Avaiable ones are: \n\n"
92  ,
93  boundaryBasevCtorSelector_
94  );
95  fatalExit;
96 
97  }
98  return nullptr;
99 }
pFlow::boundaryField::create
static uniquePtr< boundaryField > create(const boundaryBase &boundary, const pointStructure &pStruct, InternalFieldType &internal)
Definition: boundaryField.cpp:62
pFlow::angleBracketsNames3
word angleBracketsNames3(const word &base, const word &w1, const word &w2, const word &w3)
Output base<w1,sw2,w3>
Definition: bTypesFunctions.cpp:168
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
Yellow_Text
#define Yellow_Text(text)
Definition: iOstream.hpp:40
pFlow::boundaryBase::type
const word & type() const
Definition: boundaryBase.hpp:252
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::boundaryBase
Definition: boundaryBase.hpp:42
pFlow::VectorSingle
Definition: VectorSingle.hpp:44
pFlow::boundaryField::boundaryField
boundaryField(const boundaryBase &boundary, const pointStructure &pStruct, InternalFieldType &internal)
Definition: boundaryField.cpp:23
fatalError
#define fatalError
Report a fatal error and exit the applicaiton.
Definition: error.hpp:70
pFlow::internalField< T, void >
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::boundaryField::neighborProcField
virtual ProcVectorType & neighborProcField()
Definition: boundaryField.cpp:41
pFlow::generalBoundary
Definition: generalBoundary.hpp:38