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_2fluid_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 #ifndef KRATOS_MONOLITHIC_PFEM2_3D_ELEM_H_INCLUDED
10 #define KRATOS_MONOLITHIC_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 
28 class MonolithicPFEM23D : public Element
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 
59 
62  Element(NewId)
63  {}
64  MonolithicPFEM23D(IndexType NewId, const NodesArrayType& ThisNodes) :
65  Element(NewId, ThisNodes)
66  {}
67 
69  MonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry);
70 
71  MonolithicPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
72 
74  virtual ~ MonolithicPFEM23D() override;
75 
76 
77  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
78 
79  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) const override;
80 
81  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
82 
83  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
84 
85  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
86 
87  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
88 
89  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
90 
91 
92 protected:
93 
94  void CalculatePressureProjection(const ProcessInfo& CurrentProcessInfo);
95 
96  virtual void AddViscousTerm(MatrixType& rDampMatrix,
97  const BoundedMatrix<double, 4, 3>& rShapeDeriv,
98  double& Viscosity,const double Area);
99 
101  BoundedMatrix<double, (4), 3 >& rShapeDeriv,
102  array_1d<double,4>& distances,
103  std::vector< Matrix >& gauss_gradients,
104  array_1d<double,6>& viscosities,
105  array_1d<double,6>& signs,
106  array_1d<double,6>& volumes ,
107  const unsigned int ndivisions);
108 
109  template<class T>
110  bool InvertMatrix(const T& input, T& inverse) ;
111 
112 private:
113  friend class Serializer;
114 
115  virtual void save(Serializer& rSerializer) const override
116  {
118  }
119 
120  virtual void load(Serializer& rSerializer) override
121  {
123  }
124 
126 
128  MonolithicPFEM23D(MonolithicPFEM23D const& rOther);
129 
130 }; // Class MonolithicPFEM23D
131 
132 } // namespace Kratos.
133 
134 #endif // KRATOS_MONOLITHIC_PFEM2_3D_ELEM_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
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_2fluid_3d.h:29
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MonolithicPFEM23D)
Counted pointer of MonolithicPFEM23D.
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: monolithic_2fluid_3d.cpp:75
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: monolithic_2fluid_3d.h:50
Properties PropertiesType
Definition: monolithic_2fluid_3d.h:46
std::vector< std::size_t > EquationIdVectorType
Definition: monolithic_2fluid_3d.h:55
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_3d.cpp:629
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: monolithic_2fluid_3d.h:56
bool InvertMatrix(const T &input, T &inverse)
Definition: monolithic_2fluid_3d.cpp:947
virtual ~ MonolithicPFEM23D() override
Destructor.
MonolithicPFEM23D(IndexType NewId=0)
Default constructor.
Definition: monolithic_2fluid_3d.h:61
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: monolithic_2fluid_3d.h:57
MonolithicPFEM23D(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: monolithic_2fluid_3d.h:64
std::size_t IndexType
Definition: monolithic_2fluid_3d.h:53
virtual void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 4, 3 > &rShapeDeriv, double &Viscosity, const double Area)
Definition: monolithic_2fluid_3d.cpp:894
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: monolithic_2fluid_3d.h:48
std::size_t SizeType
Definition: monolithic_2fluid_3d.h:54
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: monolithic_2fluid_3d.cpp:639
Vector VectorType
Definition: monolithic_2fluid_3d.h:51
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_3d.cpp:52
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: monolithic_2fluid_3d.cpp:34
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: monolithic_2fluid_3d.cpp:664
void CalculatePressureProjection(const ProcessInfo &CurrentProcessInfo)
Definition: monolithic_2fluid_3d.cpp:691
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
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
output
Definition: generate_frictional_mortar_condition.py:444
input
Definition: generate_frictional_mortar_condition.py:435
def load(f)
Definition: ode_solve.py:307