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.
small_displacement_line_load_condition.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Vicente Mataix Ferrandiz
10 //
11 
12 // System includes
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
21 
22 namespace Kratos
23 {
24 
27 
31 
35 
39 
43 
52 template<std::size_t TDim>
53 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) SmallDisplacementLineLoadCondition
54  : public LineLoadCondition<TDim>
55 {
56 public:
59 
62 
65 
68 
71 
74 
77 
80 
83 
86 
89 
93 
94  // Constructor using an array of nodes
96  IndexType NewId,
97  GeometryType::Pointer pGeometry
98  );
99 
100  // Constructor using an array of nodes with properties
102  IndexType NewId,
103  GeometryType::Pointer pGeometry,
104  PropertiesType::Pointer pProperties
105  );
106 
109 
113 
114 
118 
126  Condition::Pointer Create(
127  IndexType NewId,
128  NodesArrayType const& ThisNodes,
129  PropertiesType::Pointer pProperties
130  ) const override;
131 
139  Condition::Pointer Create(
140  IndexType NewId,
141  GeometryType::Pointer pGeom,
142  PropertiesType::Pointer pProperties
143  ) const override;
144 
151  Condition::Pointer Clone (
152  IndexType NewId,
153  NodesArrayType const& ThisNodes
154  ) const override;
155 
159 
160 
164 
165 
169 
171  std::string Info() const override
172  {
173  std::stringstream buffer;
174  buffer << "Small displacement line load condition #" << this->Id();
175  return buffer.str();
176  }
177 
179 
180  void PrintInfo(std::ostream& rOStream) const override
181  {
182  rOStream << "SmallDisplacementLineLoadCondition #" << this->Id();
183  }
184 
186  void PrintData(std::ostream& rOStream) const override
187  {
188  this->pGetGeometry()->PrintData(rOStream);
189  }
190 
194 
195 
197 
198 protected:
201 
202 
206 
207 
211 
212 
216 
225  void CalculateAll(
226  MatrixType& rLeftHandSideMatrix,
227  VectorType& rRightHandSideVector,
228  const ProcessInfo& rCurrentProcessInfo,
229  const bool CalculateStiffnessMatrixFlag,
230  const bool CalculateResidualVectorFlag
231  ) override;
232 
236 
237 
241 
242 
246 
247  // A protected default constructor necessary for serialization
249 
251 
252 private:
255 
259 
263 
267 
271 
275 
279 
280  friend class Serializer;
281 
282  void save( Serializer& rSerializer ) const override
283  {
285  }
286 
287  void load( Serializer& rSerializer ) override
288  {
289  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseType );
290  }
291 
295 
297 
298 }; // Class SmallDisplacementLineLoadCondition
299 
303 
304 
308 
310 template<std::size_t TDim>
311 inline std::istream& operator >> (std::istream& rIStream,
314 template<std::size_t TDim>
315 inline std::ostream& operator << (std::ostream& rOStream,
317 {
318  rThis.PrintInfo(rOStream);
319  rOStream << std::endl;
320  rThis.PrintData(rOStream);
321 
322  return rOStream;
323 }
324 
326 
327 } // namespace Kratos.
328 
329 
BaseType::NodesArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: base_load_condition.h:79
BaseType::SizeType SizeType
Definition of the size type.
Definition: base_load_condition.h:67
BaseType::PropertiesType PropertiesType
Definition of the properties type.
Definition: base_load_condition.h:73
BaseType::IndexType IndexType
Dfinition of the index type.
Definition: base_load_condition.h:64
std::size_t IndexType
Definition: flags.h:74
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
Line load condition for 3D and 2D geometries.
Definition: line_load_condition.hpp:41
This class defines the node.
Definition: node.h:65
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
This class is the responsible to add the contributions of the RHS and LHS of the line loads of the st...
Definition: small_displacement_line_load_condition.h:55
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: small_displacement_line_load_condition.h:186
LineLoadCondition< TDim > BaseType
We define the base class Base LoadCondition.
Definition: small_displacement_line_load_condition.h:61
BaseLoadCondition::NodeType NodeType
Definition of the node type.
Definition: small_displacement_line_load_condition.h:76
BaseLoadCondition::IndexType IndexType
Definition of the index type.
Definition: small_displacement_line_load_condition.h:70
SmallDisplacementLineLoadCondition()
Definition: small_displacement_line_load_condition.h:248
BaseLoadCondition::VectorType VectorType
Definition of the vector type.
Definition: small_displacement_line_load_condition.h:64
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SmallDisplacementLineLoadCondition)
Counted pointer of SmallDisplacementLineLoadCondition.
std::string Info() const override
Turn back information as a string.
Definition: small_displacement_line_load_condition.h:171
BaseLoadCondition::MatrixType MatrixType
Definition of the matrix type.
Definition: small_displacement_line_load_condition.h:67
BaseLoadCondition::GeometryType GeometryType
Definition of the geometry type with given NodeType.
Definition: small_displacement_line_load_condition.h:82
BaseLoadCondition::PropertiesType PropertiesType
Definition of the properties type.
Definition: small_displacement_line_load_condition.h:79
BaseLoadCondition::SizeType SizeType
Definition of the size type.
Definition: small_displacement_line_load_condition.h:73
BaseLoadCondition::NodesArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: small_displacement_line_load_condition.h:85
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_displacement_line_load_condition.h:180
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307