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.
three_step_second_order_pspg_updated_lagrangian_element.h
Go to the documentation of this file.
1 //
2 // Project Name: KratosFluidDynamicsApplication $
3 // Last modified by: $Author: AFranci $
4 // Date: $Date: June 2021 $
5 // Revision: $Revision: 0.0 $
6 //
7 //
8 
9 #if !defined(KRATOS_THREE_STEP_SECOND_ORDER_PSPG_UPDATED_LAGRANGIAN_ELEMENT_H_INCLUDED)
10 #define KRATOS_THREE_STEP_SECOND_ORDER_PSPG_UPDATED_LAGRANGIAN_ELEMENT_H_INCLUDED
11 
12 // System includes
13 #include <string>
14 #include <iostream>
15 
16 // External includes
17 
18 // Project includes
19 #include "containers/array_1d.h"
20 #include "includes/define.h"
21 #include "includes/serializer.h"
22 #include "geometries/geometry.h"
23 #include "utilities/math_utils.h"
24 #include "utilities/geometry_utilities.h"
25 
27 
29 
30 #include "includes/model_part.h"
31 
32 namespace Kratos
33 {
34 
37 
40 
44 
48 
52 
56 
58 
61  template <unsigned int TDim>
63  {
64  public:
67 
70 
72 
74  typedef Node NodeType;
75 
78 
81 
83  typedef Vector VectorType;
84 
86  typedef Matrix MatrixType;
87 
88  typedef std::size_t IndexType;
89 
90  typedef std::size_t SizeType;
91 
92  typedef std::vector<std::size_t> EquationIdVectorType;
93 
94  typedef std::vector<Dof<double>::Pointer> DofsVectorType;
95 
97 
100 
103 
106 
109 
111  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
112 
114 
115  typedef typename BaseType::PropertiesType::Pointer pPropertiesType;
116 
118 
122 
123  //Constructors.
124 
126 
130  {
131  }
132 
134 
139  {
140  }
141 
143 
147  ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry) : BaseType(NewId, pGeometry)
148  {
149  }
150 
152 
157  ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry, pPropertiesType pProperties) : BaseType(NewId, pGeometry, pProperties)
158  {
159  }
160 
162 
164 
167  {
168  }
169 
173 
177 
179 
186  Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes,
187  pPropertiesType pProperties) const override
188  {
189  return Element::Pointer(new ThreeStepSecondOrderPspgUpdatedLagrangianElement(NewId, this->GetGeometry().Create(ThisNodes), pProperties));
190  }
191 
192  Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override;
193 
195  void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix,
196  VectorType &rRightHandSideVector,
197  const ProcessInfo &rCurrentProcessInfo) override;
198 
199  void CalculateFSplusPSPGPressureSystem(MatrixType &rLeftHandSideMatrix,
200  VectorType &rRightHandSideVector,
201  const ProcessInfo &rCurrentProcessInfo);
205 
209 
213 
217 
219  std::string Info() const override
220  {
221  std::stringstream buffer;
222  buffer << "ThreeStepSecondOrderPspgUpdatedLagrangianElement #" << this->Id();
223  return buffer.str();
224  }
225 
226  // /// Print object's data.
227  // virtual void PrintData(std::ostream& rOStream) const;
228 
232 
234  protected:
237 
241 
242  ConstitutiveLaw::Pointer mpConstitutiveLaw = nullptr;
243 
247 
251 
255 
259 
263 
265 
266  private:
269 
273 
277 
278  friend class Serializer;
279 
280  void save(Serializer &rSerializer) const override
281  {
283  }
284 
285  void load(Serializer &rSerializer) override
286  {
288  }
289 
293 
297 
301 
305 
309 
312 
313  /* /// Copy constructor. */
314  /* ThreeStepSecondOrderPspgUpdatedLagrangianElement(ThreeStepSecondOrderPspgUpdatedLagrangianElement const& rOther); */
315 
317 
318  }; // Class ThreeStepSecondOrderPspgUpdatedLagrangianElement
319 
321 
324 
328 
330  template <unsigned int TDim>
331  inline std::istream &operator>>(std::istream &rIStream,
333  {
334  return rIStream;
335  }
336 
338  template <unsigned int TDim>
339  inline std::ostream &operator<<(std::ostream &rOStream,
341  {
342  rThis.PrintInfo(rOStream);
343  rOStream << std::endl;
344  rThis.PrintData(rOStream);
345 
346  return rOStream;
347  }
348 
349 } // namespace Kratos.
350 
351 #endif // KRATOS_THREE_STEP_SECOND_ORDER_UPDATED_LAGRANGIAN_ELEMENT defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_law.h:47
Base class for all Elements.
Definition: element.h:60
std::size_t IndexType
Definition: flags.h:74
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
IndexType Id() const
Definition: indexed_object.h:107
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.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
A stabilized element for the incompressible Navier-Stokes equations.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:63
A stabilized element for the incompressible Navier-Stokes equations.
Definition: three_step_second_order_updated_lagrangian_element.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
GeometryType::ShapeFunctionsGradientsType ShapeFunctionDerivativesArrayType
Type for an array of shape function gradient matrices.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:105
ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using a geometry object.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:147
Element::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
It creates a new element pointer and clones the previous element data.
Definition: three_step_second_order_pspg_updated_lagrangian_element.cpp:21
BaseType::PropertiesType::Pointer pPropertiesType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:115
ConstitutiveLaw::Pointer mpConstitutiveLaw
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:242
Kratos::Matrix ShapeFunctionDerivativesType
Type for a matrix containing the shape function gradients.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:102
ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId, GeometryType::Pointer pGeometry, pPropertiesType pProperties)
Constuctor using geometry and properties.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:157
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:111
BaseType::ElementalVariables ElementalVariables
Definition: three_step_second_order_updated_lagrangian_element.h:117
Vector VectorType
Vector type for local contributions to the linear system.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:83
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ThreeStepSecondOrderPspgUpdatedLagrangianElement)
Pointer definition of ThreeStepSecondOrderUpdatedLagrangianElement.
Matrix MatrixType
Matrix type for local contributions to the linear system.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:86
ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:138
ThreeStepSecondOrderPspgUpdatedLagrangianElement(IndexType NewId=0)
Default constuctor.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:129
Node NodeType
Node type (default is: Node)
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:74
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:108
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:96
std::string Info() const override
Turn back information as a string.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:219
ThreeStepSecondOrderUpdatedLagrangianElement< TDim > BaseType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:71
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: three_step_updated_lagrangian_element.h:330
void CalculateFSplusPSPGPressureSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: three_step_second_order_pspg_updated_lagrangian_element.cpp:65
std::size_t IndexType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:88
std::size_t SizeType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:90
BaseType::PropertiesType PropertiesType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:113
BaseType::PropertiesType PropertiesType
Definition: three_step_second_order_updated_lagrangian_element.h:113
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:94
ThreeStepSecondOrderPspgUpdatedLagrangianElement(ThreeStepSecondOrderPspgUpdatedLagrangianElement const &rOther)
copy constructor
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:163
BaseType::ElementalVariables ElementalVariables
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:117
Geometry< NodeType >::PointsArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:80
virtual ~ThreeStepSecondOrderPspgUpdatedLagrangianElement()
Destructor.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:166
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Calculate the element's local contribution to the system for the current step.
Definition: three_step_second_order_pspg_updated_lagrangian_element.cpp:36
Geometry< NodeType > GeometryType
Geometry type (using with given NodeType)
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:77
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: updated_lagrangian_element.hpp:177
std::vector< std::size_t > EquationIdVectorType
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:92
Kratos::Vector ShapeFunctionsType
Type for shape function values container.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:99
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, pPropertiesType pProperties) const override
Create a new element of this type.
Definition: three_step_second_order_pspg_updated_lagrangian_element.h:186
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307