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 | Typedefs | Functions
Kratos::MapperUtilities Namespace Reference

Classes

class  MapperInterfaceInfoSerializer
 Helper class to serialize/deserialize a vector containing MapperInterfaceInfos. More...
 

Typedefs

typedef std::size_t SizeType
 
typedef std::size_t IndexType
 
typedef Node NodeType
 
typedef Kratos::unique_ptr< MapperInterfaceInfoMapperInterfaceInfoUniquePointerType
 
typedef Kratos::shared_ptr< MapperInterfaceInfoMapperInterfaceInfoPointerType
 
typedef std::vector< std::vector< MapperInterfaceInfoPointerType > > MapperInterfaceInfoPointerVectorType
 
typedef Kratos::unique_ptr< MapperLocalSystemMapperLocalSystemPointer
 
typedef std::vector< MapperLocalSystemPointerMapperLocalSystemPointerVector
 
typedef Kratos::shared_ptr< MapperLocalSystemPointerVectorMapperLocalSystemPointerVectorPointer
 
using BoundingBoxType = std::array< double, 6 >
 

Functions

void AssignInterfaceEquationIds (Communicator &rModelPartCommunicator)
 Assigning INTERFACE_EQUATION_IDs to the nodes, with and without MPI This function assigns the INTERFACE_EQUATION_IDs to the nodes, which act as EquationIds for the MappingMatrix. This work with and without MPI, in MPI a ScanSum is performed with the local number of nodes. More...
 
template<typename TContainer >
double ComputeMaxEdgeLengthLocal (const TContainer &rEntityContainer)
 
double ComputeSearchRadius (const ModelPart &rModelPart, const int EchoLevel)
 
double ComputeSearchRadius (const ModelPart &rModelPart1, const ModelPart &rModelPart2, const int EchoLevel)
 
void CheckInterfaceModelParts (const int CommRank)
 
BoundingBoxType ComputeLocalBoundingBox (const ModelPart &rModelPart)
 
BoundingBoxType ComputeGlobalBoundingBox (const ModelPart &rModelPart)
 
std::string BoundingBoxStringStream (const BoundingBoxType &rBoundingBox)
 
void CreateMapperLocalSystemsFromNodes (const MapperLocalSystem &rMapperLocalSystemPrototype, const Communicator &rModelPartCommunicator, std::vector< Kratos::unique_ptr< MapperLocalSystem >> &rLocalSystems)
 
void CreateMapperLocalSystemsFromGeometries (const MapperLocalSystem &rMapperLocalSystemPrototype, const Communicator &rModelPartCommunicator, std::vector< Kratos::unique_ptr< MapperLocalSystem >> &rLocalSystems)
 
void SaveCurrentConfiguration (ModelPart &rModelPart)
 
void RestoreCurrentConfiguration (ModelPart &rModelPart)
 
void FillBufferBeforeLocalSearch (const MapperLocalSystemPointerVector &rMapperLocalSystems, const std::vector< double > &rBoundingBoxes, const SizeType BufferSizeEstimate, std::vector< std::vector< double >> &rSendBuffer, std::vector< int > &rSendSizes)
 
void CreateMapperInterfaceInfosFromBuffer (const std::vector< std::vector< double >> &rRecvBuffer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer)
 
void FillBufferAfterLocalSearch (MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, std::vector< std::vector< char >> &rSendBuffer, std::vector< int > &rSendSizes)
 
void DeserializeMapperInterfaceInfosFromBuffer (const std::vector< std::vector< char >> &rRecvBuffer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer)
 
static void FillFunction (const NodeType &rNode, const Variable< double > &rVariable, double &rValue)
 
static void FillFunctionNonHist (const NodeType &rNode, const Variable< double > &rVariable, double &rValue)
 
static std::function< void(const NodeType &, const Variable< double > &, double &)> GetFillFunction (const Kratos::Flags &rMappingOptions)
 
