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.
geo_cable_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: Klaus B. Sautter,
11 // Vahid Galavi
12 //
13 
14 #if !defined(KRATOS_GEO_CABLE_ELEMENT_H_INCLUDED)
15 #define KRATOS_GEO_CABLE_ELEMENT_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 
24 
25 namespace Kratos
26 {
34 template <unsigned int TDim, unsigned int TNumNodes>
35 class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoCableElement : public GeoTrussElement<TDim, TNumNodes>
36 {
37 public:
39 
41 
49 
52 
56 
58  GeoCableElement(IndexType NewId, GeometryType::Pointer pGeometry);
59  GeoCableElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
60 
61  ~GeoCableElement() override;
62 
70  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
71 
79  Element::Pointer Create(IndexType NewId,
80  NodesArrayType const& ThisNodes,
81  PropertiesType::Pointer pProperties) const override;
82 
83  void CreateElementStiffnessMatrix(MatrixType& rLocalStiffnessMatrix,
84  const ProcessInfo& rCurrentProcessInfo) override;
85 
86  void CalculateRightHandSide(VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
87 
92  void UpdateInternalForces(BoundedVector<double, TDim * TNumNodes>& rinternalForces,
93  const ProcessInfo& rCurrentProcessInfo) override;
94 
96  std::vector<array_1d<double, 3>>& rOutput,
97  const ProcessInfo& rCurrentProcessInfo) override;
98 
99  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable,
100  std::vector<Vector>& rOutput,
101  const ProcessInfo& rCurrentProcessInfo) override;
102 
103 private:
104  // boolean for the cable --> does not resist to compression
105  bool mIsCompressed;
106 
107  friend class Serializer;
108 
109  void save(Serializer& rSerializer) const override
110  {
112  rSerializer.save("mIscompressed", mIsCompressed);
113  }
114 
115  void load(Serializer& rSerializer) override
116  {
117  KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, BaseType);
118  rSerializer.load("mIscompressed", mIsCompressed);
119  }
120 };
121 } // namespace Kratos
122 
123 #endif
Vector VectorType
Definition: element.h:88
std::size_t SizeType
Definition: element.h:94
Properties PropertiesType
Definition: element.h:80
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: element.h:86
Matrix MatrixType
Definition: element.h:90
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: element.h:83
std::size_t IndexType
Definition: element.h:92
std::size_t IndexType
Definition: flags.h:74
This is a cable element inheriting from the GeoTrussElement.
Definition: geo_cable_element.hpp:36
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(GeoCableElement)
typename GeoTrussElementBase< TDim, TNumNodes >::FullDofMatrixType FullDofMatrixType
Definition: geo_cable_element.hpp:50
GeoCableElement()
Definition: geo_cable_element.hpp:57
typename GeoTrussElementBase< TDim, TNumNodes >::FullDofVectorType FullDofVectorType
Definition: geo_cable_element.hpp:51
This is a 2D-2node truss element with 2 translational dofs per node.
Definition: geo_truss_element_base.hpp:37
This is a 2node truss element with reset-displacement.
Definition: geo_truss_element.hpp:35
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 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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#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
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