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.
Classes | Namespaces | Functions
mortar_utilities.h File Reference
#include <numeric>
#include <unordered_map>
#include "includes/variables.h"
#include "includes/node.h"
#include "geometries/geometry.h"
Include dependency graph for mortar_utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Kratos::MortarUtilitiesSettings
 This struct is used in order to identify when using the historical and non historical variables. More...
 

Namespaces

 Kratos
 REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
 
 MortarUtilities
 This is a class that provides auxiliar utilities for the mortar integration.
 
 Kratos::MortarUtilities
 

Typedefs

Type Definitions
typedef Node Kratos::MortarUtilities::NodeType
 
typedef Point Kratos::MortarUtilities::PointType
 
typedef PointType::CoordinatesArrayType Kratos::MortarUtilities::CoordinatesArrayType
 
typedef Geometry< NodeTypeKratos::MortarUtilities::GeometryType
 Definition of geometries. More...
 
typedef Geometry< PointTypeKratos::MortarUtilities::GeometryPointType
 
typedef std::size_t Kratos::MortarUtilities::IndexType
 Index type definition. More...
 
typedef std::size_t Kratos::MortarUtilities::SizeType
 Size type definition. More...
 
typedef std::unordered_map< IndexType, IndexType > Kratos::MortarUtilities::IntMap
 A map for integers. More...
 

Functions

array_1d< double, 3 > Kratos::MortarUtilities::GaussPointUnitNormal (const Vector &rN, const GeometryType &rGeometry)
 This function calculates the r_normal in a specific GP with a given shape function. More...
 
Functions
bool Kratos::MortarUtilities::LengthCheck (const GeometryPointType &rGeometryLine, const double Tolerance=1.0e-6)
 This functions checks if the length of the line is to short, with the potential of provoque ill condition in the dual LM formulation. More...
 
bool Kratos::MortarUtilities::HeronCheck (const GeometryPointType &rGeometryTriangle)
 This functions checks if the semiperimeter is smaller than any of the sides of the triangle. More...
 
bool Kratos::MortarUtilities::HeronCheck (const PointType &rPointOrig1, const PointType &rPointOrig2, const PointType &rPointOrig3)
 This functions checks if the semiperimeter is smaller than any of the sides of the triangle. More...
 
void Kratos::MortarUtilities::RotatePoint (PointType &rPointToRotate, const PointType &rPointReferenceRotation, const array_1d< double, 3 > &rSlaveTangentXi, const array_1d< double, 3 > &rSlaveTangentEta, const bool Inversed)
 This function rotates to align the projected points to a parallel plane to XY. More...
 
template<typename TType >
std::vector< std::size_t > Kratos::MortarUtilities::SortIndexes (const std::vector< TType > &rThisVector)
 This function gives you the indexes needed to order a vector. More...
 
void Kratos::MortarUtilities::ComputeNodesMeanNormalModelPart (ModelPart &rModelPart, const bool ComputeConditions=true)
 It computes the mean of the normal in the condition in all the nodes. More...
 
void Kratos::MortarUtilities::ComputeNodesTangentModelPart (ModelPart &rModelPart, const Variable< array_1d< double, 3 >> *pSlipVariable=NULL, const double SlipCoefficient=1.0, const bool SlipAlways=false)
 It computes the tangent in all the nodes of the model part. More...
 
void Kratos::MortarUtilities::ComputeNodesTangentFromNormalModelPart (ModelPart &rModelPart)
 It computes the tangent in all the nodes of the model part from its normal. More...
 
void Kratos::MortarUtilities::ComputeTangentsFromNormal (NodeType &rNode, const array_1d< double, 3 > &rNormal, const std::size_t Dimension=3)
 It computes the tangent on the given node using the normal provided. More...
 
void Kratos::MortarUtilities::ComputeTangentNodeWithLMAndSlip (NodeType &rNode, const std::size_t StepLM=0, const Variable< array_1d< double, 3 >> *pSlipVariable=NULL, const double SlipCoefficient=1.0, const std::size_t Dimension=3)
 It computes the tangent on the given node using the LM direction and Slip direction. More...
 
void Kratos::MortarUtilities::ComputeTangentNodeWithSlip (NodeType &rNode, const std::size_t StepLM=0, const Variable< array_1d< double, 3 >> *pSlipVariable=NULL, const double SlipCoefficient=1.0, const std::size_t Dimension=3)
 It computes the tangent on the given node using the Slip direction. More...
 
template<class TContainerType >
void Kratos::MortarUtilities::InvertNormalForFlag (TContainerType &rContainer, const Flags Flag)
 It inverts the order of the nodes in the conditions of a model part in order to invert the normal when certain flag is active. More...
 
template<class TContainerType >
void Kratos::MortarUtilities::InvertNormal (TContainerType &rContainer)
 It inverts the order of the nodes in the conditions of a model part in order to invert the normal. More...
 
