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.
elastic_condition.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: August 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_ELASTIC_CONDITION_H_INCLUDED)
11 #define KRATOS_ELASTIC_CONDITION_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 #include "includes/variables.h"
20 namespace Kratos
21 {
36 
38 
43 class KRATOS_API(SOLID_MECHANICS_APPLICATION) ElasticCondition
44  : public BoundaryCondition
45 {
46 public:
47 
50 
53 
54  // Counted pointer of ElasticCondition
56 
60 
63 
65  ElasticCondition( IndexType NewId, GeometryType::Pointer pGeometry );
66 
67  ElasticCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
68 
70  ElasticCondition( ElasticCondition const& rOther);
71 
73  ~ElasticCondition() override;
74 
78 
79 
83 
91  Condition::Pointer Create(IndexType NewId,
92  NodesArrayType const& ThisNodes,
93  PropertiesType::Pointer pProperties ) const override;
94 
95 
103  Condition::Pointer Clone(IndexType NewId,
104  NodesArrayType const& ThisNodes) const override;
105 
106  //************************************************************************************
107  //************************************************************************************
115  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
116 
130 
131 protected:
143 
144 
148  bool HasVariableDof(VariableVectorType& rVariable) const override
149  {
150  if(rVariable == ROTATION)
151  return false;
152  else
153  return BoundaryCondition::HasVariableDof(rVariable);
154  };
155 
156 
160  virtual void CalculateExternalStiffness(ConditionVariables& rVariables);
161 
165  void CalculateAndAddKuug(MatrixType& rLeftHandSideMatrix,
166  ConditionVariables& rVariables,
167  double& rIntegrationWeight) override;
168 
172  void CalculateAndAddExternalForces(Vector& rRightHandSideVector,
173  ConditionVariables& rVariables,
174  double& rIntegrationWeight) override;
175 
179  double& CalculateAndAddExternalEnergy(double& rEnergy,
180  ConditionVariables& rVariables,
181  double& rIntegrationWeight,
182  const ProcessInfo& rCurrentProcessInfo) override;
183 
194 
195 private:
216 
217  friend class Serializer;
218 
219  void save(Serializer& rSerializer) const override;
220 
221  void load(Serializer& rSerializer) override;
222 
223 
224 }; // class ElasticCondition.
225 
226 } // namespace Kratos.
227 
228 #endif // KRATOS_ELASTIC_CONDITION_H_INCLUDED defined
General Boundary Condition base type for 3D and 2D geometries.
Definition: boundary_condition.hpp:49
virtual bool HasVariableDof(VariableVectorType &rVariable) const
Definition: boundary_condition.cpp:96
Elastic Condition for 3D and 2D geometries. (base class)
Definition: elastic_condition.hpp:45
GeometryData::SizeType SizeType
Type for size.
Definition: elastic_condition.hpp:52
bool HasVariableDof(VariableVectorType &rVariable) const override
Definition: elastic_condition.hpp:148
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ElasticCondition)
std::size_t IndexType
Definition: flags.h:74
std::size_t SizeType
Definition: geometry_data.h:173
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
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
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
def load(f)
Definition: ode_solve.py:307