static void UpdateFunction (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void UpdateFunctionWithAdd (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void UpdateFunctionNonHist (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void UpdateFunctionNonHistWithAdd (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static std::function< void(NodeType &, const Variable< double > &, const double, const double)> GetUpdateFunction (const Kratos::Flags &rMappingOptions)
 
template<class TVectorType , bool TParallel = true>
void UpdateSystemVectorFromModelPart (TVectorType &rVector, const ModelPart &rModelPart, const Variable< double > &rVariable, const Kratos::Flags &rMappingOptions, const bool InParallel=true)
 
template<class TVectorType >
void UpdateModelPartFromSystemVector (const TVectorType &rVector, ModelPart &rModelPart, const Variable< double > &rVariable, const Kratos::Flags &rMappingOptions, const bool InParallel=true)
 
template<class T1 , class T2 >
double ComputeDistance (const T1 &rCoords1, const T2 &rCoords2)
 
template<class T1 , class T2 , class T3 >
bool PointsAreCollinear (const T1 &rP1, const T2 &rP2, const T3 &rP3)
 
template<class TDataType >
void EraseNodalVariable (ModelPart &rModelPart, const Variable< TDataType > &rVariable)
 
void AssignInterfaceInfosAfterRemoteSearch (const MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer, MapperLocalSystemPointerVectorPointer &rpMapperLocalSystems)
 

Typedef Documentation

◆ BoundingBoxType

using Kratos::MapperUtilities::BoundingBoxType = typedef std::array<double, 6>

◆ IndexType

◆ MapperInterfaceInfoPointerType

◆ MapperInterfaceInfoPointerVectorType

◆ MapperInterfaceInfoUniquePointerType

◆ MapperLocalSystemPointer

◆ MapperLocalSystemPointerVector

◆ MapperLocalSystemPointerVectorPointer

◆ NodeType

◆ SizeType

typedef std::size_t Kratos::MapperUtilities::SizeType

Function Documentation

◆ AssignInterfaceEquationIds()

void Kratos::MapperUtilities::AssignInterfaceEquationIds ( Communicator rModelPartCommunicator)

Assigning INTERFACE_EQUATION_IDs to the nodes, with and without MPI This function assigns the INTERFACE_EQUATION_IDs to the nodes, which act as EquationIds for the MappingMatrix. This work with and without MPI, in MPI a ScanSum is performed with the local number of nodes.

Parameters
rModelPartCommunicatorThe Modelpart-Communicator to be used
Author
Philipp Bucher

◆ AssignInterfaceInfosAfterRemoteSearch()

void Kratos::MapperUtilities::AssignInterfaceInfosAfterRemoteSearch ( const MapperInterfaceInfoPointerVectorType rMapperInterfaceInfosContainer,
MapperLocalSystemPointerVectorPointer rpMapperLocalSystems 
)

◆ BoundingBoxStringStream()

std::string Kratos::MapperUtilities::BoundingBoxStringStream ( const BoundingBoxType rBoundingBox)

◆ CheckInterfaceModelParts()

void Kratos::MapperUtilities::CheckInterfaceModelParts ( const int  CommRank)

◆ ComputeDistance()

template<class T1 , class T2 >
double Kratos::MapperUtilities::ComputeDistance ( const T1 &  rCoords1,
const T2 &  rCoords2 
)
inline

◆ ComputeGlobalBoundingBox()

BoundingBoxType Kratos::MapperUtilities::ComputeGlobalBoundingBox ( const ModelPart rModelPart)

◆ ComputeLocalBoundingBox()

BoundingBoxType Kratos::MapperUtilities::ComputeLocalBoundingBox ( const ModelPart rModelPart)

◆ ComputeMaxEdgeLengthLocal()

template<typename TContainer >
double Kratos::MapperUtilities::ComputeMaxEdgeLengthLocal ( const TContainer &  rEntityContainer)

◆ ComputeSearchRadius() [1/2]

double Kratos::MapperUtilities::ComputeSearchRadius ( const ModelPart rModelPart,
const int  EchoLevel 
)

◆ ComputeSearchRadius() [2/2]

double Kratos::MapperUtilities::ComputeSearchRadius ( const ModelPart rModelPart1,
const ModelPart rModelPart2,
const int  EchoLevel 
)

◆ CreateMapperInterfaceInfosFromBuffer()

void Kratos::MapperUtilities::CreateMapperInterfaceInfosFromBuffer ( const std::vector< std::vector< double >> &  rRecvBuffer,
const MapperInterfaceInfoUniquePointerType rpRefInterfaceInfo,
const int  CommRank,
MapperInterfaceInfoPointerVectorType rMapperInterfaceInfosContainer 
)

◆ CreateMapperLocalSystemsFromGeometries()

void Kratos::MapperUtilities::CreateMapperLocalSystemsFromGeometries ( const MapperLocalSystem rMapperLocalSystemPrototype,
const Communicator rModelPartCommunicator,
std::vector< Kratos::unique_ptr< MapperLocalSystem >> &  rLocalSystems 
)

◆ CreateMapperLocalSystemsFromNodes()

void Kratos::MapperUtilities::CreateMapperLocalSystemsFromNodes ( const MapperLocalSystem rMapperLocalSystemPrototype,
const Communicator rModelPartCommunicator,
std::vector< Kratos::unique_ptr< MapperLocalSystem >> &  rLocalSystems 
)

◆ DeserializeMapperInterfaceInfosFromBuffer()

void Kratos::MapperUtilities::DeserializeMapperInterfaceInfosFromBuffer ( const std::vector< std::vector< char >> &  rRecvBuffer,
const MapperInterfaceInfoUniquePointerType rpRefInterfaceInfo,
const int  CommRank,
MapperInterfaceInfoPointerVectorType rMapperInterfaceInfosContainer 
)

◆ EraseNodalVariable()

template<class TDataType >
void Kratos::MapperUtilities::EraseNodalVariable ( ModelPart rModelPart,
const Variable< TDataType > &  rVariable 
)

◆ FillBufferAfterLocalSearch()

void Kratos::MapperUtilities::FillBufferAfterLocalSearch ( MapperInterfaceInfoPointerVectorType rMapperInterfaceInfosContainer,
const MapperInterfaceInfoUniquePointerType rpRefInterfaceInfo,
const int  CommRank,
std::vector< std::vector< char >> &  rSendBuffer,
std::vector< int > &  rSendSizes 
)

◆ FillBufferBeforeLocalSearch()

void Kratos::MapperUtilities::FillBufferBeforeLocalSearch ( const MapperLocalSystemPointerVector rMapperLocalSystems,
const std::vector< double > &  rBoundingBoxes,
const SizeType  BufferSizeEstimate,
std::vector< std::vector< double >> &  rSendBuffer,
std::vector< int > &  rSendSizes 
)

◆ FillFunction()

static void Kratos::MapperUtilities::FillFunction ( const NodeType rNode,
const Variable< double > &  rVariable,
double rValue 
)
static

◆ FillFunctionNonHist()

static void Kratos::MapperUtilities::FillFunctionNonHist ( const NodeType rNode,
const Variable< double > &  rVariable,
double rValue 
)
static

◆ GetFillFunction()

static std::function<void(const NodeType&, const Variable<double>&, double&)> Kratos::MapperUtilities::GetFillFunction ( const Kratos::Flags rMappingOptions)
inlinestatic

◆ GetUpdateFunction()

static std::function<void(NodeType&, const Variable<double>&, const double, const double)> Kratos::MapperUtilities::GetUpdateFunction ( const Kratos::Flags rMappingOptions)
inlinestatic

◆ PointsAreCollinear()

template<class T1 , class T2 , class T3 >
bool Kratos::MapperUtilities::PointsAreCollinear ( const T1 &  rP1,
const T2 &  rP2,
const T3 &  rP3 
)

◆ RestoreCurrentConfiguration()

void Kratos::MapperUtilities::RestoreCurrentConfiguration ( ModelPart rModelPart)

◆ SaveCurrentConfiguration()

void Kratos::MapperUtilities::SaveCurrentConfiguration ( ModelPart rModelPart)

◆ UpdateFunction()

static void Kratos::MapperUtilities::UpdateFunction ( NodeType rNode,
const Variable< double > &  rVariable,
const double  Value,
const double  Factor 
)
static

◆ UpdateFunctionNonHist()

static void Kratos::MapperUtilities::UpdateFunctionNonHist ( NodeType rNode,
const Variable< double > &  rVariable,
const double  Value,
const double  Factor 
)
static

◆ UpdateFunctionNonHistWithAdd()

static void Kratos::MapperUtilities::UpdateFunctionNonHistWithAdd ( NodeType rNode,
const Variable< double > &  rVariable,
const double  Value,
const double  Factor 
)
static

◆ UpdateFunctionWithAdd()

static void Kratos::MapperUtilities::UpdateFunctionWithAdd ( NodeType rNode,
const Variable< double > &  rVariable,
const double  Value,
const double  Factor 
)
static

◆ UpdateModelPartFromSystemVector()

template<class TVectorType >
void Kratos::MapperUtilities::UpdateModelPartFromSystemVector ( const TVectorType &  rVector,
ModelPart rModelPart,
const Variable< double > &  rVariable,
const Kratos::Flags rMappingOptions,
const bool  InParallel = true 
)

◆ UpdateSystemVectorFromModelPart()

template<class TVectorType , bool TParallel = true>
void Kratos::MapperUtilities::UpdateSystemVectorFromModelPart ( TVectorType &  rVector,
const ModelPart rModelPart,
const Variable< double > &  rVariable,
const Kratos::Flags rMappingOptions,
const bool  InParallel = true 
)