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.
fractional_step_pfem_2_2d.h
Go to the documentation of this file.
1 //
2 // Project Name: Kratos
3 // Last modified by: $Author: it's me! $
4 // Date: $Date: 2008-08-08 23:58:38 $
5 // Revision: $Revision: 1.0 $
6 //
7 //
8 
9 #if !defined(KRATOS_FRACTIONAL_STEP_PFEM_2_2D_ELEM_H_INCLUDED)
10 #define KRATOS_FRACTIONAL_STEP_PFEM_2_2D_ELEM_H_INCLUDED
11 
12 // System includes
13 
14 
15 // External includes
16 #include "boost/smart_ptr.hpp"
17 
18 
19 // Project includes
20 #include "includes/define.h"
21 #include "includes/element.h"
23 
24 
25 namespace Kratos
26 {
27 
29  : public Element
30  {
31  public:
32 
40 
41  //typedef Node NodeType;
52  typedef Vector VectorType;
53  //typedef typename ElementBaseType::MatrixType MatrixType;
54  typedef std::size_t IndexType;
55  typedef std::size_t SizeType;
56  typedef std::vector<std::size_t> EquationIdVectorType;
57  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
59 
61  FractionalStepPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry);
62  FractionalStepPFEM22D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
63 
65  virtual ~ FractionalStepPFEM22D() override;
66 
67 
68  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
69 
70  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
71 
72  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
73 
74  void EquationIdVector(EquationIdVectorType& rResult,const ProcessInfo& rCurrentProcessInfo) const override;
75 
76  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
77 
78  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
79 
80  virtual void CalculateOnIntegrationPoints(const Variable<double>& rVariable,
81  std::vector<double>& rValues,
82  const ProcessInfo& rCurrentProcessInfo) override;
83 
84  virtual void CalculateOnIntegrationPoints(const Variable<array_1d<double, 3 > >& rVariable,
85  std::vector<array_1d<double, 3 > >& rValues,
86  const ProcessInfo& rCurrentProcessInfo) override;
87 
88  protected:
89 
90  void CalculateLocalPressureSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo);
91 
92  void PressureEquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& CurrentProcessInfo) const;
93 
94  void GetPressureDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const;
95 
96  void CalculateViscousRHS(const ProcessInfo& CurrentProcessInfo);
97 
98  void CalculatePressureProjection(const ProcessInfo& CurrentProcessInfo);
99 
100  void AddViscousTerm(BoundedMatrix<double, (2-1)*6, (2-1)*6 >& rDampMatrix,
101  BoundedMatrix<double, (2+1), 2 >& rShapeDeriv,
102  const double Weight);
103 
104 
105 
106 template<class T>
107 bool InvertMatrix(const T& input, T& inverse) ;
108 
109 
110  private:
111  friend class Serializer;
112 
114  {
115  }
116 
117 
118 
119  }; // Class PFEM22D
120 } // namespace Kratos.
121 
122 #endif // KRATOS_MONOLITIC_PFEM2_2D_ELEM_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
Definition: fractional_step_pfem_2_2d.h:30
void PressureEquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &CurrentProcessInfo) const
Definition: fractional_step_pfem_2_2d.cpp:958
Vector VectorType
Definition: fractional_step_pfem_2_2d.h:52
bool InvertMatrix(const T &input, T &inverse)
Definition: fractional_step_pfem_2_2d.cpp:1032
void GetPressureDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const
Definition: fractional_step_pfem_2_2d.cpp:971
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: fractional_step_pfem_2_2d.cpp:59
void CalculateViscousRHS(const ProcessInfo &CurrentProcessInfo)
Definition: fractional_step_pfem_2_2d.cpp:469
virtual void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_pfem_2_2d.cpp:1058
void CalculatePressureProjection(const ProcessInfo &CurrentProcessInfo)
Definition: fractional_step_pfem_2_2d.cpp:680
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: fractional_step_pfem_2_2d.cpp:112
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: fractional_step_pfem_2_2d.cpp:46
std::size_t SizeType
Definition: fractional_step_pfem_2_2d.h:55
std::vector< std::size_t > EquationIdVectorType
Definition: fractional_step_pfem_2_2d.h:56
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: fractional_step_pfem_2_2d.h:51
std::size_t IndexType
Definition: fractional_step_pfem_2_2d.h:54
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: fractional_step_pfem_2_2d.cpp:138
virtual ~ FractionalStepPFEM22D() override
Destructor.
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: fractional_step_pfem_2_2d.cpp:86
void AddViscousTerm(BoundedMatrix< double,(2-1) *6,(2-1) *6 > &rDampMatrix, BoundedMatrix< double,(2+1), 2 > &rShapeDeriv, const double Weight)
Definition: fractional_step_pfem_2_2d.cpp:987
void CalculateLocalPressureSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: fractional_step_pfem_2_2d.cpp:169
Properties PropertiesType
Definition: fractional_step_pfem_2_2d.h:47
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: fractional_step_pfem_2_2d.h:49
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FractionalStepPFEM22D)
Counted pointer of PFEM22D.
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: fractional_step_pfem_2_2d.h:58
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: fractional_step_pfem_2_2d.cpp:945
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: fractional_step_pfem_2_2d.h:57
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
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
input
Definition: generate_frictional_mortar_condition.py:435