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.
load_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: July 2013 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_LOAD_CONDITION_H_INCLUDED)
11 #define KRATOS_LOAD_CONDITION_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 #include "includes/variables.h"
20 #include "includes/kratos_flags.h"
21 #include "custom_utilities/solid_mechanics_math_utilities.hpp"
22 
23 namespace Kratos
24 {
39 
41 
46 class KRATOS_API(SOLID_MECHANICS_APPLICATION) LoadCondition
47  : public BoundaryCondition
48 {
49 public:
50 
53 
56 
57  // Counted pointer of LoadCondition
59 
63 
66 
68  LoadCondition( IndexType NewId, GeometryType::Pointer pGeometry );
69 
70  LoadCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
71 
73  LoadCondition( LoadCondition const& rOther);
74 
76  ~LoadCondition() override;
77 
81 
82 
86 
94  Condition::Pointer Create(IndexType NewId,
95  NodesArrayType const& ThisNodes,
96  PropertiesType::Pointer pProperties ) const override;
97 
98 
106  Condition::Pointer Clone(IndexType NewId,
107  NodesArrayType const& ThisNodes) const override;
108 
109  //************************************************************************************
110  //************************************************************************************
118  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
119 
133 
134 protected:
146 
150  bool HasVariableDof(VariableVectorType& rVariable) const override
151  {
152  if(rVariable == ROTATION)
153  return false;
154  else
155  return BoundaryCondition::HasVariableDof(rVariable);
156  };
157 
161  void InitializeConditionVariables(ConditionVariables& rVariables,
162  const ProcessInfo& rCurrentProcessInfo) override;
163 
167  virtual void CalculateExternalLoad(ConditionVariables& rVariables);
168 
169 
173  void CalculateAndAddExternalForces(Vector& rRightHandSideVector,
174  ConditionVariables& rVariables,
175  double& rIntegrationWeight) override;
176 
177 
181  double& CalculateAndAddExternalEnergy(double& rEnergy,
182  ConditionVariables& rVariables,
183  double& rIntegrationWeight,
184  const ProcessInfo& rCurrentProcessInfo) override;
185 
196 
197 private:
218 
219  friend class Serializer;
220 
221  void save(Serializer& rSerializer) const override;
222 
223  void load(Serializer& rSerializer) override;
224 
225 
226 }; // class LoadCondition.
227 
228 } // namespace Kratos.
229 
230 #endif // KRATOS_LOAD_CONDITION_H_INCLUDED defined
virtual bool HasVariableDof(VariableVectorType &rVariable) const
Definition: boundary_condition.cpp:96
std::size_t IndexType
Definition: flags.h:74
std::size_t SizeType
Definition: geometry_data.h:173
Condition for basic load types.
Definition: load_condition.h:36
LoadCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(LoadCondition)
LoadCondition()
Empty constructor needed for serialization.
~LoadCondition() override
Destructor.
GeometryData::SizeType SizeType
Type for size.
Definition: load_condition.hpp:55
LoadCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Default constructor.
bool HasVariableDof(VariableVectorType &rVariable) const override
Definition: load_condition.hpp:150
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307