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::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType > Class Template Reference

A utility to rotate the local contributions of certain nodes to the system matrix, which is required to apply slip conditions in arbitrary directions. More...

#include <compressible_element_rotation_utility.h>

Inheritance diagram for Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >:
Collaboration diagram for Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >:

Public Member Functions

Life Cycle
 CompressibleElementRotationUtility (const unsigned int DomainSize, const Kratos::Flags &rFlag=SLIP)
 Constructor. More...
 
 ~CompressibleElementRotationUtility () override
 Destructor. More...
 
Operations
void Rotate (TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const override
 Rotate the local system contributions so that they are oriented with each node's normal. More...
 
void Rotate (TLocalVectorType &rLocalVector, GeometryType &rGeometry) const override
 RHS only version of Rotate. More...
 
void ApplySlipCondition (TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const override
 Apply slip boundary conditions to the rotated local contributions. More...
 
void ApplySlipCondition (TLocalVectorType &rLocalVector, GeometryType &rGeometry) const override
 RHS only version of ApplySlipCondition. More...
 
void RotateVelocities (ModelPart &rModelPart) const override
 Transform nodal velocities to the rotated coordinates (aligned with each node's normal) More...
 
void RecoverVelocities (ModelPart &rModelPart) const override
 Transform nodal velocities from the rotated system to the original one. More...
 
Input and output
std::string Info () const override
 Turn back information as a string. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print information about this object. More...
 
void PrintData (std::ostream &rOStream) const override
 Print object's data. More...
 
- Public Member Functions inherited from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >
 CoordinateTransformationUtils (const unsigned int DomainSize, const unsigned int NumRowsPerNode, const Kratos::Flags &rSelectionFlag=SLIP)
 Constructor. More...
 
virtual ~CoordinateTransformationUtils ()
 Destructor. More...
 
virtual void CalculateRotationOperatorPure (TLocalMatrixType &rRotationMatrix, const GeometryType::PointType &rThisPoint) const
 Calculates rotation operator for given point. More...
 
void LocalRotationOperatorPure (BoundedMatrix< double, 3, 3 > &rRot, const GeometryType::PointType &rThisPoint) const
 
void LocalRotationOperatorPure (BoundedMatrix< double, 2, 2 > &rRot, const GeometryType::PointType &rThisPoint) const
 
virtual void CalculateRotationOperatorPureShapeSensitivities (TLocalMatrixType &rRotationMatrixShapeDerivative, const std::size_t DerivativeNodeIndex, const std::size_t DerivativeDirectionIndex, const GeometryType::PointType &rThisPoint) const
 Calculates rotation nodal matrix shape sensitivities. More...
 
virtual void CalculateRotationOperatorPureShapeSensitivities (BoundedMatrix< double, 2, 2 > &rOutput, const std::size_t DerivativeNodeIndex, const std::size_t DerivativeDirectionIndex, const GeometryType::PointType &rThisPoint) const
 Calculate 2d rotation nodal matrix shape sensitivities. More...
 
virtual void CalculateRotationOperatorPureShapeSensitivities (BoundedMatrix< double, 3, 3 > &rOutput, const std::size_t DerivativeNodeIndex, const std::size_t DerivativeDirectionIndex, const GeometryType::PointType &rThisPoint) const
 Calculate 3d rotation nodal matrix shape sensitivities. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (CoordinateTransformationUtils)
 Pointer definition of CoordinateTransformationUtils. More...
 

Type Definitions

typedef Node NodeType
 
typedef Geometry< NodeGeometryType
 
 KRATOS_CLASS_POINTER_DEFINITION (CompressibleElementRotationUtility)
 Pointer definition of CompressibleElementRotationUtility. More...
 

Additional Inherited Members

- Public Types inherited from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >
typedef Node NodeType
 
typedef Geometry< NodeGeometryType
 
- Protected Member Functions inherited from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >
void RotateAux (TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const
 
void RotateAuxPure (TLocalMatrixType &rLocalMatrix, TLocalVectorType &rLocalVector, GeometryType &rGeometry) const
 
void LocalRotationOperator2D (BoundedMatrix< double, TBlockSize, TBlockSize > &rRot, GeometryType::PointType &rThisPoint) const
 
void LocalRotationOperator3D (BoundedMatrix< double, TBlockSize, TBlockSize > &rRot, GeometryType::PointType &rThisPoint) const
 
bool IsSlip (const Node &rNode) const
 
double Normalize (TVectorType &rThis) const
 Normalize a vector. More...
 
unsigned int GetDomainSize () const
 
unsigned int GetBlockSize () const
 

Detailed Description

template<class TLocalMatrixType, class TLocalVectorType>
class Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >

A utility to rotate the local contributions of certain nodes to the system matrix, which is required to apply slip conditions in arbitrary directions.

Member Typedef Documentation

◆ GeometryType

template<class TLocalMatrixType , class TLocalVectorType >
typedef Geometry< Node > Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::GeometryType

◆ NodeType

template<class TLocalMatrixType , class TLocalVectorType >
typedef Node Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::NodeType

Constructor & Destructor Documentation

◆ CompressibleElementRotationUtility()

template<class TLocalMatrixType , class TLocalVectorType >
Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::CompressibleElementRotationUtility ( const unsigned int  DomainSize,
const Kratos::Flags rFlag = SLIP 
)
inline

Constructor.

Parameters
DomainSizeNumber of space dimensions (2 or 3)
NumRowsPerNodeNumber of matrix or vector rows associated to each node. Velocity DOFs are assumed to be the first mDomainSize rows in each block of rows.
rFlagFlag used to mark nodes nodes where local system contributions will be rotated. All nodes with rFlag == true will be rotated.
ZeroThe zero value for the variable.

◆ ~CompressibleElementRotationUtility()

template<class TLocalMatrixType , class TLocalVectorType >
Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::~CompressibleElementRotationUtility ( )
inlineoverride

Destructor.

Member Function Documentation

◆ ApplySlipCondition() [1/2]

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::ApplySlipCondition ( TLocalMatrixType &  rLocalMatrix,
TLocalVectorType &  rLocalVector,
GeometryType rGeometry 
) const
inlineoverridevirtual

Apply slip boundary conditions to the rotated local contributions.

This function takes the local system contributions rotated so each node's velocities are expressed using a base oriented with its normal and imposes that the normal velocity is equal to the mesh velocity in the normal direction.

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ ApplySlipCondition() [2/2]

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::ApplySlipCondition ( TLocalVectorType &  rLocalVector,
GeometryType rGeometry 
) const
inlineoverridevirtual

RHS only version of ApplySlipCondition.

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ Info()

template<class TLocalMatrixType , class TLocalVectorType >
std::string Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TLocalMatrixType , class TLocalVectorType >
Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::KRATOS_CLASS_POINTER_DEFINITION ( CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >  )

Pointer definition of CompressibleElementRotationUtility.

◆ PrintData()

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::PrintData ( std::ostream &  rOStream) const
inlineoverridevirtual

◆ PrintInfo()

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::PrintInfo ( std::ostream &  rOStream) const
inlineoverridevirtual

Print information about this object.

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ RecoverVelocities()

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::RecoverVelocities ( ModelPart rModelPart) const
inlineoverridevirtual

Transform nodal velocities from the rotated system to the original one.

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ Rotate() [1/2]

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::Rotate ( TLocalMatrixType &  rLocalMatrix,
TLocalVectorType &  rLocalVector,
GeometryType rGeometry 
) const
inlineoverridevirtual

Rotate the local system contributions so that they are oriented with each node's normal.

Parameters
rLocalMatrixLocal system matrix
rLocalVectorLocal RHS vector
rGeometryA reference to the element's (or condition's) geometry

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.

◆ Rotate() [2/2]

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::Rotate ( TLocalVectorType &  rLocalVector,
GeometryType rGeometry 
) const
inlineoverridevirtual

◆ RotateVelocities()

template<class TLocalMatrixType , class TLocalVectorType >
void Kratos::CompressibleElementRotationUtility< TLocalMatrixType, TLocalVectorType >::RotateVelocities ( ModelPart rModelPart) const
inlineoverridevirtual

Transform nodal velocities to the rotated coordinates (aligned with each node's normal)

Reimplemented from Kratos::CoordinateTransformationUtils< TLocalMatrixType, TLocalVectorType, double >.


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