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_linear_truss_element_base.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_TRUSS_ELEMENT_LINEAR_BASE_H_INCLUDED)
15 #define KRATOS_GEO_TRUSS_ELEMENT_LINEAR_BASE_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
23 #include "includes/define.h"
24 #include "includes/variables.h"
25 
26 namespace Kratos
27 {
36 template <unsigned int TDim, unsigned int TNumNodes>
37 class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoTrussElementLinearBase
38  : public GeoTrussElementBase<TDim, TNumNodes>
39 {
40 public:
42 
53 
55 
57  GeoTrussElementLinearBase(IndexType NewId, GeometryType::Pointer pGeometry);
58  GeoTrussElementLinearBase(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
59 
60  ~GeoTrussElementLinearBase() override;
61 
69  Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override;
70 
78  Element::Pointer Create(IndexType NewId,
79  NodesArrayType const& ThisNodes,
80  PropertiesType::Pointer pProperties) const override;
81 
82  void CalculateRightHandSide(VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo) override;
83 
84  void CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix, const ProcessInfo& rCurrentProcessInfo) override;
85 
90  void AddPrestressLinear(VectorType& rRightHandSideVector);
91 
93  std::vector<array_1d<double, 3>>& rOutput,
94  const ProcessInfo& rCurrentProcessInfo) override;
95 
96  void CalculateOnIntegrationPoints(const Variable<Vector>& rVariable,
97  std::vector<Vector>& rOutput,
98  const ProcessInfo& rCurrentProcessInfo) override;
99 
103  void CreateElementStiffnessMatrix(MatrixType& rLocalStiffnessMatrix,
104  const ProcessInfo& rCurrentProcessInfo) override;
105 
110  void WriteTransformationCoordinates(FullDofVectorType& rReferenceCoordinates) override;
111 
115  double CalculateLinearStrain();
116 
122  void UpdateInternalForces(FullDofVectorType& rInternalForces, const ProcessInfo& rCurrentProcessInfo) override;
123 
124  void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
125 
126 private:
127  friend class Serializer;
128 
129  void save(Serializer& rSerializer) const override
130  {
132  }
133 
134  void load(Serializer& rSerializer) override
135  {
136  KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, BaseType);
137  }
138 };
139 
140 } // namespace Kratos
141 
142 #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 2D-2node truss element with 2 translational dofs per node.
Definition: geo_truss_element_base.hpp:37
This is a linear truss element inheriting from GeoTrussElementBase.
Definition: geo_linear_truss_element_base.hpp:39
GeoTrussElementLinearBase()
Definition: geo_linear_truss_element_base.hpp:56
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(GeoTrussElementLinearBase)
typename GeoTrussElementBase< TDim, TNumNodes >::FullDofMatrixType FullDofMatrixType
Definition: geo_linear_truss_element_base.hpp:51
typename GeoTrussElementBase< TDim, TNumNodes >::FullDofVectorType FullDofVectorType
Definition: geo_linear_truss_element_base.hpp:52
void WriteTransformationCoordinates(FullDofVectorType &rReferenceCoordinates) override
This function calculates the original nodal postion for the transformation matrix.
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
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