template<SizeType TDim, SizeType TNumNodes>
BoundedMatrix< double, TNumNodes, TDim > Kratos::MortarUtilities::GetCoordinates (const GeometryType &rGeometry, const bool Current=true, const IndexType Step=0)
 It calculates the matrix of coordinates of a geometry. More...
 
template<SizeType TNumNodes, SizeType TDim>
BoundedMatrix< double, TNumNodes, TDim > Kratos::MortarUtilities::ComputeTangentMatrix (const GeometryType &rGeometry)
 It calculates the matrix containing the tangent vector TANGENT_XI. More...
 
template<SizeType TNumNodes, class TVarType = Variable<double>>
array_1d< double, TNumNodes > Kratos::MortarUtilities::GetVariableVector (const GeometryType &rGeometry, const TVarType &rVariable, const IndexType Step)
 It calculates the vector of an historical variable of a geometry. More...
 
template<SizeType TNumNodes, class TVarType = Variable<double>>
BoundedMatrix< double, TNumNodes, 1 > Kratos::MortarUtilities::GetVariableVectorMatrix (const GeometryType &rGeometry, const TVarType &rVariable, const unsigned int Step)
 It calculates the vector of an historical variable of a geometry. More...
 
template<SizeType TNumNodes, class TVarType = Variable<double>>
array_1d< double, TNumNodes > Kratos::MortarUtilities::GetVariableVector (const GeometryType &rGeometry, const TVarType &rVariable)
 It calculates the vector of a non-historical variable of a geometry. More...
 
template<SizeType TNumNodes, class TVarType = Variable<double>>
BoundedMatrix< double, TNumNodes, 1 > Kratos::MortarUtilities::GetVariableVectorMatrix (const GeometryType &rGeometry, const TVarType &rVariable)
 It calculates the vector of a non-historical variable of a geometry. More...
 
template<SizeType TDim, SizeType TNumNodes>
BoundedMatrix< double, TNumNodes, TDim > Kratos::MortarUtilities::GetVariableMatrix (const GeometryType &rGeometry, const Variable< array_1d< double, 3 > > &rVariable, const unsigned int Step)
 It calculates the matrix of a variable of a geometry. More...
 
template<SizeType TDim, SizeType TNumNodes>
BoundedMatrix< double, TNumNodes, TDim > Kratos::MortarUtilities::GetVariableMatrix (const GeometryType &rGeometry, const Variable< array_1d< double, 3 > > &rVariable)
 It calculates the matrix of a non-historical variable of a geometry. More...
 
template<SizeType TDim, SizeType TNumNodes>
BoundedMatrix< double, TNumNodes, TDim > Kratos::MortarUtilities::GetAbsMatrix (const BoundedMatrix< double, TNumNodes, TDim > &rInputMatrix)
 It calculates the matrix containing the absolute value of another matrix. More...
 
template<SizeType TDim, class TVarType >
unsigned int Kratos::MortarUtilities::SizeToCompute ()
 This method gives the size to be computed. More...
 
template<class TVarType , bool THistorical>
void Kratos::MortarUtilities::ResetValue (ModelPart &rThisModelPart, const TVarType &rThisVariable)
 This method resets the value. More...
 
template<class TVarType >
void Kratos::MortarUtilities::ResetAuxiliarValue (ModelPart &rThisModelPart)
 This method resets the auxiliar value. More...
 
template<class TVarType >
const std::string Kratos::MortarUtilities::GetAuxiliarVariable ()
 This method returns the auxiliar variable. More...
 
template<class TVarType >
double Kratos::MortarUtilities::GetAuxiliarValue (NodeType &rThisNode, const std::size_t iSize)
 This method returns the auxiliar variable. More...
 
template<class TVarType , bool THistorical>
void Kratos::MortarUtilities::MatrixValue (const GeometryType &rThisGeometry, const TVarType &rThisVariable, Matrix &rThisValue)
 This method adds the value. More...
 
template<class TVarType , bool THistorical>
void Kratos::MortarUtilities::AddValue (GeometryType &rThisGeometry, const TVarType &rThisVariable, const Matrix &rThisValue)
 This method adds the value. More...
 
template<class TVarType , bool THistorical>
void Kratos::MortarUtilities::AddAreaWeightedNodalValue (NodeType &rThisNode, const TVarType &rThisVariable, const double RefArea=1.0, const double Tolerance=1.0e-4)
 This method adds the value. More...
 
template<class TVarType , bool THistorical>
void Kratos::MortarUtilities::UpdateDatabase (ModelPart &rThisModelPart, const TVarType &rThisVariable, Vector &rDx, const std::size_t Index, IntMap &rConectivityDatabase)
 This method updates the database in the amster side. More...