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.
contact_master_slave_constraint.h
Go to the documentation of this file.
1 // KRATOS ______ __ __ _____ __ __ __
2 // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
3 // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
4 // / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
5 // \____/\____/_/ /_/\__/\__,_/\___/\__//____/\__/_/ \__,_/\___/\__/\__,_/_/ \__,_/_/ MECHANICS
6 //
7 // License: BSD License
8 // license: ContactStructuralMechanicsApplication/license.txt
9 //
10 // Main authors: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
21 
22 namespace Kratos
23 {
26 
30 
31  using SizeType = std::size_t;
32 
36 
40 
44 
52 class KRATOS_API(CONTACT_STRUCTURAL_MECHANICS_APPLICATION) ContactMasterSlaveConstraint
54 {
55 public:
58 
61 
64 
66  using IndexType = typename BaseType::IndexType;
67 
69  using DofType = typename BaseType::DofType;
70 
73 
76 
78  using MatrixType = typename BaseType::MatrixType;
79 
81  using VectorType = typename BaseType::VectorType;
82 
85 
88 
92 
96 
101  explicit ContactMasterSlaveConstraint(IndexType Id = 0);
102 
112  IndexType Id,
113  DofPointerVectorType& rMasterDofsVector,
114  DofPointerVectorType& rSlaveDofsVector,
115  const MatrixType& rRelationMatrix,
116  const VectorType& rConstantVector
117  );
118 
130  IndexType Id,
131  Node& rMasterNode,
132  const VariableType& rMasterVariable,
133  Node& rSlaveNode,
134  const VariableType& rSlaveVariable,
135  const double Weight,
136  const double Constant
137  );
138 
140  ~ContactMasterSlaveConstraint() override;
141 
144 
147 
151 
155 
165  MasterSlaveConstraint::Pointer Create(
166  IndexType Id,
167  DofPointerVectorType& rMasterDofsVector,
168  DofPointerVectorType& rSlaveDofsVector,
169  const MatrixType& rRelationMatrix,
170  const VectorType& rConstantVector
171  ) const override;
172 
184  MasterSlaveConstraint::Pointer Create(
185  IndexType Id,
186  Node& rMasterNode,
187  const VariableType& rMasterVariable,
188  Node& rSlaveNode,
189  const VariableType& rSlaveVariable,
190  const double Weight,
191  const double Constant
192  ) const override;
193 
197  void FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override;
198 
202 
207  std::string GetInfo() const override;
208 
213  void PrintInfo(std::ostream &rOStream) const override;
214 
216 private:
219 
223 
226 
227  friend class Serializer;
228 
229  void save(Serializer &rSerializer) const override;
230 
231  void load(Serializer &rSerializer) override;
232 };
233 
236 
238 inline std::istream& operator>>(std::istream& rIStream, ContactMasterSlaveConstraint& rThis);
239 
241 inline std::ostream& operator<<(std::ostream& rOStream,
242  const ContactMasterSlaveConstraint& rThis)
243 {
244  rThis.PrintInfo(rOStream);
245  rOStream << std::endl;
246 
247  return rOStream;
248 }
249 
251 
252 } // namespace Kratos
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This is a constraint for contact mechanics based in a linear kinematic MPC constriant.
Definition: contact_master_slave_constraint.h:54
void PrintInfo(std::ostream &rOStream) const override
This method prints the current Constraint Id.
Definition: contact_master_slave_constraint.cpp:131
KRATOS_CLASS_POINTER_DEFINITION(ContactMasterSlaveConstraint)
Pointer definition of DataValueContainer.
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::DofPointerVectorType DofPointerVectorType
The DoF pointer vector type definition.
Definition: linear_master_slave_constraint.h:73
BaseType::IndexType IndexType
The index type definition.
Definition: linear_master_slave_constraint.h:67
BaseType::EquationIdVectorType EquationIdVectorType
The equation Id vector type definition.
Definition: linear_master_slave_constraint.h:79
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
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
std::size_t IndexType
Definition: binary_expression.cpp:25
Vector VectorType
Definition: geometrical_transformation_utilities.h:56
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::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
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