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.
slip_constraint.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Riccardo Rossi
11 //
12 
13 #if !defined(SLIP_CONSTRAINT_H)
14 #define SLIP_CONSTRAINT_H
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/define.h"
23 
24 namespace Kratos
25 {
28 
32 
36 
40 
44 
54 class KRATOS_API(KRATOS_CORE) SlipConstraint
56 {
57 public:
60 
63 
66 
69 
72 
75 
78 
81 
84 
87 
90 
94 
98 
108  IndexType Id,
109  Dof<double>* pDofX,
110  Dof<double>* pDofY,
111  const array_1d<double,3> NormalVector
112  );
113 
118  IndexType Id,
119  Dof<double>* pDofX,
120  Dof<double>* pDofY,
121  Dof<double>* pDofZ,
122  const array_1d<double,3> NormalVector
123  );
124 
126  ~SlipConstraint() override
127  {
128  }
129 
133 
137 
144  void SetDofList(
145  const DofPointerVectorType& rSlaveDofsVector,
146  const DofPointerVectorType& rMasterDofsVector,
147  const ProcessInfo& rCurrentProcessInfo
148  ) override ;
149 
154  void SetSlaveDofsVector(const DofPointerVectorType& rSlaveDofsVector) override ;
155 
160  void SetMasterDofsVector(const DofPointerVectorType& rMasterDofsVector) override ;
161 
162 
169  void SetLocalSystem(
170  const MatrixType& rRelationMatrix,
171  const VectorType& rConstantVector,
172  const ProcessInfo& rCurrentProcessInfo
173  ) override ;
174 
175 
179 
184  std::string GetInfo() const override ;
185 
190  void PrintInfo(std::ostream &rOStream) const override;
191 
193 protected:
194  void ConstructorHelper(
195  DofPointerVectorType& rAllDofs,
196  array_1d<double,3>& rNormalVector
197  );
198 
202 
206 
210 
214 
216 
217 private:
220 
224 
227  friend class Serializer;
228 
229  void save(Serializer &rSerializer) const override
230  {
232  }
233 
234  void load(Serializer &rSerializer) override
235  {
237  }
238 };
239 
242 
244 inline std::istream& operator>>(std::istream& rIStream, SlipConstraint& rThis);
245 
247 inline std::ostream& operator<<(std::ostream& rOStream,
248  const SlipConstraint& rThis)
249 {
250  rThis.PrintInfo(rOStream);
251  rOStream << std::endl;
252 
253  return rOStream;
254 }
255 
257 
258 
259 } // namespace Kratos
260 
261 #endif // SLIP_CONSTRAINT_H
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
This class allows to add a master-slave constraint which is of the form SlaveDofVector = T * MasterDo...
Definition: linear_master_slave_constraint.h:58
BaseType::IndexType IndexType
The index type definition.
Definition: linear_master_slave_constraint.h:67
std::size_t IndexType
The index type definition.
Definition: master_slave_constraint.h:85
std::vector< std::size_t > EquationIdVectorType
The equation Id vector type definition.
Definition: master_slave_constraint.h:97
std::vector< DofType::Pointer > DofPointerVectorType
The DoF pointer vector type definition.
Definition: master_slave_constraint.h:91
This class defines the node.
Definition: node.h:65
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 constructs a constraint which imposes that v * n = 0 where: v is a variable n is the unit normal...
Definition: slip_constraint.h:56
BaseType::MatrixType MatrixType
The matrix type definition.
Definition: slip_constraint.h:80
BaseType::DofType DofType
The DoF type definition.
Definition: slip_constraint.h:68
KRATOS_CLASS_POINTER_DEFINITION(SlipConstraint)
Pointer definition of DataValueContainer.
~SlipConstraint() override
Destructor.
Definition: slip_constraint.h:126
BaseType::VariableType VariableType
The variable type definition (double)
Definition: slip_constraint.h:86
BaseType::IndexType IndexType
The index type definition.
Definition: slip_constraint.h:65
BaseType::NodeType NodeType
The node type definition.
Definition: slip_constraint.h:74
LinearMasterSlaveConstraint BaseType
The definition of the base class, we take the rest of the definitions from the base class.
Definition: slip_constraint.h:62
void PrintInfo(std::ostream &rOStream) const override
This method prints the current Constraint Id.
Definition: slip_constraint.cpp:153
BaseType::VectorType VectorType
The vector type definition.
Definition: slip_constraint.h:83
BaseType::DofPointerVectorType DofPointerVectorType
The DoF pointer vector type definition.
Definition: slip_constraint.h:71
BaseType::EquationIdVectorType EquationIdVectorType
The equation Id vector type definition.
Definition: slip_constraint.h:77
#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
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