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.
monolithic_3fluid_3d.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_MONOLITHIC_3FLUID_PFEM2_3D_ELEM_H_INCLUDED)
10 #define KRATOS_MONOLITHIC_3FLUID_PFEM2_3D_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 {
30 public:
31 
39 
40  //typedef Node NodeType;
51  typedef Vector VectorType;
52  //typedef typename ElementBaseType::MatrixType MatrixType;
53  typedef std::size_t IndexType;
54  typedef std::size_t SizeType;
55  typedef std::vector<std::size_t> EquationIdVectorType;
56  typedef std::vector< Dof<double>::Pointer > DofsVectorType;
58 
60  Monolithic3FluidPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry);
61  Monolithic3FluidPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
62 
64  virtual ~ Monolithic3FluidPFEM23D() override;
65 
66 
67  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
68 
69  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
70 
71  //void CalculateRightHandSide(VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo) override;
72 
73  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
74 
75  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
76 
77  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
78 
79  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
80 
81 
82 protected:
83 
84  void CalculateViscousRHS(ProcessInfo& CurrentProcessInfo);
85 
86  void CalculatePressureProjection(ProcessInfo& CurrentProcessInfo);
87 
88  void AddViscousTerm(MatrixType& rDampMatrix,
89  const BoundedMatrix<double, 4, 3>& rShapeDeriv,
90  const double Weight);
91 
93  BoundedMatrix<double, 4, 3 >& rShapeDeriv,
94  array_1d<double,4>& distances,
95  std::vector< Matrix >& gauss_gradients,
96  array_1d<double,6>& viscosities,
97  array_1d<double,6>& signs,
98  array_1d<double,6>& volumes ,
99  const unsigned int ndivisions);
100 
101  template<class T>
102  bool InvertMatrix(const T& input, T& inverse) ;
103 
104 
105 private:
106  friend class Serializer;
107 
109  {
110  }
111 
112 
113 }; // Class PFEM22D
114 } // namespace Kratos.
115 
116 #endif // KRATOS_MONOLITHIC_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
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
Definition: monolithic_3fluid_3d.h:29
void CalculatePressureProjection(ProcessInfo &CurrentProcessInfo)
Definition: monolithic_3fluid_3d.cpp:850
bool InvertMatrix(const T &input, T &inverse)
Definition: monolithic_3fluid_3d.cpp:1125
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: monolithic_3fluid_3d.h:50
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: monolithic_3fluid_3d.cpp:824
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: monolithic_3fluid_3d.cpp:799
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_3fluid_3d.cpp:789
Vector VectorType
Definition: monolithic_3fluid_3d.h:51
std::vector< std::size_t > EquationIdVectorType
Definition: monolithic_3fluid_3d.h:55
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(Monolithic3FluidPFEM23D)
Counted pointer of PFEM22D.
void CalculateViscousRHS(ProcessInfo &CurrentProcessInfo)
void AddViscousTerm(BoundedMatrix< double, 21, 21 > &output, BoundedMatrix< double, 4, 3 > &rShapeDeriv, array_1d< double, 4 > &distances, std::vector< Matrix > &gauss_gradients, array_1d< double, 6 > &viscosities, array_1d< double, 6 > &signs, array_1d< double, 6 > &volumes, const unsigned int ndivisions)
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: monolithic_3fluid_3d.h:48
std::size_t IndexType
Definition: monolithic_3fluid_3d.h:53
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: monolithic_3fluid_3d.cpp:90
std::size_t SizeType
Definition: monolithic_3fluid_3d.h:54
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_3fluid_3d.cpp:58
void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 4, 3 > &rShapeDeriv, const double Weight)
Definition: monolithic_3fluid_3d.cpp:1062
Properties PropertiesType
Definition: monolithic_3fluid_3d.h:46
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: monolithic_3fluid_3d.cpp:45
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: monolithic_3fluid_3d.h:56
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: monolithic_3fluid_3d.h:57
virtual ~ Monolithic3FluidPFEM23D() override
Destructor.
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
output
Definition: generate_frictional_mortar_condition.py:444
input
Definition: generate_frictional_mortar_condition.py:435