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.
conv_diff_change_of_phase_2d.h
Go to the documentation of this file.
1 // KRATOS ___ ___ _ ___ __ ___ ___ ___ ___
2 // / __/ _ \| \| \ \ / /__| \_ _| __| __|
3 // | (_| (_) | .` |\ V /___| |) | || _|| _|
4 // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION
5 //
6 // License: BSD License
7 // Kratos default license: kratos/license.txt
8 //
9 // Main authors: Riccardo Rossi
10 //
11 
12 #if !defined(KRATOS_TRIANGULAR_CONVDIFF_2_ELEM_H_INCLUDED )
13 #define KRATOS_TRIANGULAR_CONVDIFF_2_ELEM_H_INCLUDED
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "includes/element.h"
23 #include "includes/variables.h"
24 
25 #include "includes/serializer.h"
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
49 
52  : public Element
53 {
54 public:
57 
60 
64 
66  ConvDiffChangeOfPhase2D(IndexType NewId, GeometryType::Pointer pGeometry);
67  ConvDiffChangeOfPhase2D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
68 
70  virtual ~ConvDiffChangeOfPhase2D();
71 
72 
76 
77 
81 
82  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
83 
84  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
85 
86  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector,const ProcessInfo& rCurrentProcessInfo);
87 
88  //void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo);
89  //virtual void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo);
90 
91  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const ;
92 
93  void GetDofList(DofsVectorType& ElementalDofList, const ProcessInfo& CurrentProcessInfo) const ;
94 
95  void CalculateRightHandSide(VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo);
96 
97  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo);
98 
99  double AA(double, double, double, double, double, double);
100 
101  Vector Z(Matrix, double, double, double, double, double, double, double, double, double);
102 
103  void CC(double, double, double, double, double, double, double, MatrixType&, VectorType&, ProcessInfo&);
104 
105  void DD(double, double, double, double, double, double, double, double, MatrixType&, VectorType& , ProcessInfo&);
106 
107 
108  void A2(double ,double, double, double, double,double ,double,double, MatrixType&, VectorType& , ProcessInfo&);
109 
110  void A1(double,double, double, double, double,double,double, MatrixType& , VectorType& , ProcessInfo&);
111 
115 
116 
120 
121 
125 
127 // virtual String Info() const;
128 
130 // virtual void PrintInfo(std::ostream& rOStream) const;
131 
133 // virtual void PrintData(std::ostream& rOStream) const;
134 
135 
139 
140 
142 
143 protected:
146 
147 
151 
152 
156 
157 
161 
162 
166 
167 
171 
172 
176 
177 
179 
180 private:
183  static BoundedMatrix<double,3,3> msMassFactors;
184  static BoundedMatrix<double,3,2> msDN_DX;
185  static array_1d<double,3> msN; //dimension = number of nodes
186  //static Matrix msDN_DX;
187  //static Matrix msMassFactors;
188  static array_1d<double,2> ms_vel_gauss; //dimesion coincides with space dimension
189  static array_1d<double,3> ms_temp_vec_np; //dimension = number of nodes
190  static array_1d<double,3> ms_u_DN;
191 
192  double f(double T);
193 
194  double k(double a);
195 
196  double g(double T);
197 
201  friend class Serializer;
202 
203  // A private default constructor necessary for serialization
205  {
206  }
207 
208  virtual void save(Serializer& rSerializer) const
209  {
211  }
212 
213  virtual void load(Serializer& rSerializer)
214  {
216  }
217 
218 
222 
223 
224 
228 
232 
233 
237 
238 
242 
243 
247 
249  //ConvDiffChangeOfPhase2D& operator=(const ConvDiffChangeOfPhase2D& rOther);
250 
252  //ConvDiffChangeOfPhase2D(const ConvDiffChangeOfPhase2D& rOther);
253 
254 
256 
257 }; // Class ConvDiffChangeOfPhase2D
258 
260 
263 
264 
268 
269 
271 /* inline std::istream& operator >> (std::istream& rIStream,
272  ConvDiffChangeOfPhase2D& rThis);
273 */
275 /* inline std::ostream& operator << (std::ostream& rOStream,
276  const ConvDiffChangeOfPhase2D& rThis)
277  {
278  rThis.PrintInfo(rOStream);
279  rOStream << std::endl;
280  rThis.PrintData(rOStream);
281 
282  return rOStream;
283  }*/
285 
286 } // namespace Kratos.
287 
288 #endif // KRATOS_TRIANGULAR_CONVDIFF_2_ELEM_H_INCLUDED defined
289 
290 
Short class definition.
Definition: conv_diff_change_of_phase_2d.h:53
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const
Definition: conv_diff_change_of_phase_2d.cpp:618
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const
Definition: conv_diff_change_of_phase_2d.cpp:630
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ConvDiffChangeOfPhase2D)
Counted pointer of ConvDiffChangeOfPhase2D.
void A1(double, double, double, double, double, double, double, MatrixType &, VectorType &, ProcessInfo &)
double AA(double, double, double, double, double, double)
Definition: conv_diff_change_of_phase_2d.cpp:484
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo)
Definition: conv_diff_change_of_phase_2d.cpp:568
void CC(double, double, double, double, double, double, double, MatrixType &, VectorType &, ProcessInfo &)
Definition: conv_diff_change_of_phase_2d.cpp:507
void DD(double, double, double, double, double, double, double, double, MatrixType &, VectorType &, ProcessInfo &)
Definition: conv_diff_change_of_phase_2d.cpp:533
Vector Z(Matrix, double, double, double, double, double, double, double, double, double)
Definition: conv_diff_change_of_phase_2d.cpp:491
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: conv_diff_change_of_phase_2d.cpp:79
friend class Serializer
Definition: conv_diff_change_of_phase_2d.h:201
void A2(double, double, double, double, double, double, double, double, MatrixType &, VectorType &, ProcessInfo &)
virtual ~ConvDiffChangeOfPhase2D()
Destructor.
Definition: conv_diff_change_of_phase_2d.cpp:73
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: conv_diff_change_of_phase_2d.cpp:559
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: conv_diff_change_of_phase_2d.cpp:63
Base class for all Elements.
Definition: element.h:60
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
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
a
Definition: generate_stokes_twofluid_element.py:77
def load(f)
Definition: ode_solve.py:307