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.
total_lagrangian_q1p0_mixed_element.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Alejandro Cornejo
10 //
11 
12 
13 #pragma once
14 
15 
16 // System includes
17 
18 
19 // External include
20 
21 // Project includes
22 #include "includes/define.h"
24 #include "includes/variables.h"
25 
26 namespace Kratos
27 {
36 
40 
44 
54 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) TotalLagrangianQ1P0MixedElement
55  : public TotalLagrangian
56 {
57 public:
60 
63 
66 
70 
72  TotalLagrangianQ1P0MixedElement(IndexType NewId, GeometryType::Pointer pGeometry);
73  TotalLagrangianQ1P0MixedElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
74 
75  // Copy constructor
77  :BaseType(rOther)
78  {};
79 
82 
89 
97  Element::Pointer Create(
98  IndexType NewId,
99  GeometryType::Pointer pGeom,
100  PropertiesType::Pointer pProperties
101  ) const override;
102 
110  Element::Pointer Create(
111  IndexType NewId,
112  NodesArrayType const& ThisNodes,
113  PropertiesType::Pointer pProperties
114  ) const override;
115 
123  Element::Pointer Clone (
124  IndexType NewId,
125  NodesArrayType const& rThisNodes
126  ) const override;
127 
131 
138 
140  std::string Info() const override
141  {
142  std::stringstream buffer;
143  buffer << "TotalLagrangianQ1P0MixedElement #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
144  return buffer.str();
145  }
146 
148  void PrintInfo(std::ostream& rOStream) const override
149  {
150  rOStream << "TotalLagrangianQ1P0MixedElement #" << Id() << "\nConstitutive law: " << BaseType::mConstitutiveLawVector[0]->Info();
151  }
152 
154  void PrintData(std::ostream& rOStream) const override
155  {
156  pGetGeometry()->PrintData(rOStream);
157  }
158 
163 
164 protected:
170 
174 
176  {
177  }
178 
187  void CalculateAll(
188  MatrixType& rLeftHandSideMatrix,
189  VectorType& rRightHandSideVector,
190  const ProcessInfo& rCurrentProcessInfo,
191  const bool CalculateStiffnessMatrixFlag,
192  const bool CalculateResidualVectorFlag
193  ) override;
194 
202  const Variable<double>& rVariable,
203  std::vector<double>& rOutput,
204  const ProcessInfo& rCurrentProcessInfo
205  ) override;
206 
210  double CalculateBulkModulus(
211  const Properties &rProperties);
212 
220  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
221 
225  void FinalizeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo) override;
226 
240 
241 private:
244 
248 
252 
256 
261 
265  friend class Serializer;
266 
267  // A private default constructor necessary for serialization
268 
269  void save(Serializer& rSerializer) const override;
270 
271  void load(Serializer& rSerializer) override;
272 
279  //TotalLagrangian& operator=(const TotalLagrangian& rOther);
281  //TotalLagrangian(const TotalLagrangian& rOther);
283 
284 }; // Class TotalLagrangian
285 
293 
294 } // namespace Kratos.
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
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
Total Lagrangian element for 2D and 3D geometries.
Definition: total_lagrangian.h:53
Total Lagrangian mixed u-p element (Q1P0) for 2D and 3D geometries.
Definition: total_lagrangian_q1p0_mixed_element.h:56
TotalLagrangian BaseType
The base element type.
Definition: total_lagrangian_q1p0_mixed_element.h:62
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: total_lagrangian_q1p0_mixed_element.h:148
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: total_lagrangian_q1p0_mixed_element.h:154
std::string Info() const override
Turn back information as a string.
Definition: total_lagrangian_q1p0_mixed_element.h:140
TotalLagrangianQ1P0MixedElement()
Definition: total_lagrangian_q1p0_mixed_element.h:175
TotalLagrangianQ1P0MixedElement(TotalLagrangianQ1P0MixedElement const &rOther)
Definition: total_lagrangian_q1p0_mixed_element.h:76
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(TotalLagrangianQ1P0MixedElement)
Counted pointer of TotalLagrangianQ1P0MixedElement.
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
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307