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.
moment_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_MOMENT_CONDITION_H_INCLUDED)
11 #define KRATOS_MOMENT_CONDITION_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
20 namespace Kratos
21 {
36 
38 
43 class KRATOS_API(SOLID_MECHANICS_APPLICATION) MomentCondition
44  : public BoundaryCondition
45 {
46 public:
47 
50 
53 
54  // Counted pointer of MomentCondition
56 
60 
63 
65  MomentCondition( IndexType NewId, GeometryType::Pointer pGeometry );
66 
67  MomentCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
68 
70  MomentCondition( MomentCondition const& rOther);
71 
73  ~MomentCondition() 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 
110  void GetDofList(DofsVectorType& rConditionDofList,
111  const ProcessInfo& rCurrentProcessInfo) const override;
112 
116  void EquationIdVector(EquationIdVectorType& rResult,
117  const ProcessInfo& rCurrentProcessInfo) const override;
118 
122  void GetValuesVector(Vector& rValues,
123  int Step = 0) const override;
124 
128  void GetFirstDerivativesVector(Vector& rValues,
129  int Step = 0) const override;
130 
134  void GetSecondDerivativesVector(Vector& rValues,
135  int Step = 0) const override;
136 
146  void AddExplicitContribution(const VectorType& rRHS,
147  const Variable<VectorType>& rRHSVariable,
148  const Variable<array_1d<double,3> >& rDestinationVariable,
149  const ProcessInfo& rCurrentProcessInfo) override;
150 
151  //************************************************************************************
152  //************************************************************************************
160  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
161 
175 
176 protected:
188 
192  void InitializeExplicitContributions();
193 
194 
199  unsigned int GetDofsSize() const override;
200 
201 
205  virtual void CalculateExternalMoment(ConditionVariables& rVariables);
206 
207 
211  void CalculateAndAddExternalForces(Vector& rRightHandSideVector,
212  ConditionVariables& rVariables,
213  double& rIntegrationWeight) override;
214 
215 
219  double& CalculateAndAddExternalEnergy(double& rEnergy,
220  ConditionVariables& rVariables,
221  double& rIntegrationWeight,
222  const ProcessInfo& rCurrentProcessInfo) override;
223 
234 
235 private:
256 
257  friend class Serializer;
258 
259  void save(Serializer& rSerializer) const override;
260 
261  void load(Serializer& rSerializer) override;
262 
263 
264 }; // class MomentCondition.
265 
266 } // namespace Kratos.
267 
268 #endif // KRATOS_MOMENT_CONDITION_H_INCLUDED defined
General Boundary Condition base type for 3D and 2D geometries.
Definition: boundary_condition.hpp:49
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< DofType::Pointer > DofsVectorType
Definition: condition.h:100
std::size_t IndexType
Definition: flags.h:74
std::size_t SizeType
Definition: geometry_data.h:173
Load Condition for 3D and 2D geometries. (base class)
Definition: moment_condition.hpp:45
GeometryData::SizeType SizeType
Type for size.
Definition: moment_condition.hpp:52
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MomentCondition)
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
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
Definition: boundary_condition.hpp:79