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_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_ELEM_H_INCLUDED )
13 #define KRATOS_TRIANGULAR_CONVDIFF_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 #include "includes/serializer.h"
25 
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
49 
59  : public Element
60 {
61 public:
64 
66  // typedef GeometryData::IntegrationMethod IntegrationMethod;
68 
72 
74  ConvDiff2D(IndexType NewId, GeometryType::Pointer pGeometry);
75  ConvDiff2D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
76 
78  virtual ~ConvDiff2D();
79 
80 
84 
85 
89  //IntegrationMethod GetIntegrationMethod();
90  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
91 
92  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
93 
95 
96 
97 
98  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
99 
100  void CalculateRightHandSide(VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
101  //virtual void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, ProcessInfo& rCurrentProcessInfo);
102 
104  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
105 
107  void GetDofList(DofsVectorType& ElementalDofList, const ProcessInfo& CurrentProcessInfo) const override;
109  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
110 
111  /* double ComputeSmagorinskyViscosity(const BoundedMatrix<double, 3, 2 > & DN_DX,const double& h,const double& C,const double nu);*/
112 
116 
117 
121 
122 
126 
128 // virtual String Info() const;
129 
131 // virtual void PrintInfo(std::ostream& rOStream) const;
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 
191 
195  friend class Serializer;
196 
197  // A private default constructor necessary for serialization
198  ConvDiff2D() : Element()
199  {
200  }
201 
202  void save(Serializer& rSerializer) const override
203  {
205  }
206 
207  void load(Serializer& rSerializer) override
208  {
210  }
211 
212 
213 
214 
218 
222 
223 
227 
228 
232 
233 
237 
239  //ConvDiff2D& operator=(const ConvDiff2D& rOther);
240 
242  //ConvDiff2D(const ConvDiff2D& rOther);
243 
244 
246 
247 }; // Class ConvDiff2D
248 
250 
253 
254 
258 
259 
261 /* inline std::istream& operator >> (std::istream& rIStream,
262  ConvDiff2D& rThis);
263 */
265 /* inline std::ostream& operator << (std::ostream& rOStream,
266  const ConvDiff2D& rThis)
267  {
268  rThis.PrintInfo(rOStream);
269  rOStream << std::endl;
270  rThis.PrintData(rOStream);
271 
272  return rOStream;
273  }*/
275 
276 } // namespace Kratos.
277 
278 #endif // KRATOS_TRIANGULAR_CONVDIFF_ELEM_H_INCLUDED defined
279 
280 
A stabilized element for solving the convection diffusion equations in 2D.
Definition: conv_diff_2d.h:60
virtual ~ConvDiff2D()
Destructor.
Definition: conv_diff_2d.cpp:61
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Evaluates and .
Definition: conv_diff_2d.cpp:68
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: conv_diff_2d.cpp:239
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: conv_diff_2d.cpp:45
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Provides the global indices for each one of this element's local rows.
Definition: conv_diff_2d.cpp:314
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Returns a list of the element's Dofs.
Definition: conv_diff_2d.cpp:329
friend class Serializer
Definition: conv_diff_2d.h:195
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Calculates the temperature convective projection.
Definition: conv_diff_2d.cpp:250
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ConvDiff2D)
Counted pointer of ConvDiff2D.
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
def load(f)
Definition: ode_solve.py:307