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_partintegration.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_AUTOSLIP_PFEM2_3D_ELEM_H_INCLUDED)
10 #define KRATOS_MONOLITHIC_AUTOSLIP_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  : 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 
62  Element(NewId)
63  {}
65  Element(NewId, ThisNodes)
66  {}
67 
69  MonolithicAutoSlipPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry);
70  MonolithicAutoSlipPFEM23D(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
71 
73  virtual ~ MonolithicAutoSlipPFEM23D() override;
74 
75 
76  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
77 
78  void CalculateLocalSystem(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
79 
80  void AddExplicitContribution(const ProcessInfo& CurrentProcessInfo) override;
81 
82  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
83 
84  void GetDofList(DofsVectorType& ElementalDofList,const ProcessInfo& CurrentProcessInfo) const override;
85 
86  void InitializeSolutionStep(const ProcessInfo& CurrentProcessInfo) override;
87 
88 
89 
90  protected:
91 
92 
93  void CalculatePressureProjection(const ProcessInfo& CurrentProcessInfo);
94 
95  virtual void AddViscousTerm(MatrixType& rDampMatrix,
96  const BoundedMatrix<double, 4, 3>& rShapeDeriv,
97  double Viscosity,const double Area);
98 
100  BoundedMatrix<double, (4), 3 >& rShapeDeriv,
101  array_1d<double,4>& distances,
102  std::vector< Matrix >& gauss_gradients,
103  array_1d<double,6>& viscosities,
104  array_1d<double,6>& signs,
105  array_1d<double,6>& volumes ,
106  const unsigned int ndivisions);
107 
109  const array_1d<double,4>& distances,
110  array_1d<double,3>& output_integral);
111 
112  void TriangleNormal(const array_1d<double,3>& node_i, const array_1d<double,3>& node_j, const array_1d<double,3>& node_k, array_1d<double,3>& normal);
113 
114 
115  template<class T>
116  bool InvertMatrix(const T& input, T& inverse) ;
117 
118  private:
119  friend class Serializer;
120 
121  virtual void save(Serializer& rSerializer) const override
122  {
124  }
125 
126  virtual void load(Serializer& rSerializer) override
127  {
129  }
130 
132 
135 
136 
137 
138  }; // Class MonolithicAutoSlipPFEM23D
139 } // namespace Kratos.
140 
141 #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_partintegration.h:30
std::size_t SizeType
Definition: monolithic_2fluid_3d_partintegration.h:55
MonolithicAutoSlipPFEM23D(IndexType NewId=0)
Default constructor.
Definition: monolithic_2fluid_3d_partintegration.h:61
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: monolithic_2fluid_3d_partintegration.h:57
Vector VectorType
Definition: monolithic_2fluid_3d_partintegration.h:52
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: monolithic_2fluid_3d_partintegration.h:51
virtual void AddViscousTerm(MatrixType &rDampMatrix, const BoundedMatrix< double, 4, 3 > &rShapeDeriv, double Viscosity, const double Area)
Definition: monolithic_2fluid_3d_partintegration.cpp:988
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MonolithicAutoSlipPFEM23D)
Counted pointer of MonolithicAutoSlipPFEM23D.
virtual ~ MonolithicAutoSlipPFEM23D() override
Destructor.
bool InvertMatrix(const T &input, T &inverse)
Definition: monolithic_2fluid_3d_partintegration.cpp:1094
void TriangleNormal(const array_1d< double, 3 > &node_i, const array_1d< double, 3 > &node_j, const array_1d< double, 3 > &node_k, array_1d< double, 3 > &normal)
Definition: monolithic_2fluid_3d_partintegration.cpp:1078
void ComputeBoundaryIntegral(const BoundedMatrix< double, 4, 3 > &coords, const array_1d< double, 4 > &distances, array_1d< double, 3 > &output_integral)
Definition: monolithic_2fluid_3d_partintegration.cpp:1042
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: monolithic_2fluid_3d_partintegration.cpp:730
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: monolithic_2fluid_3d_partintegration.cpp:45
void AddExplicitContribution(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_3d_partintegration.cpp:58
std::vector< std::size_t > EquationIdVectorType
Definition: monolithic_2fluid_3d_partintegration.h:56
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: monolithic_2fluid_3d_partintegration.h:49
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: monolithic_2fluid_3d_partintegration.h:58
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: monolithic_2fluid_3d_partintegration.cpp:81
void CalculatePressureProjection(const ProcessInfo &CurrentProcessInfo)
Definition: monolithic_2fluid_3d_partintegration.cpp:782
std::size_t IndexType
Definition: monolithic_2fluid_3d_partintegration.h:54
Properties PropertiesType
Definition: monolithic_2fluid_3d_partintegration.h:47
void GetDofList(DofsVectorType &ElementalDofList, const ProcessInfo &CurrentProcessInfo) const override
Definition: monolithic_2fluid_3d_partintegration.cpp:755
MonolithicAutoSlipPFEM23D(IndexType NewId, const NodesArrayType &ThisNodes)
Definition: monolithic_2fluid_3d_partintegration.h:64
void InitializeSolutionStep(const ProcessInfo &CurrentProcessInfo) override
Definition: monolithic_2fluid_3d_partintegration.cpp:720
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