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.
translatory_rigid_body_element.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosContactMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_TRANSLATORY_RIGID_BODY_ELEMENT_H_INCLUDED )
11 #define KRATOS_TRANSLATORY_RIGID_BODY_ELEMENT_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
36 
38 
44 class KRATOS_API(CONTACT_MECHANICS_APPLICATION) TranslatoryRigidBodyElement
45  :public RigidBodyElement
46 {
47 public:
48 
54  typedef ConstitutiveLawType::Pointer ConstitutiveLawPointerType;
64  typedef Node NodeType;
69 
70 
73 
75 
76 public:
77 
80 
83 
85  TranslatoryRigidBodyElement(IndexType NewId, GeometryType::Pointer pGeometry);
86 
87  TranslatoryRigidBodyElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
88 
89  TranslatoryRigidBodyElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties, NodesContainerType::Pointer pNodes);
90 
93 
95  virtual ~TranslatoryRigidBodyElement();
96 
97 
101 
102 
110  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
111 
112 
120  Element::Pointer Clone (IndexType NewId, NodesArrayType const& ThisNodes) const override;
121 
122  //************* GETTING METHODS
123 
124 
128  void GetDofList(DofsVectorType& rElementalDofList, const ProcessInfo& rCurrentProcessInfo) const override;
129 
133  void EquationIdVector(EquationIdVectorType& rResult, const ProcessInfo& rCurrentProcessInfo) const override;
134 
138  void GetValuesVector(Vector& rValues, int Step = 0) const override;
139 
143  void GetFirstDerivativesVector(Vector& rValues, int Step = 0) const override;
144 
148  void GetSecondDerivativesVector(Vector& rValues, int Step = 0) const override;
149 
150 
151  //************* STARTING - ENDING METHODS
152 
157  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
158 
159 
160  //************* COMPUTING METHODS
161 
168  void CalculateMassMatrix(MatrixType& rMassMatrix, const ProcessInfo& rCurrentProcessInfo) override;
169 
170 
178  int Check(const ProcessInfo& rCurrentProcessInfo) const override;
179 
183 
187 
192  virtual std::string Info() const override
193  {
194  std::stringstream buffer;
195  buffer << "Translatory Rigid Body Element #" << Id();
196  return buffer.str();
197  }
198 
200  virtual void PrintInfo(std::ostream& rOStream) const override
201  {
202  rOStream << "Translatory Rigid Body Element #" << Id();
203  }
204 
206  virtual void PrintData(std::ostream& rOStream) const override
207  {
208  GetGeometry().PrintData(rOStream);
209  }
214 
215 protected:
216 
219 
223 
227 
228 
232 
233 
237  void InitializeSystemMatrices(MatrixType& rLeftHandSideMatrix,
238  VectorType& rRightHandSideVector,
239  Flags& rCalculationFlags) override;
240 
241 
242 
246  void CalculateAndAddInertiaLHS(MatrixType& rLeftHandSideMatrix,
247  ElementVariables& rVariables) override;
248 
252  void CalculateAndAddInertiaRHS(VectorType& rRightHandSideVector,
253  ElementVariables& rVariables) override;
254 
255 
259  void UpdateRigidBodyNodes(const ProcessInfo& rCurrentProcessInfo) override;
260 
264  SizeType GetDofsSize() const override;
265 
269  void MapLocalToGlobalSystem(LocalSystemComponents& rLocalSystem) override;
270 
281 
282 private:
283 
302  friend class Serializer;
303 
304  void save(Serializer& rSerializer) const override;
305 
306  void load(Serializer& rSerializer) override;
307 
314 
315 
316 }; // Class TranslatoryRigidBodyElement
317 
318 } // namespace Kratos.
319 #endif // KRATOS_TRANSLATORY_RIGID_BODY_ELEMENT_H_INCLUDED defined
Definition: beam_math_utilities.hpp:31
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
Definition: flags.h:58
IntegrationMethod
Definition: geometry_data.h:76
This class defines the node.
Definition: node.h:65
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
Rigid Body Element for 3D space dimension.
Definition: rigid_body_element.hpp:48
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Rigid Body Element for 3D space dimension.
Definition: translatory_rigid_body_element.hpp:46
TranslatoryRigidBodyElement()
Serializer constructor.
Definition: translatory_rigid_body_element.hpp:82
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: translatory_rigid_body_element.hpp:54
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: translatory_rigid_body_element.hpp:58
Node NodeType
Type for nodes.
Definition: translatory_rigid_body_element.hpp:64
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: translatory_rigid_body_element.hpp:56
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: translatory_rigid_body_element.hpp:206
PointerVectorSet< NodeType, IndexedObject > NodesContainerType
Type for nodes container.
Definition: translatory_rigid_body_element.hpp:66
Quaternion< double > QuaternionType
Type definition for quaternion.
Definition: translatory_rigid_body_element.hpp:62
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: translatory_rigid_body_element.hpp:52
BeamMathUtils< double > BeamMathUtilsType
Type definition for beam utilities.
Definition: translatory_rigid_body_element.hpp:60
array_1d< double, 3 > ArrayType
Type of vector.
Definition: translatory_rigid_body_element.hpp:68
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(TranslatoryRigidBodyElement)
Counted pointer of TranslatoryRigidBodyElement.
virtual std::string Info() const override
Turn back information as a string.
Definition: translatory_rigid_body_element.hpp:192
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: translatory_rigid_body_element.hpp:200
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
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
def load(f)
Definition: ode_solve.py:307