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.
|
This defines a class to define periodic BC to a RVE. More...
#include <rve_periodicity_utility.h>
Public Member Functions | |
Life Cycle | |
RVEPeriodicityUtility (ModelPart &rDestinationModelPart, std::size_t EchoLevel=0) | |
Default constructor. More... | |
RVEPeriodicityUtility (RVEPeriodicityUtility const &rOther)=delete | |
Copy constructor. More... | |
virtual | ~RVEPeriodicityUtility ()=default |
Destructor. More... | |
Operators | |
RVEPeriodicityUtility & | operator= (RVEPeriodicityUtility const &rOther)=delete |
Assignment operator. More... | |
Operations | |
void | AssignPeriodicity (ModelPart &rMasterModelPart, ModelPart &rSlaveModelPart, const Matrix &rStrainTensor, const Vector &rDirection, const double SearchTolerance=1.0e-6) |
This function assign a pairing condition between two modelparts which contain two flat faces, parallel to each other and separated by a distance rDistance. More... | |
void | Finalize (const Variable< array_1d< double, 3 >> &rVariable) |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Protected Member Functions | |
Protected Operations | |
void | AppendIdsAndWeights (std::map< IndexType, DataTupletype > &rAux, const IndexType MasterId, const double MasterWeight, std::vector< IndexType > &rFinalMastersIds, std::vector< double > &rFinalMastersWeights, Vector &rFinalT) |
This method appends the weights and ids to construct the MPC. More... | |
Type Definitions | |
typedef std::size_t | IndexType |
Definition of the index type. More... | |
typedef std::tuple< std::vector< IndexType >, std::vector< double >, Vector > | DataTupletype |
Definition of the data tuple type. More... | |
typedef Dof< double > | DofType |
The DoF type definition. More... | |
typedef std::vector< DofType::Pointer > | DofPointerVectorType |
The DoF pointer vector type definition. More... | |
typedef Node | NodeType |
Definition of the node. More... | |
typedef Variable< double > | DoubleVariableType |
Definition of the component of variable type. More... | |
KRATOS_CLASS_POINTER_DEFINITION (RVEPeriodicityUtility) | |
Pointer definition of RVEPeriodicityUtility. More... | |
This defines a class to define periodic BC to a RVE.
It uses MPC in order to set the periodic BC
typedef std::tuple<std::vector<IndexType>, std::vector<double>, Vector> Kratos::RVEPeriodicityUtility::DataTupletype |
Definition of the data tuple type.
typedef std::vector< DofType::Pointer > Kratos::RVEPeriodicityUtility::DofPointerVectorType |
The DoF pointer vector type definition.
The DoF type definition.
Definition of the component of variable type.
typedef std::size_t Kratos::RVEPeriodicityUtility::IndexType |
Definition of the index type.
Definition of the node.
|
inline |
Default constructor.
|
delete |
Copy constructor.
|
virtualdefault |
Destructor.
|
protected |
This method appends the weights and ids to construct the MPC.
rAux | The auxiliar map containing the ids and tuples |
MasterId | The id of the master dof |
MasterWeight | The constribution of the master dof in the MPC |
rFinalMastersIds | The resulting vector of ids |
rFinalMastersWeights | The resulting vector of weights |
rFinalT | The resulting vector of constants (rigid displacements) |
void Kratos::RVEPeriodicityUtility::AssignPeriodicity | ( | ModelPart & | rMasterModelPart, |
ModelPart & | rSlaveModelPart, | ||
const Matrix & | rStrainTensor, | ||
const Vector & | rDirection, | ||
const double | SearchTolerance = 1.0e-6 |
||
) |
This function assign a pairing condition between two modelparts which contain two flat faces, parallel to each other and separated by a distance rDistance.
Note that this function should be called multiple times to pair the different faces in a box.
rMasterModelPart | master part to be paired |
rSlaveModelPart | slave in the pairing |
rStrainTensor | strain tensor which will be used in computing the pairing conditions the condition to be guaranteed will be that : uslave = umaster + rStrainTensor * rDirection |
rDirection | a node with coordinates Xs on the slave, will be paired to the corresponding point with coordinates Xm on the master Xm will be computed as Xm = Xs - rDirection |
this function finalizes the computation of the pairings. It can be called ONLY ONCE
rVariable | is the value to which the pairing condition will be applied (needs to be a Variable with components) |
|
inlinevirtual |
Turn back information as a string.
Kratos::RVEPeriodicityUtility::KRATOS_CLASS_POINTER_DEFINITION | ( | RVEPeriodicityUtility | ) |
Pointer definition of RVEPeriodicityUtility.
|
delete |
Assignment operator.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.