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.
embedded_compressible_potential_flow_element.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: Marc Nunez, based on Inigo Lopez and Riccardo Rossi work
11 //
12 
13 #if !defined(KRATOS_EMBEDDED_COMPRESSIBLE_POTENTIAL_FLOW_ELEMENT_H)
14 #define KRATOS_EMBEDDED_COMPRESSIBLE_POTENTIAL_FLOW_ELEMENT_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
24 
25 namespace Kratos
26 {
27 template <int Dim, int NumNodes>
29 {
30 public:
33 
35 
36  typedef typename BaseType::IndexType IndexType;
40  typedef typename BaseType::VectorType VectorType;
41  typedef typename BaseType::MatrixType MatrixType;
42 
46 
50 
51  // Constructors.
52 
54 
58 
63  : CompressiblePotentialFlowElement<Dim,NumNodes>(NewId, ThisNodes){}
64 
68  EmbeddedCompressiblePotentialFlowElement(IndexType NewId, typename GeometryType::Pointer pGeometry)
69  : CompressiblePotentialFlowElement<Dim,NumNodes>(NewId, pGeometry){}
70 
75  typename GeometryType::Pointer pGeometry,
76  typename PropertiesType::Pointer pProperties)
77  : CompressiblePotentialFlowElement<Dim,NumNodes>(NewId, pGeometry, pProperties){}
78 
83 
88 
93 
97 
100 
103 
104  Element::Pointer Create(IndexType NewId,
105  NodesArrayType const& ThisNodes,
106  typename PropertiesType::Pointer pProperties) const override;
107 
108  Element::Pointer Create(IndexType NewId,
109  typename GeometryType::Pointer pGeom,
110  typename PropertiesType::Pointer pProperties) const override;
111 
112  Element::Pointer Clone(IndexType NewId, NodesArrayType const& ThisNodes) const override;
113 
114  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
115  VectorType& rRightHandSideVector,
116  const ProcessInfo& rCurrentProcessInfo) override;
117 
118  void CalculateRightHandSide(VectorType& rRightHandSideVector,
119  const ProcessInfo& rCurrentProcessInfo) override;
120 
121  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
122  const ProcessInfo& rCurrentProcessInfo) override;
123 
124  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
126  std::string Info() const override;
127 
129  void PrintInfo(std::ostream& rOStream) const override;
130 
132  void PrintData(std::ostream& rOStream) const override;
133 
134 
135 protected:
136 
137  ModifiedShapeFunctions::Pointer pGetModifiedShapeFunctions(Vector& rDistances);
138 
139 private:
140 
141  void CalculateEmbeddedLocalSystem(MatrixType& rLeftHandSideMatrix,
142  VectorType& rRightHandSideVector,
143  const ProcessInfo& rCurrentProcessInfo);
144 
145  void CalculateKuttaWakeLocalSystem(MatrixType& rLeftHandSideMatrix,
146  VectorType& rRightHandSideVector,
147  const ProcessInfo& rCurrentProcessInfo);
148 
149  friend class Serializer;
150 
151  void save(Serializer& rSerializer) const override;
152 
153  void load(Serializer& rSerializer) override;
154 
155 }; // Class EmbeddedCompressiblePotentialFlowElement
156 
157 } // namespace Kratos.
158 
159 #endif // KRATOS_EMBEDDED_INCOMPRESSIBLE_POTENTIAL_FLOW_ELEMENT_H defined
Definition: compressible_potential_flow_element.h:48
Vector VectorType
Definition: element.h:88
Properties PropertiesType
Definition: element.h:80
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: element.h:86
Matrix MatrixType
Definition: element.h:90
Definition: embedded_compressible_potential_flow_element.h:29
EmbeddedCompressiblePotentialFlowElement(IndexType NewId, typename GeometryType::Pointer pGeometry)
Definition: embedded_compressible_potential_flow_element.h:68
BaseType::GeometryType GeometryType
Definition: embedded_compressible_potential_flow_element.h:37
EmbeddedCompressiblePotentialFlowElement & operator=(EmbeddedCompressiblePotentialFlowElement const &rOther)=delete
Assignment operator.
BaseType::MatrixType MatrixType
Definition: embedded_compressible_potential_flow_element.h:41
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_compressible_potential_flow_element.cpp:95
ModifiedShapeFunctions::Pointer pGetModifiedShapeFunctions(Vector &rDistances)
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
It creates a new element pointer and clones the previous element data.
Definition: embedded_compressible_potential_flow_element.cpp:43
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: embedded_compressible_potential_flow_element.cpp:228
~EmbeddedCompressiblePotentialFlowElement() override
Definition: embedded_compressible_potential_flow_element.h:92
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_compressible_potential_flow_element.cpp:53
BaseType::VectorType VectorType
Definition: embedded_compressible_potential_flow_element.h:40
EmbeddedCompressiblePotentialFlowElement(IndexType NewId, typename GeometryType::Pointer pGeometry, typename PropertiesType::Pointer pProperties)
Definition: embedded_compressible_potential_flow_element.h:74
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: embedded_compressible_potential_flow_element.cpp:268
std::string Info() const override
Turn back information as a string.
Definition: embedded_compressible_potential_flow_element.cpp:254
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: embedded_compressible_potential_flow_element.cpp:262
BaseType::IndexType IndexType
Definition: embedded_compressible_potential_flow_element.h:36
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: embedded_compressible_potential_flow_element.cpp:87
BaseType::NodesArrayType NodesArrayType
Definition: embedded_compressible_potential_flow_element.h:39
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, typename PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: embedded_compressible_potential_flow_element.cpp:23
EmbeddedCompressiblePotentialFlowElement(IndexType NewId=0)
Default constuctor.
Definition: embedded_compressible_potential_flow_element.h:57
EmbeddedCompressiblePotentialFlowElement & operator=(EmbeddedCompressiblePotentialFlowElement &&rOther)=delete
Move operator.
BaseType::PropertiesType PropertiesType
Definition: embedded_compressible_potential_flow_element.h:38
EmbeddedCompressiblePotentialFlowElement(EmbeddedCompressiblePotentialFlowElement &&rOther)=delete
CompressiblePotentialFlowElement< Dim, NumNodes > BaseType
Definition: embedded_compressible_potential_flow_element.h:34
EmbeddedCompressiblePotentialFlowElement(EmbeddedCompressiblePotentialFlowElement const &rOther)=delete
EmbeddedCompressiblePotentialFlowElement(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: embedded_compressible_potential_flow_element.h:62
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(EmbeddedCompressiblePotentialFlowElement)
std::size_t IndexType
Definition: flags.h:74
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307