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.
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) LineLoadCondition
54  : public BaseLoadCondition
55 {
56 public:
59 
62 
65 
68 
71 
74 
77 
80 
83 
87 
88  // Constructor using an array of nodes
90  IndexType NewId,
91  GeometryType::Pointer pGeometry
92  );
93 
94  // Constructor using an array of nodes with properties
96  IndexType NewId,
97  GeometryType::Pointer pGeometry,
98  PropertiesType::Pointer pProperties
99  );
100 
102  ~LineLoadCondition() override;
103 
107 
108 
112 
120  Condition::Pointer Create(
121  IndexType NewId,
122  NodesArrayType const& ThisNodes,
123  PropertiesType::Pointer pProperties
124  ) const override;
125 
133  Condition::Pointer Create(
134  IndexType NewId,
135  GeometryType::Pointer pGeom,
136  PropertiesType::Pointer pProperties
137  ) const override;
138 
145  Condition::Pointer Clone (
146  IndexType NewId,
147  NodesArrayType const& ThisNodes
148  ) const override;
149 
157  const Variable<array_1d<double, 3>>& rVariable,
158  std::vector< array_1d<double, 3>>& rOutput,
159  const ProcessInfo& rCurrentProcessInfo
160  ) override;
161 
165 
166 
170 
171 
175 
177  std::string Info() const override
178  {
179  std::stringstream buffer;
180  buffer << "LineLoadCondition #" << Id();
181  return buffer.str();
182  }
183 
185 
186  void PrintInfo(std::ostream& rOStream) const override
187  {
188  rOStream << "LineLoadCondition #" << Id();
189  }
190 
192  void PrintData(std::ostream& rOStream) const override
193  {
194  pGetGeometry()->PrintData(rOStream);
195  }
196 
200 
201 
203 
204 protected:
207 
208 
212 
213 
217 
218 
222 
231  void CalculateAll(
232  MatrixType& rLeftHandSideMatrix,
233  VectorType& rRightHandSideVector,
234  const ProcessInfo& rCurrentProcessInfo,
235  const bool CalculateStiffnessMatrixFlag,
236  const bool CalculateResidualVectorFlag
237  ) override;
238 
248  void CalculateAndSubKp(
249  Matrix& rK,
250  const array_1d<double, 3>& rTangentXi,
251  const Matrix& rDN_De,
252  const Vector& rN,
253  const double Pressure,
254  const double IntegrationWeight
255  ) const;
256 
266  void CalculateAndAddPressureForce(
267  VectorType& rRightHandSideVector,
268  const Vector& rN,
269  const array_1d<double, 3>& rNormal,
270  const double Pressure,
271  const double IntegrationWeight
272  ) const;
273 
280  array_1d<double, 3>& rLocalAxis,
281  const Matrix& rJacobian
282  ) const;
283 
288  void GetLocalAxis2(array_1d<double, 3>& rLocalAxis) const;
289 
296  BoundedMatrix<double, TDim, TDim>& rCrossTangentMatrix,
297  const array_1d<double, 3>& rTangentXi
298  ) const;
299 
303 
304 
308 
309 
313 
314  // A protected default constructor necessary for serialization
316 
318 
319 private:
322 
326 
330 
334 
338 
342 
346 
347  friend class Serializer;
348 
349  void save( Serializer& rSerializer ) const override
350  {
352  }
353 
354  void load( Serializer& rSerializer ) override
355  {
356  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, BaseLoadCondition );
357  }
358 
362 
364  //LineLoadCondition& operator=(const LineLoadCondition& rOther);
365 
367  //LineLoadCondition(const LineLoadCondition& rOther);
368 
369 
371 
372 }; // Class LineLoadCondition
373 
377 
378 
382 
384 template<std::size_t TDim>
385 inline std::istream& operator >> (std::istream& rIStream,
386  LineLoadCondition<TDim>& rThis);
388 template<std::size_t TDim>
389 inline std::ostream& operator << (std::ostream& rOStream,
390  const LineLoadCondition<TDim>& rThis)
391 {
392  rThis.PrintInfo(rOStream);
393  rOStream << std::endl;
394  rThis.PrintData(rOStream);
395 
396  return rOStream;
397 }
398 
400 
401 } // namespace Kratos.
402 
403 
This is the base class of all the load conditions on StructuralMechanicsApplication.
Definition: base_load_condition.h:54
std::size_t IndexType
Definition: flags.h:74
std::size_t IndexType
Defines the index type.
Definition: geometrical_object.h:73
Geometry base class.
Definition: geometry.h:71
Line load condition for 3D and 2D geometries.
Definition: line_load_condition.hpp:41
LineLoadCondition(IndexType NewId, GeometryType::Pointer pGeometry)
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: line_load_condition.h:186
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(LineLoadCondition)
Counted pointer of LineLoadCondition.
BaseLoadCondition BaseType
We define the base class BaseLoadCondition.
Definition: line_load_condition.h:61
LineLoadCondition()
Definition: line_load_condition.h:315
std::string Info() const override
Turn back information as a string.
Definition: line_load_condition.h:177
Condition::Pointer Clone(IndexType NewId, NodesArrayType const &ThisNodes) const override
Creates a new condition pointer and clones the previous condition data.
BaseType::NodeType NodeType
Definition of the node type.
Definition: line_load_condition.h:70
void GetLocalAxis1(array_1d< double, 3 > &rLocalAxis, const Matrix &rJacobian) const
This method provides the local axis.
BaseType::NodesArrayType NodesArrayType
Definition of nodes container type, redefined from GeometryType.
Definition: line_load_condition.h:79
BaseType::SizeType SizeType
Definition of the size type.
Definition: line_load_condition.h:67
BaseType::PropertiesType PropertiesType
Definition of the properties type.
Definition: line_load_condition.h:73
Condition::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Creates a new condition pointer.
void GetCrossTangentMatrix(BoundedMatrix< double, TDim, TDim > &rCrossTangentMatrix, const array_1d< double, 3 > &rTangentXi) const
This method provides the cross tangent matrix.
BaseType::GeometryType GeometryType
Definition of the geometry type with given NodeType.
Definition: line_load_condition.h:76
BaseType::IndexType IndexType
Dfinition of the index type.
Definition: line_load_condition.h:64
~LineLoadCondition() override
Destructor.
void GetLocalAxis2(array_1d< double, 3 > &rLocalAxis) const
This method provides the local axis.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: line_load_condition.h:192
LineLoadCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
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
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
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
std::size_t SizeType
Definition: nurbs_utilities.h:41
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
Properties PropertiesType
Definition: regenerate_pfem_pressure_conditions_process.h:26
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
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