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.
mixed_laplacian_element.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: Ruben Zorrilla
10 //
11 
12 #if !defined(KRATOS_MIXED_LAPLACIAN_ELEMENT_H_INCLUDED)
13 #define KRATOS_MIXED_LAPLACIAN_ELEMENT_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 namespace Kratos
26 {
27 
30 
31 
35 
36 
40 
41 
45 
46 
50 
55 template<std::size_t TDim, std::size_t TNumNodes>
57 {
58 public:
61 
64 
66  constexpr static unsigned int Dim = TDim;
67 
69  constexpr static unsigned int NumNodes = TNumNodes;
70 
72  constexpr static unsigned int BlockSize = 1 + TDim;
73 
75  constexpr static unsigned int LocalSize = TNumNodes * BlockSize;
76 
80 
83  IndexType NewId,
84  GeometryType::Pointer pGeometry);
85 
87  IndexType NewId,
88  GeometryType::Pointer pGeometry,
89  PropertiesType::Pointer pProperties);
90 
92  virtual ~MixedLaplacianElement();
93 
94 
98 
99 
103 
104  Element::Pointer Create(
105  IndexType NewId,
106  NodesArrayType const& ThisNodes,
107  PropertiesType::Pointer pProperties) const override;
108 
109  Element::Pointer Create(
110  IndexType NewId,
111  GeometryType::Pointer pGeom,
112  PropertiesType::Pointer pProperties) const override;
113 
115  MatrixType& rLeftHandSideMatrix,
116  VectorType& rRightHandSideVector,
117  const ProcessInfo& rCurrentProcessInfo) override;
118 
120  MatrixType& rLeftHandSideMatrix,
121  const ProcessInfo& rCurrentProcessInfo) override;
122 
124  VectorType& rRightHandSideVector,
125  const ProcessInfo& rCurrentProcessInfo) override;
126 
127  void EquationIdVector(
128  EquationIdVectorType& rResult,
129  const ProcessInfo& rCurrentProcessInfo) const override;
130 
131  void GetDofList(
132  DofsVectorType& rElementalDofList,
133  const ProcessInfo& CurrentProcessInfo) const override;
134 
135  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
136 
140 
141 
145 
146  IntegrationMethod GetIntegrationMethod() const override;
147 
151 
155 
156 
158 protected:
161 
162 
166 
167 
171 
172 
176 
177 
181 
182 
186 
187 
191 
192  // Protected default constructor necessary for serialization
194  {
195  }
196 
198 private:
201 
202 
206 
207 
211  friend class Serializer;
212 
213  void save(Serializer& rSerializer) const override
214  {
216  }
217 
218  void load(Serializer& rSerializer) override
219  {
221  }
222 
226 
227 
231 
232 
236 
237 
241 
242 
246 
247 
249 }; // Class MixedLaplacianElement
250 
252 
255 
256 
260 
261 
263 /* inline std::istream& operator >> (std::istream& rIStream,
264  MixedLaplacianElement& rThis);
265 */
267 /* inline std::ostream& operator << (std::ostream& rOStream,
268  const MixedLaplacianElement& rThis)
269  {
270  rThis.PrintInfo(rOStream);
271  rOStream << std::endl;
272  rThis.PrintData(rOStream);
273 
274  return rOStream;
275  }*/
277 
278 } // namespace Kratos.
279 
280 #endif // KRATOS_MIXED_LAPLACIAN_ELEMENT_H_INCLUDED defined
Base class for all Elements.
Definition: element.h:60
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
IntegrationMethod
Definition: geometry_data.h:76
Mixed Laplacian formulation element This element implements a mixed Laplacian (scalar - gradient) for...
Definition: mixed_laplacian_element.h:57
constexpr static unsigned int NumNodes
Number of nodes of the element.
Definition: mixed_laplacian_element.h:69
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: mixed_laplacian_element.cpp:225
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: mixed_laplacian_element.cpp:268
IntegrationMethod GetIntegrationMethod() const override
Definition: mixed_laplacian_element.cpp:338
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: mixed_laplacian_element.cpp:52
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: mixed_laplacian_element.cpp:77
constexpr static unsigned int Dim
Physical space dimension for the problem.
Definition: mixed_laplacian_element.h:66
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: mixed_laplacian_element.cpp:300
constexpr static unsigned int LocalSize
Problem size.
Definition: mixed_laplacian_element.h:75
constexpr static unsigned int BlockSize
Single node block size.
Definition: mixed_laplacian_element.h:72
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MixedLaplacianElement)
Counted pointer of MixedLaplacianElement.
MixedLaplacianElement()
Definition: mixed_laplacian_element.h:193
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: mixed_laplacian_element.cpp:236
virtual ~MixedLaplacianElement()
Destructor.
Definition: mixed_laplacian_element.cpp:70
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: mixed_laplacian_element.cpp:214
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