fixedWall.hpp
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 #ifndef __fixedWall_hpp__
22 #define __fixedWall_hpp__
23 
24 
25 #include "types.hpp"
26 #include "typeInfo.hpp"
27 #include "Vectors.hpp"
28 #include "uniquePtr.hpp"
29 
30 
31 
32 namespace pFlow
33 {
34 
35 class dictionary;
36 
37 class fixedWall
38 {
39 public:
40 
41  // - this class shuold be decleared in every motion model with
42  // exact methods
43  class Model
44  {
45 
46  public:
47 
49  Model(){}
50 
52  Model(const Model&) = default;
53 
55  Model& operator=(const Model&) = default;
56 
57 
60  {
61  return 0.0;
62  }
63 
65  realx3 operator()(int32 n, const realx3& p)const
66  {
67  return 0.0;
68  }
69 
71  realx3 transferPoint(int32 n, const realx3 p, real dt)const
72  {
73  return p;
74  }
75 
77  {
78  return 0;
79  }
80  };
81 
82 protected:
83 
84  const word name_ = "none";
85 
86  bool readDictionary(const dictionary& dict);
87 
88  bool writeDictionary(dictionary& dict)const;
89 
90 public:
91 
92  TypeInfoNV("fixedWall");
93 
94  // empty
95  fixedWall();
96 
97  // construct with dictionary
98  fixedWall(const dictionary& dict);
99 
100  fixedWall(const fixedWall&) = default;
101 
102  fixedWall(fixedWall&&) = default;
103 
104  fixedWall& operator=(const fixedWall&) = default;
105 
106  fixedWall& operator=(fixedWall&&) = default;
107 
108  ~fixedWall() = default;
109 
111  {
112  return Model();
113  }
114 
115  int32 nameToIndex(const word& name)const
116  {
117  return 0;
118  }
119 
121  {
122  return name_;
123  }
124 
125 
127  realx3 pointVelocity(label n, const realx3& p)const
128  {
129  return zero3;
130  }
131 
132 
133 
135  realx3 transferPoint(label n, const realx3 p, real dt)const
136  {
137  return p;
138  }
139 
140 
141 
143  bool transferPoint(label n, realx3* pVec, size_t numP, real dt)
144  {
145  return true;
146  }
147 
149  bool isMoving()const
150  {
151  return false;
152  }
153 
154  bool move(real t, real dt)
155  {
156  return true;
157  }
158 
159  FUNCTION_H
160  bool read(iIstream& is);
161 
162  FUNCTION_H
163  bool write(iOstream& os)const;
164 
165 
166 };
167 
168 } // pFlow
169 
170 #endif //__fixed_hpp__
pFlow::fixedWall::read
FUNCTION_H bool read(iIstream &is)
Definition: fixedWall.cpp:70
pFlow::fixedWall::pointVelocity
INLINE_FUNCTION_HD realx3 pointVelocity(label n, const realx3 &p) const
Definition: fixedWall.hpp:127
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::fixedWall::transferPoint
INLINE_FUNCTION_HD realx3 transferPoint(label n, const realx3 p, real dt) const
Definition: fixedWall.hpp:135
pFlow::fixedWall::isMoving
INLINE_FUNCTION_HD bool isMoving() const
Definition: fixedWall.hpp:149
pFlow::fixedWall::writeDictionary
bool writeDictionary(dictionary &dict) const
Definition: fixedWall.cpp:44
pFlow::fixedWall::Model::Model
INLINE_FUNCTION_HD Model()
Definition: fixedWall.hpp:49
types.hpp
pFlow::fixedWall::indexToName
word indexToName(label i) const
Definition: fixedWall.hpp:120
pFlow::fixedWall::name_
const word name_
Definition: fixedWall.hpp:84
pFlow::fixedWall::move
bool move(real t, real dt)
Definition: fixedWall.hpp:154
pFlow::fixedWall::Model::pointVelocity
INLINE_FUNCTION_HD realx3 pointVelocity(int32 n, const realx3 p) const
Definition: fixedWall.hpp:59
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::zero3
const realx3 zero3(0.0)
Definition: types.hpp:97
Vectors.hpp
pFlow::fixedWall::transferPoint
INLINE_FUNCTION_HD bool transferPoint(label n, realx3 *pVec, size_t numP, real dt)
Definition: fixedWall.hpp:143
pFlow::fixedWall::write
FUNCTION_H bool write(iOstream &os) const
Definition: fixedWall.cpp:91
pFlow
Definition: demComponent.hpp:28
FUNCTION_H
#define FUNCTION_H
Definition: pFlowMacros.hpp:58
uniquePtr.hpp
n
int32 n
Definition: NBSCrossLoop.hpp:24
pFlow::iIstream
Definition: iIstream.hpp:33
pFlow::int32
int int32
Definition: builtinTypes.hpp:53
pFlow::fixedWall
Definition: fixedWall.hpp:37
pFlow::fixedWall::fixedWall
fixedWall()
Definition: fixedWall.cpp:55
pFlow::fixedWall::Model::operator=
INLINE_FUNCTION_HD Model & operator=(const Model &)=default
pFlow::fixedWall::Model::transferPoint
INLINE_FUNCTION_HD realx3 transferPoint(int32 n, const realx3 p, real dt) const
Definition: fixedWall.hpp:71
pFlow::fixedWall::nameToIndex
int32 nameToIndex(const word &name) const
Definition: fixedWall.hpp:115
pFlow::fixedWall::operator=
fixedWall & operator=(const fixedWall &)=default
pFlow::fixedWall::getModel
Model getModel(real t) const
Definition: fixedWall.hpp:110
pFlow::fixedWall::Model::numComponents
INLINE_FUNCTION_HD int32 numComponents() const
Definition: fixedWall.hpp:76
pFlow::fixedWall::~fixedWall
~fixedWall()=default
pFlow::fixedWall::readDictionary
bool readDictionary(const dictionary &dict)
Definition: fixedWall.cpp:26
typeInfo.hpp
pFlow::label
std::size_t label
Definition: builtinTypes.hpp:61
pFlow::fixedWall::TypeInfoNV
TypeInfoNV("fixedWall")
pFlow::fixedWall::Model
Definition: fixedWall.hpp:43
INLINE_FUNCTION_HD
#define INLINE_FUNCTION_HD
Definition: pFlowMacros.hpp:51
pFlow::triple< real >
pFlow::iOstream
Definition: iOstream.hpp:53
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::fixedWall::Model::operator()
INLINE_FUNCTION_HD realx3 operator()(int32 n, const realx3 &p) const
Definition: fixedWall.hpp:65