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.
steady_state_Pw_element.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Vahid Galavi
11 //
12 
13 #if !defined(KRATOS_GEO_STEADY_STATE_PW_ELEMENT_H_INCLUDED)
14 #define KRATOS_GEO_STEADY_STATE_PW_ELEMENT_H_INCLUDED
15 
16 // Project includes
17 #include "includes/serializer.h"
18 
19 // Application includes
21 #include "custom_utilities/element_utilities.hpp"
24 
25 namespace Kratos
26 {
27 
28 template <unsigned int TDim, unsigned int TNumNodes>
29 class KRATOS_API(GEO_MECHANICS_APPLICATION) SteadyStatePwElement : public TransientPwElement<TDim, TNumNodes>
30 {
31 public:
33 
35 
36  using IndexType = std::size_t;
38  using NodeType = Node;
41  using VectorType = Vector;
42  using MatrixType = Matrix;
45 
47  using SizeType = std::size_t;
48  using BaseType::CalculateRetentionResponse;
49  using BaseType::mConstitutiveLawVector;
50  using BaseType::mIsInitialised;
51  using BaseType::mRetentionLawVector;
52 
53  using ElementVariables = typename BaseType::ElementVariables;
54 
56 
58  SteadyStatePwElement(IndexType NewId = 0) : BaseType(NewId) {}
59 
62  : BaseType(NewId, ThisNodes)
63  {
64  }
65 
67  SteadyStatePwElement(IndexType NewId, GeometryType::Pointer pGeometry)
68  : BaseType(NewId, pGeometry)
69  {
70  }
71 
73  SteadyStatePwElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
74  : BaseType(NewId, pGeometry, pProperties)
75  {
76  }
77 
79  ~SteadyStatePwElement() override {}
80 
82 
83  Element::Pointer Create(IndexType NewId,
84  NodesArrayType const& ThisNodes,
85  PropertiesType::Pointer pProperties) const override;
86 
87  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
88 
90  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
91 
93 
94  // Turn back information as a string.
95  std::string Info() const override
96  {
97  std::stringstream buffer;
98  buffer << "steady-state Pw flow Element #" << this->Id()
99  << "\nRetention law: " << mRetentionLawVector[0]->Info();
100  return buffer.str();
101  }
102 
103  // Print information about this object.
104  void PrintInfo(std::ostream& rOStream) const override
105  {
106  rOStream << "steady-state Pw flow Element #" << this->Id()
107  << "\nRetention law: " << mRetentionLawVector[0]->Info();
108  }
109 
111 
112 protected:
114 
116  void CalculateAll(MatrixType& rLeftHandSideMatrix,
117  VectorType& rRightHandSideVector,
118  const ProcessInfo& CurrentProcessInfo,
119  const bool CalculateStiffnessMatrixFlag,
120  const bool CalculateResidualVectorFlag) override;
121 
122  void CalculateAndAddLHS(MatrixType& rLeftHandSideMatrix, ElementVariables& rVariables) override;
123 
124  void CalculateAndAddRHS(VectorType& rRightHandSideVector, ElementVariables& rVariables, unsigned int GPoint) override;
125 
127 
128 private:
130 
132 
134 
135  friend class Serializer;
136 
137  void save(Serializer& rSerializer) const override
138  {
140  }
141 
142  void load(Serializer& rSerializer) override{KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, Element)}
143 
144  // Assignment operator.
145  SteadyStatePwElement&
146  operator=(SteadyStatePwElement const& rOther);
147 
148  // Copy constructor.
149  SteadyStatePwElement(SteadyStatePwElement const& rOther);
150 
151 }; // Class SteadyStatePwElement
152 
153 } // namespace Kratos
154 
155 #endif // KRATOS_GEO_STEADY_STATE_PW_ELEMENT_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
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
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
Geometry base class.
Definition: geometry.h:71
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
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
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
Definition: steady_state_Pw_element.hpp:30
~SteadyStatePwElement() override
Destructor.
Definition: steady_state_Pw_element.hpp:79
typename BaseType::ElementVariables ElementVariables
Definition: steady_state_Pw_element.hpp:53
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: steady_state_Pw_element.hpp:104
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SteadyStatePwElement)
SteadyStatePwElement(IndexType NewId, GeometryType::Pointer pGeometry)
Constructor using Geometry.
Definition: steady_state_Pw_element.hpp:67
std::string Info() const override
Definition: steady_state_Pw_element.hpp:95
SteadyStatePwElement(IndexType NewId=0)
Default Constructor.
Definition: steady_state_Pw_element.hpp:58
SteadyStatePwElement(IndexType NewId, const NodesArrayType &ThisNodes)
Constructor using an array of nodes.
Definition: steady_state_Pw_element.hpp:61
SteadyStatePwElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Constructor using Properties.
Definition: steady_state_Pw_element.hpp:73
Definition: transient_Pw_element.hpp:30
#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
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307