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.
fluid_2dGLS_expl.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Author Pavel Ryzhakov and Julio Marti
11 //
12 
13 
14 
15 #if !defined(KRATOS_FLUID_2D_GLS_H_INCLUDED )
16 #define KRATOS_FLUID_2D_GLS_H_INCLUDED
17 
18 
19 
20 // System includes
21 
22 
23 // External includes
24 #include "boost/smart_ptr.hpp"
25 
26 
27 // Project includes
28 #include "includes/define.h"
29 #include "includes/element.h"
31 #include "includes/variables.h"
32 #include "includes/serializer.h"
33 
34 namespace Kratos
35 {
36 
39 
43 
47 
51 
55 
57 
60  : public Element
61 {
62 public:
65 
68 
72 
74  Fluid2DGLS_expl(IndexType NewId, GeometryType::Pointer pGeometry);
75  Fluid2DGLS_expl(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
76 
78  virtual ~Fluid2DGLS_expl();
79 
80 
84 
85 
89 
90  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const;
91 
92  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
93 
94  void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
95 
96  void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo);
97 
98  void GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo);
99 
100  void InitializeSolutionStep(ProcessInfo& CurrentProcessInfo);
101 
102  void Calculate(const Variable<double >& rVariable, double& Output, const ProcessInfo& rCurrentProcessInfo);
103 
104  void Calculate(const Variable<array_1d<double,3> >& rVariable, array_1d<double,3>& Output, const ProcessInfo& rCurrentProcessInfo);
105 
106 
110 
111 
115 
116 
120 
122  virtual std::string Info() const
123  {
124  return "Fluid2DGLS_expl #" ;
125  }
126 
128  virtual void PrintInfo(std::ostream& rOStream) const
129  {
130  rOStream << Info() << Id();
131  }
132 
134 // virtual void PrintData(std::ostream& rOStream) const;
135 
136 
140 
141 
143 
144 protected:
147 
148 
152 
153 
157 
158 
162 
163 
167 
168 
172 
173 
177 
178 
180 
181 private:
182  IntegrationMethod mThisIntegrationMethod;
183  std::vector< Matrix > mInvJ0;
184  Vector mDetJ0;
187 // static boost::numeric::ublas::bounded_matrix<double,3,3> msMassFactors;
188 // static boost::numeric::ublas::bounded_matrix<double,3,2> msDN_DX;
189 // static array_1d<double,3> msN; //dimension = number of nodes
190  //static Matrix msDN_DX;
191  //static Matrix msMassFactors;
192 // static array_1d<double,2> ms_vel_gauss; //dimesion coincides with space dimension
193 // static array_1d<double,3> ms_temp_vec_np; //dimension = number of nodes
194 // static array_1d<double,3> ms_u_DN;
195 
199 
203  friend class Serializer;
204 
205  // A private default constructor necessary for serialization
207  {
208  }
209 
210  virtual void save(Serializer& rSerializer) const
211  {
213  }
214 
215  virtual void load(Serializer& rSerializer)
216  {
218  }
219 
223  void CalculateLumpedMass();
224 
225  void CalculateGalerkinMomentumResidual(VectorType& Galerkin_RHS);
226  //calculates stabilized RHS and writes it directly to the nodes
227  void CalculateRHSVector(VectorType& GalerkinRHS, double& dt);
228 
229  //void RungeKuttaTimeIntegration(VectorType& RHS, double& d_t);
230  //SECOND STEP OF FRAC STEP IS DONE WITHIN CALCULATE LOCAL SYSTEM
231  //void SecondStepOfFractionalStep(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, double& dt);
232  void FinalFractionalStep(const ProcessInfo&);
233  void ComputeTimeStep(double CFLNumber);
234 
235  //void Stage1(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo, unsigned int ComponentIndex);
236  //void Stage2(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
237 
238 
239  //inline void CalculateGeometryData(Matrix& msDN_DX, Vector& N, double& Area)
240 // inline void CalculateGeometryData(boost::numeric::ublas::bounded_matrix<double,3,2>& DN_DX, array_1d<double,3>& N, double& Area);
241 
245 
246 
250 
251 
255 
256 
260 
262  //Fluid2DGLS_expl& operator=(const Fluid2DGLS_expl& rOther);
263 
265  //Fluid2DGLS_expl(const Fluid2DGLS_expl& rOther);
266 
267 
269 
270 }; // Class Fluid2DGLS_expl
271 
273 
276 
277 
281 
282 
284 /* inline std::istream& operator >> (std::istream& rIStream,
285  Fluid2DGLS_expl& rThis);
286 */
288 /* inline std::ostream& operator << (std::ostream& rOStream,
289  const Fluid2DGLS_expl& rThis)
290  {
291  rThis.PrintInfo(rOStream);
292  rOStream << std::endl;
293  rThis.PrintData(rOStream);
294 
295  return rOStream;
296  }*/
298 
299 } // namespace Kratos.
300 
301 #endif // KRATOS_FLUID_2D_GLS_H_INCLUDED defined
302 
303 
Base class for all Elements.
Definition: element.h:60
Vector VectorType
Definition: element.h:88
Element(IndexType NewId=0)
Definition: element.h:121
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
Short class definition.
Definition: fluid_2dGLS_expl.h:61
void InitializeSolutionStep(ProcessInfo &CurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:90
virtual std::string Info() const
Turn back information as a string.
Definition: fluid_2dGLS_expl.h:122
void GetDofList(DofsVectorType &ElementalDofList, ProcessInfo &CurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:495
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(Fluid2DGLS_expl)
Counted pointer of Fluid2DGLS_expl.
void Calculate(const Variable< double > &rVariable, double &Output, const ProcessInfo &rCurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:439
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, ProcessInfo &rCurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:276
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: fluid_2dGLS_expl.h:128
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new element pointer.
Definition: fluid_2dGLS_expl.cpp:70
void EquationIdVector(EquationIdVectorType &rResult, ProcessInfo &rCurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:477
friend class Serializer
Definition: fluid_2dGLS_expl.h:203
virtual ~Fluid2DGLS_expl()
Destructor.
Definition: fluid_2dGLS_expl.cpp:78
void CalculateRightHandSide(VectorType &rRightHandSideVector, ProcessInfo &rCurrentProcessInfo)
Definition: fluid_2dGLS_expl.cpp:83
IntegrationMethod
Definition: geometry_data.h:76
IndexType Id() const
Definition: indexed_object.h:107
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
dt
Definition: DEM_benchmarks.py:173
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ProcessInfo
Definition: edgebased_PureConvection.py:116
def load(f)
Definition: ode_solve.py:307