144 mData = rOther.mData;
165 virtual MasterSlaveConstraint::Pointer
Create(
175 KRATOS_ERROR <<
"Create not implemented in MasterSlaveConstraintBaseClass" << std::endl;
191 virtual MasterSlaveConstraint::Pointer
Create(
198 const double Constant
203 KRATOS_ERROR <<
"Create not implemented in MasterSlaveConstraintBaseClass" << std::endl;
217 KRATOS_WARNING(
"MasterSlaveConstraint") <<
" Call base class constraint Clone " << std::endl;
218 MasterSlaveConstraint::Pointer p_new_const = Kratos::make_shared<MasterSlaveConstraint>(*
this);
219 p_new_const->SetId(NewId);
220 p_new_const->SetData(this->GetData());
221 p_new_const->Set(
Flags(*
this));
296 KRATOS_ERROR <<
"GetDofList not implemented in MasterSlaveConstraintBaseClass" << std::endl;
311 KRATOS_ERROR <<
"SetDofList not implemented in MasterSlaveConstraintBaseClass" << std::endl;
326 if (rSlaveEquationIds.size() != 0)
327 rSlaveEquationIds.resize(0);
329 if (rMasterEquationIds.size() != 0)
330 rMasterEquationIds.resize(0);
339 KRATOS_ERROR <<
"GetSlaveDofsVector not implemented in MasterSlaveConstraintBaseClass" << std::endl;
348 KRATOS_ERROR <<
"SetSlaveDofsVector not implemented in MasterSlaveConstraintBaseClass" << std::endl;
357 KRATOS_ERROR <<
"GetMasterDofsVector not implemented in MasterSlaveConstraintBaseClass" << std::endl;
366 KRATOS_ERROR <<
"SetMasterDofsVector not implemented in MasterSlaveConstraintBaseClass" << std::endl;
375 KRATOS_ERROR <<
"ResetSlaveDofs not implemented in MasterSlaveConstraintBaseClass" << std::endl;
384 KRATOS_ERROR <<
"Apply not implemented in MasterSlaveConstraintBaseClass" << std::endl;
401 KRATOS_ERROR <<
"SetLocalSystem not implemented in MasterSlaveConstraintBaseClass" << std::endl;
420 this->CalculateLocalSystem(rRelationMatrix, rConstantVector, rCurrentProcessInfo);
438 if (rRelationMatrix.size1() != 0) {
439 rRelationMatrix.
resize(0, 0,
false);
442 if (rConstantVector.size() != 0) {
443 rConstantVector.
resize(0,
false);
459 KRATOS_ERROR_IF( this->Id() < 1 ) <<
"MasterSlaveConstraint found with Id " << this->Id() << std::endl;
476 return " Constraint base class !";
483 virtual void PrintInfo(std::ostream &rOStream)
const override
485 rOStream <<
" MasterSlaveConstraint Id : " << this->Id() << std::endl;
523 template<
class TDataType>
526 return mData.Has(rThisVariable);
534 template<
class TVariableType>
536 const TVariableType& rThisVariable,
537 typename TVariableType::Type
const& rValue
540 mData.SetValue(rThisVariable, rValue);
547 template<
class TVariableType>
548 typename TVariableType::Type&
GetValue(
const TVariableType& rThisVariable)
550 return mData.GetValue(rThisVariable);
557 template<
class TVariableType>
558 typename TVariableType::Type&
GetValue(
const TVariableType& rThisVariable)
const
560 return mData.GetValue(rThisVariable);
571 bool IsActive()
const;
621 virtual void save(
Serializer &rSerializer)
const override
625 rSerializer.
save(
"Data", mData);
632 rSerializer.
load(
"Data", mData);
650 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Container for storing data values associated with variables.
Definition: data_value_container.h:63
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
std::size_t IndexType
Definition: flags.h:74
This object defines an indexed object.
Definition: indexed_object.h:54
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
virtual void FinalizeSolutionStep(const ProcessInfo &rCurrentProcessInfo)
This is called at the end of each solution step.
Definition: master_slave_constraint.h:280
MasterSlaveConstraint(const MasterSlaveConstraint &rOther)
Copy Constructor.
Definition: master_slave_constraint.h:134
virtual std::string GetInfo() const
Returns the string containing a detailed description of this object.
Definition: master_slave_constraint.h:474
virtual const DofPointerVectorType & GetSlaveDofsVector() const
This method returns the slave dof vector.
Definition: master_slave_constraint.h:337
MasterSlaveConstraint(IndexType Id=0)
The default constructor.
Definition: master_slave_constraint.h:123
virtual void ResetSlaveDofs(const ProcessInfo &rCurrentProcessInfo)
This method resets the values of the slave dofs.
Definition: master_slave_constraint.h:373
virtual Pointer Clone(IndexType NewId) const
It creates a new constraint pointer and clones the previous constraint data.
Definition: master_slave_constraint.h:213
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
This method provides the place to perform checks on the completeness of the input and the compatibili...
Definition: master_slave_constraint.h:455
virtual void SetSlaveDofsVector(const DofPointerVectorType &rSlaveDofsVector)
This method returns the slave dof vector.
Definition: master_slave_constraint.h:346
virtual void GetDofList(DofPointerVectorType &rSlaveDofsVector, DofPointerVectorType &rMasterDofsVector, const ProcessInfo &rCurrentProcessInfo) const
Determines the constrant's slave and master list of DOFs.
Definition: master_slave_constraint.h:290
virtual void Apply(const ProcessInfo &rCurrentProcessInfo)
This method directly applies the master/slave relationship.
Definition: master_slave_constraint.h:382
Matrix MatrixType
The matrix type definition.
Definition: master_slave_constraint.h:100
virtual void GetLocalSystem(MatrixType &rRelationMatrix, VectorType &rConstantVector, const ProcessInfo &rCurrentProcessInfo) const
This method allows to get the Local System in case is not computed on running time (internal variable...
Definition: master_slave_constraint.h:412
virtual void CalculateLocalSystem(MatrixType &rRelationMatrix, VectorType &rConstantVector, const ProcessInfo &rCurrentProcessInfo) const
This is called during the assembling process in order.
Definition: master_slave_constraint.h:432
bool Has(const Variable< TDataType > &rThisVariable) const
Check if the Data exists with Has(..) methods:
Definition: master_slave_constraint.h:524
Vector VectorType
The vector type definition.
Definition: master_slave_constraint.h:103
TVariableType::Type & GetValue(const TVariableType &rThisVariable) const
Get Data with GetValue and the Variable to get.
Definition: master_slave_constraint.h:558
virtual MasterSlaveConstraint::Pointer Create(IndexType Id, NodeType &rMasterNode, const VariableType &rMasterVariable, NodeType &rSlaveNode, const VariableType &rSlaveVariable, const double Weight, const double Constant) const
Definition: master_slave_constraint.h:191
DataValueContainer const & GetData() const
This method returns the data container of the constraint (constant)
Definition: master_slave_constraint.h:505
virtual void Finalize(const ProcessInfo &rCurrentProcessInfo)
It is called to finalize the constraint.
Definition: master_slave_constraint.h:248
Node NodeType
The node type definition.
Definition: master_slave_constraint.h:94
virtual void SetDofList(const DofPointerVectorType &rSlaveDofsVector, const DofPointerVectorType &rMasterDofsVector, const ProcessInfo &rCurrentProcessInfo)
Determines the constrant's slave and master list of DOFs.
Definition: master_slave_constraint.h:305
Kratos::Variable< double > VariableType
The variable type definition (double)
Definition: master_slave_constraint.h:106
virtual void SetMasterDofsVector(const DofPointerVectorType &rMasterDofsVector)
This method returns the slave dof vector.
Definition: master_slave_constraint.h:364
MasterSlaveConstraint & operator=(const MasterSlaveConstraint &rOther)
Assignment operator.
Definition: master_slave_constraint.h:141
virtual void EquationIdVector(EquationIdVectorType &rSlaveEquationIds, EquationIdVectorType &rMasterEquationIds, const ProcessInfo &rCurrentProcessInfo) const
This determines the master equation IDs connected to this constraint.
Definition: master_slave_constraint.h:320
DataValueContainer & Data()
This method returns the data container of the constraint.
Definition: master_slave_constraint.h:496
virtual void Initialize(const ProcessInfo &rCurrentProcessInfo)
It is called to initialize the constraint.
Definition: master_slave_constraint.h:239
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Get Data with GetValue and the Variable to get.
Definition: master_slave_constraint.h:548
virtual void PrintInfo(std::ostream &rOStream) const override
This method prints the current Constraint Id.
Definition: master_slave_constraint.h:483
virtual ~MasterSlaveConstraint() override
Destructor.
Definition: master_slave_constraint.h:128
KRATOS_CLASS_POINTER_DEFINITION(MasterSlaveConstraint)
Pointer definition of MasterSlaveConstraint.
IndexedObject BaseType
The definition of the base class.
Definition: master_slave_constraint.h:82
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Set Data with SetValue and the Variable to set.
Definition: master_slave_constraint.h:535
Dof< double > DofType
The DoF type definition.
Definition: master_slave_constraint.h:88
virtual void InitializeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo)
This is called for non-linear analysis at the beginning of the iteration process.
Definition: master_slave_constraint.h:265
virtual const DofPointerVectorType & GetMasterDofsVector() const
This method returns the slave dof vector.
Definition: master_slave_constraint.h:355
virtual void Clear()
Clears the maps contents.
Definition: master_slave_constraint.h:230
std::size_t IndexType
The index type definition.
Definition: master_slave_constraint.h:85
void SetData(DataValueContainer const &rThisData)
This method sets the data container of the constraint.
Definition: master_slave_constraint.h:514
std::vector< std::size_t > EquationIdVectorType
The equation Id vector type definition.
Definition: master_slave_constraint.h:97
virtual void FinalizeNonLinearIteration(const ProcessInfo &rCurrentProcessInfo)
This is called for non-linear analysis at the end of the iteration process.
Definition: master_slave_constraint.h:273
virtual void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo)
This is called in the beginning of each solution step.
Definition: master_slave_constraint.h:257
virtual void SetLocalSystem(const MatrixType &rRelationMatrix, const VectorType &rConstantVector, const ProcessInfo &rCurrentProcessInfo)
This method allows to set the Local System in case is not computed on running time (internal variable...
Definition: master_slave_constraint.h:393
virtual MasterSlaveConstraint::Pointer Create(IndexType Id, DofPointerVectorType &rMasterDofsVector, DofPointerVectorType &rSlaveDofsVector, const MatrixType &rRelationMatrix, const VectorType &rConstantVector) const
Creates a new constraint pointer.
Definition: master_slave_constraint.h:165
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_WARNING(label)
Definition: logger.h:265
#define KRATOS_API_EXTERN
Definition: kratos_export_api.h:57
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
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