KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
pouliot_flow_field_2D.h
Go to the documentation of this file.
1 #if !defined(KRATOS_POULIOT_FLOW_FIELD_2D_H)
2 #define KRATOS_POULIOT_FLOW_FIELD_2D_H
3 
4 // /* External includes */
5 
6 // System includes
7 
8 // Project includes
9 #include "includes/variables.h"
10 
11 /* System includes */
12 #include <limits>
13 #include <iostream>
14 #include <iomanip>
15 
16 /* External includes */
17 #ifdef _OPENMP
18 #include <omp.h>
19 #endif
20 
21 /* Project includes */
22 #include "includes/define.h"
23 #include "utilities/openmp_utils.h"
24 #include "real_functions.h"
25 #include "velocity_field.h"
26 
27 
28 namespace Kratos
29 {
30 class KRATOS_API(SWIMMING_DEM_APPLICATION) PouliotFlowField2D : public VelocityField
31 {
32 public:
33 
35 
37 
39 {
40  unsigned int number_of_threads = ParallelUtilities::GetNumThreads();
41  ResizeVectorsForParallelism(number_of_threads);
42 }
43 
45 
47 
48 
49 //***************************************************************************************************************
50 //***************************************************************************************************************
51 void ResizeVectorsForParallelism(const int n_threads) override;
52 
53 void UpdateCoordinates(const double time, const array_1d<double, 3>& coor, const int i_thread = 0) override;
54 
55 void UpdateCoordinates(const double time, const DenseVector<double>& coor, const int i_thread = 0) override;
56 
57 void LockCoordinates(const int i_thread = 0) override;
58 
59 void UnlockCoordinates(const int i_thread = 0) override;
60 //***************************************************************************************************************
61 //***************************************************************************************************************
62 
66 
67 
71 
73 
74 virtual std::string Info() const override
75 {
76  return "";
77 }
78 
80 
81 virtual void PrintInfo(std::ostream& rOStream) const override
82 {
83 }
84 
86 
87 virtual void PrintData(std::ostream& rOStream) const override
88 {
89 }
90 
91 
95 
97 
98 protected:
101 
102 
106 
107 
111 
112 
113 // Values
114 
115 double U0(const int i_thread = 0) override;
116 double U1(const int i_thread = 0) override;
117 double U2(const int i_thread = 0) override;
118 
119 // First-order derivatives
120 
121 double U0DT(const int i_thread = 0) override;
122 double U0D0(const int i_thread = 0) override;
123 double U0D1(const int i_thread = 0) override;
124 double U0D2(const int i_thread = 0) override;
125 
126 double U1DT(const int i_thread = 0) override;
127 double U1D0(const int i_thread = 0) override;
128 double U1D1(const int i_thread = 0) override;
129 double U1D2(const int i_thread = 0) override;
130 
131 double U2DT(const int i_thread = 0) override;
132 double U2D0(const int i_thread = 0) override;
133 double U2D1(const int i_thread = 0) override;
134 double U2D2(const int i_thread = 0) override;
135 
136 // Second-order derivatives
137 
138 double U0DTDT(const int i_thread = 0) override;
139 double U0DTD0(const int i_thread = 0) override;
140 double U0DTD1(const int i_thread = 0) override;
141 double U0DTD2(const int i_thread = 0) override;
142 double U0D0D0(const int i_thread = 0) override;
143 double U0D0D1(const int i_thread = 0) override;
144 double U0D0D2(const int i_thread = 0) override;
145 double U0D1D1(const int i_thread = 0) override;
146 double U0D1D2(const int i_thread = 0) override;
147 double U0D2D2(const int i_thread = 0) override;
148 
149 double U1DTDT(const int i_thread = 0) override;
150 double U1DTD0(const int i_thread = 0) override;
151 double U1DTD1(const int i_thread = 0) override;
152 double U1DTD2(const int i_thread = 0) override;
153 double U1D0D0(const int i_thread = 0) override;
154 double U1D0D1(const int i_thread = 0) override;
155 double U1D0D2(const int i_thread = 0) override;
156 double U1D1D1(const int i_thread = 0) override;
157 double U1D1D2(const int i_thread = 0) override;
158 double U1D2D2(const int i_thread = 0) override;
159 
160 double U2DTDT(const int i_thread = 0) override;
161 double U2DTD0(const int i_thread = 0) override;
162 double U2DTD1(const int i_thread = 0) override;
163 double U2DTD2(const int i_thread = 0) override;
164 double U2D0D0(const int i_thread = 0) override;
165 double U2D0D1(const int i_thread = 0) override;
166 double U2D0D2(const int i_thread = 0) override;
167 double U2D1D1(const int i_thread = 0) override;
168 double U2D1D2(const int i_thread = 0) override;
169 double U2D2D2(const int i_thread = 0) override;
170 
174 
175 
179 
183 
184 
188 
189 
191 
192 private:
193 
197 
201 
202 std::vector<int> mCoordinatesAreUpToDate;
203 std::vector<double> mX;
204 std::vector<double> mY;
205 
209 
213 
214 
218 
219 
223 
224 
228 
231 
232 
234 
235 }; // Class PouliotFlowField2D
236 
238 
241 
242 
246 
247 } // namespace Kratos.
248 
249 #endif // KRATOS_POULIOT_FLOW_FIELD_2D_H defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: amatrix_interface.h:41
static int GetNumThreads()
Returns the current number of threads.
Definition: parallel_utilities.cpp:34
Definition: pouliot_flow_field_2D.h:31
KRATOS_CLASS_POINTER_DEFINITION(PouliotFlowField2D)
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: pouliot_flow_field_2D.h:87
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: pouliot_flow_field_2D.h:81
virtual ~PouliotFlowField2D()
Destructor.
Definition: pouliot_flow_field_2D.h:46
virtual std::string Info() const override
Turn back information as a stemplate<class T, std::size_t dim> tring.
Definition: pouliot_flow_field_2D.h:74
PouliotFlowField2D()
Default constructor.
Definition: pouliot_flow_field_2D.h:38
Definition: velocity_field.h:32
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
time
Definition: face_heat.py:85