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.
List of all members
Kratos::RVEPeriodicityUtility Class Reference

This defines a class to define periodic BC to a RVE. More...

#include <rve_periodicity_utility.h>

Collaboration diagram for Kratos::RVEPeriodicityUtility:

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
RVEPeriodicityUtilityoperator= (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 >, VectorDataTupletype
 Definition of the data tuple type. More...
 
typedef Dof< doubleDofType
 The DoF type definition. More...
 
typedef std::vector< DofType::PointerDofPointerVectorType
 The DoF pointer vector type definition. More...
 
typedef Node NodeType
 Definition of the node. More...
 
typedef Variable< doubleDoubleVariableType
 Definition of the component of variable type. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (RVEPeriodicityUtility)
 Pointer definition of RVEPeriodicityUtility. More...
 

Detailed Description

This defines a class to define periodic BC to a RVE.

It uses MPC in order to set the periodic BC

Author
Riccardo Rossi

Member Typedef Documentation

◆ DataTupletype

typedef std::tuple<std::vector<IndexType>, std::vector<double>, Vector> Kratos::RVEPeriodicityUtility::DataTupletype

Definition of the data tuple type.

◆ DofPointerVectorType

The DoF pointer vector type definition.

◆ DofType

The DoF type definition.

◆ DoubleVariableType

Definition of the component of variable type.

◆ IndexType

Definition of the index type.

◆ NodeType

Definition of the node.

Constructor & Destructor Documentation

◆ RVEPeriodicityUtility() [1/2]

Kratos::RVEPeriodicityUtility::RVEPeriodicityUtility ( ModelPart rDestinationModelPart,
std::size_t  EchoLevel = 0 
)
inline

Default constructor.

◆ RVEPeriodicityUtility() [2/2]

Kratos::RVEPeriodicityUtility::RVEPeriodicityUtility ( RVEPeriodicityUtility const &  rOther)
delete

Copy constructor.

◆ ~RVEPeriodicityUtility()

virtual Kratos::RVEPeriodicityUtility::~RVEPeriodicityUtility ( )
virtualdefault

Destructor.

Member Function Documentation

◆ AppendIdsAndWeights()

void Kratos::RVEPeriodicityUtility::AppendIdsAndWeights ( std::map< IndexType, DataTupletype > &  rAux,
const IndexType  MasterId,
const double  MasterWeight,
std::vector< IndexType > &  rFinalMastersIds,
std::vector< double > &  rFinalMastersWeights,
Vector rFinalT 
)
protected

This method appends the weights and ids to construct the MPC.

Parameters
rAuxThe auxiliar map containing the ids and tuples
MasterIdThe id of the master dof
MasterWeightThe constribution of the master dof in the MPC
rFinalMastersIdsThe resulting vector of ids
rFinalMastersWeightsThe resulting vector of weights
rFinalTThe resulting vector of constants (rigid displacements)

◆ AssignPeriodicity()

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.

Parameters
rMasterModelPartmaster part to be paired
rSlaveModelPartslave in the pairing
rStrainTensorstrain tensor which will be used in computing the pairing conditions the condition to be guaranteed will be that : uslave = umaster + rStrainTensor * rDirection
rDirectiona 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

◆ Finalize()

void Kratos::RVEPeriodicityUtility::Finalize ( const Variable< array_1d< double, 3 >> &  rVariable)

this function finalizes the computation of the pairings. It can be called ONLY ONCE

Parameters
rVariableis the value to which the pairing condition will be applied (needs to be a Variable with components)

◆ Info()

virtual std::string Kratos::RVEPeriodicityUtility::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::RVEPeriodicityUtility::KRATOS_CLASS_POINTER_DEFINITION ( RVEPeriodicityUtility  )

Pointer definition of RVEPeriodicityUtility.

◆ operator=()

RVEPeriodicityUtility& Kratos::RVEPeriodicityUtility::operator= ( RVEPeriodicityUtility const &  rOther)
delete

Assignment operator.

◆ PrintData()

virtual void Kratos::RVEPeriodicityUtility::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

virtual void Kratos::RVEPeriodicityUtility::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.


The documentation for this class was generated from the following files: