125 mSlaveDofsVector(rSlaveDofsVector),
126 mMasterDofsVector(rMasterDofsVector),
127 mRelationMatrix(rRelationMatrix),
128 mConstantVector(rConstantVector)
145 const VariableType& rMasterVariable,
147 const VariableType& rSlaveVariable,
149 const double Constant
161 mSlaveDofsVector(rOther.mSlaveDofsVector),
162 mMasterDofsVector(rOther.mMasterDofsVector),
163 mRelationMatrix(rOther.mRelationMatrix),
164 mConstantVector(rOther.mConstantVector)
205 return Kratos::make_shared<LinearMasterSlaveConstraint>(Id, rMasterDofsVector, rSlaveDofsVector, rRelationMatrix, rConstantVector);
227 const double Constant
231 return Kratos::make_shared<LinearMasterSlaveConstraint>(Id, rMasterNode, rMasterVariable, rSlaveNode, rSlaveVariable, Weight, Constant);
244 MasterSlaveConstraint::Pointer p_new_const = Kratos::make_shared<LinearMasterSlaveConstraint>(*
this);
245 p_new_const->SetId(NewId);
246 p_new_const->SetData(this->GetData());
247 p_new_const->Set(
Flags(*
this));
265 rSlaveDofsVector = mSlaveDofsVector;
266 rMasterDofsVector = mMasterDofsVector;
281 mSlaveDofsVector = rSlaveDofsVector;
282 mMasterDofsVector = rMasterDofsVector;
291 void EquationIdVector(
292 EquationIdVectorType& rSlaveEquationIds,
293 EquationIdVectorType& rMasterEquationIds,
303 return mSlaveDofsVector;
312 mSlaveDofsVector = rSlaveDofsVector;
321 return mMasterDofsVector;
330 mMasterDofsVector = rMasterDofsVector;
343 void Apply(
const ProcessInfo& rCurrentProcessInfo)
override;
364 void CalculateLocalSystem(
380 return "Linear User Provided Master Slave Constraint class !";
389 rOStream <<
" LinearMasterSlaveConstraint Id : " << this->Id() << std::endl;
390 rOStream <<
" Number of Slaves : " << mSlaveDofsVector.size() << std::endl;
391 rOStream <<
" Number of Masters : " << mMasterDofsVector.size() << std::endl;
417 void save(
Serializer &rSerializer)
const override;
436 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
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
std::string GetInfo() const override
Returns the string containing a detailed description of this object.
Definition: linear_master_slave_constraint.h:378
LinearMasterSlaveConstraint(const LinearMasterSlaveConstraint &rOther)
Copy Constructor.
Definition: linear_master_slave_constraint.h:159
void SetSlaveDofsVector(const DofPointerVectorType &rSlaveDofsVector) override
This method returns the slave dof vector.
Definition: linear_master_slave_constraint.h:310
LinearMasterSlaveConstraint(IndexType Id, DofPointerVectorType &rMasterDofsVector, DofPointerVectorType &rSlaveDofsVector, const MatrixType &rRelationMatrix, const VectorType &rConstantVector)
Constructor by passing a vector of Master and slave dofs and corresponding Matrix and constant vector...
Definition: linear_master_slave_constraint.h:118
const DofPointerVectorType & GetMasterDofsVector() const override
This method returns the slave dof vector.
Definition: linear_master_slave_constraint.h:319
BaseType::MatrixType MatrixType
The matrix type definition.
Definition: linear_master_slave_constraint.h:82
BaseType::DofPointerVectorType DofPointerVectorType
The DoF pointer vector type definition.
Definition: linear_master_slave_constraint.h:73
LinearMasterSlaveConstraint & operator=(const LinearMasterSlaveConstraint &rOther)
Assignment operator.
Definition: linear_master_slave_constraint.h:169
void SetMasterDofsVector(const DofPointerVectorType &rMasterDofsVector) override
This method returns the slave dof vector.
Definition: linear_master_slave_constraint.h:328
BaseType::IndexType IndexType
The index type definition.
Definition: linear_master_slave_constraint.h:67
BaseType::VariableType VariableType
The variable type definition (double)
Definition: linear_master_slave_constraint.h:88
MasterSlaveConstraint::Pointer Create(IndexType Id, NodeType &rMasterNode, const VariableType &rMasterVariable, NodeType &rSlaveNode, const VariableType &rSlaveVariable, const double Weight, const double Constant) const override
Create method by passing a single Master and slave dofs and corresponding weight and constant for a v...
Definition: linear_master_slave_constraint.h:220
const DofPointerVectorType & GetSlaveDofsVector() const override
This method returns the slave dof vector.
Definition: linear_master_slave_constraint.h:301
BaseType::VectorType VectorType
The vector type definition.
Definition: linear_master_slave_constraint.h:85
BaseType::EquationIdVectorType EquationIdVectorType
The equation Id vector type definition.
Definition: linear_master_slave_constraint.h:79
KRATOS_CLASS_POINTER_DEFINITION(LinearMasterSlaveConstraint)
Pointer definition of DataValueContainer.
MasterSlaveConstraint BaseType
The definition of the base class, we take the rest of the definitions from the base class.
Definition: linear_master_slave_constraint.h:64
void PrintInfo(std::ostream &rOStream) const override
This method prints the current Constraint Id.
Definition: linear_master_slave_constraint.h:387
MatrixType mRelationMatrix
The DoFs of master side.
Definition: linear_master_slave_constraint.h:405
DofPointerVectorType mSlaveDofsVector
Definition: linear_master_slave_constraint.h:403
MasterSlaveConstraint::Pointer Create(IndexType Id, DofPointerVectorType &rMasterDofsVector, DofPointerVectorType &rSlaveDofsVector, const MatrixType &rRelationMatrix, const VectorType &rConstantVector) const override
Create method by passing a single Master and slave dofs and corresponding weight and constant for a v...
Definition: linear_master_slave_constraint.h:196
void GetDofList(DofPointerVectorType &rSlaveDofsVector, DofPointerVectorType &rMasterDofsVector, const ProcessInfo &rCurrentProcessInfo) const override
Determines the constrant's slvae and master list of DOFs.
Definition: linear_master_slave_constraint.h:259
~LinearMasterSlaveConstraint() override
Destructor.
Definition: linear_master_slave_constraint.h:153
DofPointerVectorType mMasterDofsVector
The DoFs of slave side.
Definition: linear_master_slave_constraint.h:404
LinearMasterSlaveConstraint(IndexType Id=0)
The default constructor.
Definition: linear_master_slave_constraint.h:105
MasterSlaveConstraint::Pointer Clone(IndexType NewId) const override
It creates a new constraint pointer and clones the previous constraint data.
Definition: linear_master_slave_constraint.h:240
VectorType mConstantVector
The relation matrix between the master/slave DoF.
Definition: linear_master_slave_constraint.h:406
void SetDofList(const DofPointerVectorType &rSlaveDofsVector, const DofPointerVectorType &rMasterDofsVector, const ProcessInfo &rCurrentProcessInfo) override
Determines the constrant's slave and master list of DOFs.
Definition: linear_master_slave_constraint.h:275
BaseType::NodeType NodeType
The node type definition.
Definition: linear_master_slave_constraint.h:76
BaseType::DofType DofType
The DoF type definition.
Definition: linear_master_slave_constraint.h:70
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
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
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
void ResetSlaveDofs(ModelPart &rModelPart)
This method resets the values of the slave dofs.
Definition: constraint_utilities.cpp:136
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