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.
updated_lagrangian_fluid3D_inc.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3 KratosULFApplication
4 A library based on:
5 Kratos
6 A General Purpose Software for Multi-Physics Finite Element Analysis
7 Version 1.0 (Released on march 05, 2007).
8 
9 Copyright 2007
10 Pooyan Dadvand, Riccardo Rossi, Pawel Ryzhakov
11 pooyan@cimne.upc.edu
12 rrossi@cimne.upc.edu
13 - CIMNE (International Center for Numerical Methods in Engineering),
14 Gran Capita' s/n, 08034 Barcelona, Spain
15 
16 
17 Permission is hereby granted, free of charge, to any person obtaining
18 a copy of this software and associated documentation files (the
19 "Software"), to deal in the Software without restriction, including
20 without limitation the rights to use, copy, modify, merge, publish,
21 distribute, sublicense and/or sell copies of the Software, and to
22 permit persons to whom the Software is furnished to do so, subject to
23 the following condition:
24 
25 Distribution of this code for any commercial purpose is permissible
26 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS.
27 
28 The above copyright notice and this permission notice shall be
29 included in all copies or substantial portions of the Software.
30 
31 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 
39 ==============================================================================
40 */
41 
42 
43 //
44 // Project Name: Kratos
45 // Last Modified by: $Author: anonymous $
46 // Date: $Date: 2007-10-25 12:00:12 $
47 // Revision: $Revision: 1.1 $
48 //
49 //
50 
51 
52 #if !defined(KRATOS_UPDATED_LAGRANGIAN__FLUID_3D_INC_H_INCLUDED )
53 #define KRATOS_UPDATED_LAGRANGIAN__FLUID_3D_INC_H_INCLUDED
54 
55 
56 
57 // System includes
58 
59 
60 // External includes
61 #include "boost/smart_ptr.hpp"
62 
63 
64 // Project includes
65 #include "includes/define.h"
66 #include "includes/element.h"
68 #include "includes/variables.h"
69 #include "includes/serializer.h"
70 
71 namespace Kratos
72 {
73 
76 
80 
84 
88 
92 
94 
97  : public Element
98 {
99 public:
102 
105 
109 
111  UpdatedLagrangianFluid3Dinc(IndexType NewId, GeometryType::Pointer pGeometry);
112  UpdatedLagrangianFluid3Dinc(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
113 
115  ~UpdatedLagrangianFluid3Dinc() override;
116 
117 
121 
122 
126 
127  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const;
128 
129  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
130 
131  void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
132  //virtual void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo);
133 
134  void EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& rCurrentProcessInfo);
135 
136  void GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo);
137 
138  void InitializeSolutionStep(ProcessInfo& CurrentProcessInfo);
139 
140  void Calculate(const Variable<double >& rVariable, double& Output, const ProcessInfo& rCurrentProcessInfo);
141  void CalculateMassMatrix(MatrixType& rMassMatrix, ProcessInfo& rCurrentProcessInfo);
142  void CalculateDampingMatrix(MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo);
143  void GetValuesVector(Vector& values, int Step = 0);
144  void GetFirstDerivativesVector(Vector& values, int Step = 0);
145  void GetSecondDerivativesVector(Vector& values, int Step = 0);
146 
147 
151 
152 
156 
157 
161 
163  std::string Info() const override
164  {
165  return "UpdatedLagrangianFluid3Dinc #" ;
166  }
167 
169  void PrintInfo(std::ostream& rOStream) const override
170  {
171  rOStream << Info() << Id();
172  }
173 
175 // virtual void PrintData(std::ostream& rOStream) const;
176 
177 
181 
182 
184 
185 protected:
188 
189 
193 
194 
198 
199 
203 
204 
208 
209 
213 
214 
218 
219 
221 
222 private:
225  static BoundedMatrix<double,4,4> msMassFactors;
226  static BoundedMatrix<double,4,3> msDN_Dx;
227  static array_1d<double,4> msN; //dimension = number of nodes
228  //static Matrix msDN_DX;
229  //static Matrix msMassFactors;
230  static array_1d<double,3> ms_vel_gauss; //dimesion coincides with space dimension
231  static array_1d<double,4> ms_temp_vec_np; //dimension = number of nodes
232  static array_1d<double,4> ms_u_DN;
233 
234  static BoundedMatrix<double,6,12> msB;
235  static BoundedMatrix<double,6,6> ms_constitutive_matrix;
236  static BoundedMatrix<double,6,12> ms_temp;
237 
238  static array_1d<double,6> ms_temp_vec;
239  /*
240  static boost::numeric::ublas::bounded_matrix<double,3,3> msMassFactors;
241  static boost::numeric::ublas::bounded_matrix<double,3,2> msDN_Dx;
242  static array_1d<double,3> msN; //dimension = number of nodes
243  //static Matrix msDN_DX;
244  //static Matrix msMassFactors;
245  static array_1d<double,2> ms_vel_gauss; //dimesion coincides with space dimension
246  static array_1d<double,3> ms_temp_vec_np; //dimension = number of nodes
247  static array_1d<double,3> ms_u_DN;
248 
249 
250  static boost::numeric::ublas::bounded_matrix<double,3,6> msB;
251  static boost::numeric::ublas::bounded_matrix<double,3,3> ms_constitutive_matrix;
252  static boost::numeric::ublas::bounded_matrix<double,3,6> ms_temp;
253  static array_1d<double,6> ms_temp_vec;
254  */
255 
259  double mA0; //stores area at the beginning of time-step
260 
264  friend class Serializer;
265 
266  // A private default constructor necessary for serialization
268  {
269  }
270 
271  void save(Serializer& rSerializer) const override
272  {
274  }
275 
276  void load(Serializer& rSerializer) override
277  {
279  }
280 
281 
282 
286  void Stage1(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo, unsigned int ComponentIndex);
287  void Stage2(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
288 
289  void MeshMovingStep(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo, unsigned int ComponentIndex);
290 
291  //inline void CalculateGeometryData(Matrix& msDN_DX, Vector& N, double& Area)
292  //inline void CalculateGeometryData(boost::numeric::ublas::bounded_matrix<double,4,3>& DN_DX, array_1d<double,4>& N, double& Area);
293 
297 
298 
302 
303 
307 
308 
312 
314  //UpdatedLagrangianFluid3Dinc& operator=(const UpdatedLagrangianFluid3Dinc& rOther);
315 
317  //UpdatedLagrangianFluid3Dinc(const UpdatedLagrangianFluid3Dinc& rOther);
318 
319 
321 
322 }; // Class UpdatedLagrangianFluid3Dinc
323 
325 
328 
329 
333 
334 
336 /* inline std::istream& operator >> (std::istream& rIStream,
337  UpdatedLagrangianFluid3Dinc& rThis);
338 */
340 /* inline std::ostream& operator << (std::ostream& rOStream,
341  const UpdatedLagrangianFluid3Dinc& rThis)
342  {
343  rThis.PrintInfo(rOStream);
344  rOStream << std::endl;
345  rThis.PrintData(rOStream);
346 
347  return rOStream;
348  }*/
350 
351 } // namespace Kratos.
352 
353 #endif // KRATOS_UPDATED_LAGRANGIAN__FLUID_3D_INC_H_INCLUDED defined
354 
355 
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
Matrix MatrixType
Definition: element.h:90
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
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
Short class definition.
Definition: updated_lagrangian_fluid3D_inc.h:98
void CalculateRightHandSide(VectorType &rRightHandSideVector, ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:205
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:108
void GetValuesVector(Vector &values, int Step=0)
Definition: updated_lagrangian_fluid3D_inc.cpp:455
std::string Info() const override
Turn back information as a string.
Definition: updated_lagrangian_fluid3D_inc.h:163
void GetDofList(DofsVectorType &ElementalDofList, ProcessInfo &CurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:437
void InitializeSolutionStep(ProcessInfo &CurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:407
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: updated_lagrangian_fluid3D_inc.h:169
void CalculateDampingMatrix(MatrixType &rDampingMatrix, ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:307
void Calculate(const Variable< double > &rVariable, double &Output, const ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:508
void CalculateMassMatrix(MatrixType &rMassMatrix, ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:275
~UpdatedLagrangianFluid3Dinc() override
Destructor.
Definition: updated_lagrangian_fluid3D_inc.cpp:102
void EquationIdVector(EquationIdVectorType &rResult, ProcessInfo &rCurrentProcessInfo)
Definition: updated_lagrangian_fluid3D_inc.cpp:418
friend class Serializer
Definition: updated_lagrangian_fluid3D_inc.h:264
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new element pointer.
Definition: updated_lagrangian_fluid3D_inc.cpp:92
void GetFirstDerivativesVector(Vector &values, int Step=0)
Definition: updated_lagrangian_fluid3D_inc.cpp:474
void GetSecondDerivativesVector(Vector &values, int Step=0)
Definition: updated_lagrangian_fluid3D_inc.cpp:491
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(UpdatedLagrangianFluid3Dinc)
Counted pointer of UpdatedLagrangianFluid3Dinc.
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
list values
Definition: bombardelli_test.py:42
ProcessInfo
Definition: edgebased_PureConvection.py:116
def load(f)
Definition: ode_solve.py:307