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 | Typedefs | Functions
mapper_utilities.h File Reference
#include <array>
#include <vector>
#include "includes/model_part.h"
#include "utilities/parallel_utilities.h"
#include "utilities/math_utils.h"
#include "mapping_application_variables.h"
#include "mappers/mapper_flags.h"
#include "custom_utilities/mapper_local_system.h"
Include dependency graph for mapper_utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

 Kratos
 REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
 
 Kratos::MapperUtilities
 

Typedefs

typedef Node Kratos::MapperUtilities::NodeType
 
typedef Kratos::unique_ptr< MapperInterfaceInfo > Kratos::MapperUtilities::MapperInterfaceInfoUniquePointerType
 
typedef Kratos::shared_ptr< MapperInterfaceInfo > Kratos::MapperUtilities::MapperInterfaceInfoPointerType
 
typedef std::vector< std::vector< MapperInterfaceInfoPointerType > > Kratos::MapperUtilities::MapperInterfaceInfoPointerVectorType
 
typedef Kratos::unique_ptr< MapperLocalSystem > Kratos::MapperUtilities::MapperLocalSystemPointer
 
typedef std::vector< MapperLocalSystemPointer > Kratos::MapperUtilities::MapperLocalSystemPointerVector
 
typedef Kratos::shared_ptr< MapperLocalSystemPointerVector > Kratos::MapperUtilities::MapperLocalSystemPointerVectorPointer
 
using Kratos::MapperUtilities::BoundingBoxType = std::array< double, 6 >
 

Functions

static void Kratos::MapperUtilities::FillFunction (const NodeType &rNode, const Variable< double > &rVariable, double &rValue)
 
static void Kratos::MapperUtilities::FillFunctionNonHist (const NodeType &rNode, const Variable< double > &rVariable, double &rValue)
 
static std::function< void(const NodeType &, const Variable< double > &, double &)> Kratos::MapperUtilities::GetFillFunction (const Kratos::Flags &rMappingOptions)
 
static void Kratos::MapperUtilities::UpdateFunction (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void Kratos::MapperUtilities::UpdateFunctionWithAdd (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void Kratos::MapperUtilities::UpdateFunctionNonHist (NodeType &rNode, const Variable< double > &rVariable, const double Value, const double Factor)
 
static void Kratos::MapperUtilities::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)> Kratos::MapperUtilities::GetUpdateFunction (const Kratos::Flags &rMappingOptions)
 
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)
 
template<class TVectorType >
void Kratos::MapperUtilities::UpdateModelPartFromSystemVector (const TVectorType &rVector, ModelPart &rModelPart, const Variable< double > &rVariable, const Kratos::Flags &rMappingOptions, const bool InParallel=true)
 
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. More...
 
void Kratos::MapperUtilities::CreateMapperLocalSystemsFromNodes (const MapperLocalSystem &rMapperLocalSystemPrototype, const Communicator &rModelPartCommunicator, std::vector< Kratos::unique_ptr< MapperLocalSystem >> &rLocalSystems)
 
void Kratos::MapperUtilities::CreateMapperLocalSystemsFromGeometries (const MapperLocalSystem &rMapperLocalSystemPrototype, const Communicator &rModelPartCommunicator, std::vector< Kratos::unique_ptr< MapperLocalSystem >> &rLocalSystems)
 
template<class T1 , class T2 >
double Kratos::MapperUtilities::ComputeDistance (const T1 &rCoords1, const T2 &rCoords2)
 
template<class T1 , class T2 , class T3 >
bool Kratos::MapperUtilities::PointsAreCollinear (const T1 &rP1, const T2 &rP2, const T3 &rP3)
 
template<typename TContainer >
double Kratos::MapperUtilities::ComputeMaxEdgeLengthLocal (const TContainer &rEntityContainer)
 
double Kratos::MapperUtilities::ComputeSearchRadius (const ModelPart &rModelPart, const int EchoLevel)
 
double Kratos::MapperUtilities::ComputeSearchRadius (const ModelPart &rModelPart1, const ModelPart &rModelPart2, const int EchoLevel)
 
void Kratos::MapperUtilities::CheckInterfaceModelParts (const int CommRank)
 
BoundingBoxType Kratos::MapperUtilities::ComputeLocalBoundingBox (const ModelPart &rModelPart)
 
BoundingBoxType Kratos::MapperUtilities::ComputeGlobalBoundingBox (const ModelPart &rModelPart)
 
std::string Kratos::MapperUtilities::BoundingBoxStringStream (const BoundingBoxType &rBoundingBox)
 
void Kratos::MapperUtilities::SaveCurrentConfiguration (ModelPart &rModelPart)
 
void Kratos::MapperUtilities::RestoreCurrentConfiguration (ModelPart &rModelPart)
 
template<class TDataType >
void Kratos::MapperUtilities::EraseNodalVariable (ModelPart &rModelPart, const Variable< TDataType > &rVariable)
 
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)
 
void Kratos::MapperUtilities::CreateMapperInterfaceInfosFromBuffer (const std::vector< std::vector< double >> &rRecvBuffer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer)
 
void Kratos::MapperUtilities::FillBufferAfterLocalSearch (MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, std::vector< std::vector< char >> &rSendBuffer, std::vector< int > &rSendSizes)
 
void Kratos::MapperUtilities::AssignInterfaceInfosAfterRemoteSearch (const MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer, MapperLocalSystemPointerVectorPointer &rpMapperLocalSystems)
 
void Kratos::MapperUtilities::DeserializeMapperInterfaceInfosFromBuffer (const std::vector< std::vector< char >> &rRecvBuffer, const MapperInterfaceInfoUniquePointerType &rpRefInterfaceInfo, const int CommRank, MapperInterfaceInfoPointerVectorType &rMapperInterfaceInfosContainer)