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::Mapper< TSparseSpace, TDenseSpace > Class Template Referenceabstract

Base Class for all Mappers. More...

#include <mapper.h>

Inheritance diagram for Kratos::Mapper< TSparseSpace, TDenseSpace >:
Collaboration diagram for Kratos::Mapper< TSparseSpace, TDenseSpace >:

Public Member Functions

Life Cycle
 Mapper ()=default
 Constructor. More...
 
virtual ~Mapper ()=default
 Destructor. More...
 
 Mapper ()
 Default constructor. More...
 
virtual ~Mapper ()
 Destructor. More...
 
Operations
virtual void UpdateInterface (Kratos::Flags MappingOptions, double SearchRadius)=0
 Updates the mapping-system after the geometry/mesh has changed After changes in the topology (e.g. remeshing or sliding interfaces) the relations for the mapping have to be recomputed. This means that the search has to be conducted again and the mapping-system has to be rebuilt, hence this is expensive. More...
 
virtual void Map (const Variable< double > &rOriginVariable, const Variable< double > &rDestinationVariable, Kratos::Flags MappingOptions)=0
 Mapping from Origin to Destination, Scalar Variable Data is exchanged on the Interface, from the Origin-Modelpart to the Destination-ModelPart (the modelparts were specified in the construction Phase of the Mapper) More...
 
virtual void Map (const Variable< array_1d< double, 3 > > &rOriginVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable, Kratos::Flags MappingOptions)=0
 Mapping from Origin to Destination, Vector Variable Same as Map, but maps an array3-variable. More...
 
virtual void InverseMap (const Variable< double > &rOriginVariable, const Variable< double > &rDestinationVariable, Kratos::Flags MappingOptions)=0
 Mapping from Destination to Origin, Scalar Variable Data is exchanged on the Interface, from the Destination-Modelpart to the Origin-ModelPart (the modelparts were specified in the construction Phase of the Mapper) It does the opposite of Map. More...
 
virtual void InverseMap (const Variable< array_1d< double, 3 > > &rOriginVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable, Kratos::Flags MappingOptions)=0
 Mapping from Destination to Origin, Vector Variable Same as InveseMap, but maps an array3-variable. More...
 
virtual MapperUniquePointerType Clone (ModelPart &rModelPartOrigin, ModelPart &rModelPartDestination, Parameters JsonParameters) const =0
 Cloning the Mapper returns a clone of the current Mapper pure virtual, has to be implemented in every derived mapper, used in the creation of the Mappers. More...
 
virtual void Initialize ()
 
virtual void Update ()
 
virtual void Map (const Variable< array_3d > &rOriginVariable, const Variable< array_3d > &rDestinationVariable)=0
 
virtual void Map (const Variable< double > &rOriginVariable, const Variable< double > &rDestinationVariable)=0
 
virtual void InverseMap (const Variable< array_3d > &rDestinationVariable, const Variable< array_3d > &rOriginVariable)=0
 
virtual void InverseMap (const Variable< double > &rDestinationVariable, const Variable< double > &rOriginVariable)=0
 
Access
virtual TMappingMatrixTypeGetMappingMatrix ()
 This method returns the mapping-matrix. More...
 
virtual ModelPartGetInterfaceModelPartOrigin ()
 
virtual ModelPartGetInterfaceModelPartDestination ()
 
Inquiry
virtual int AreMeshesConforming () const
 Quering for mesh conformity This function is deprecated and will eventually be removed, hence it is best not to use it returns 1 if all the nodes are conform and 0 otherwise. More...
 
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...
 
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 Operators
virtual double GetVertexMorphingRadius (const NodeType &rNode) const
 

Pointer Definitions

Pointer definition of Mapper

typedef Kratos::unique_ptr< MapperMapperUniquePointerType
 
typedef TSparseSpace::MatrixType TMappingMatrixType
 
 KRATOS_CLASS_POINTER_DEFINITION (Mapper)
 

Type Definitions

typedef array_1d< double, 3 > array_3d
 
typedef Node NodeType
 
 KRATOS_CLASS_POINTER_DEFINITION (Mapper)
 Pointer definition of Mapper. More...
 

Detailed Description

template<class TSparseSpace, class TDenseSpace>
class Kratos::Mapper< TSparseSpace, TDenseSpace >

Base Class for all Mappers.

Short class definition.

This is the base class for every mapper. This is the equivalent to a Kratos-SolvingStrategy. It provides the basic interface for the mapping operations

Detail class definition.

Member Typedef Documentation

◆ array_3d

template<class TSparseSpace , class TDenseSpace >
typedef array_1d<double,3> Kratos::Mapper< TSparseSpace, TDenseSpace >::array_3d

◆ MapperUniquePointerType

template<class TSparseSpace , class TDenseSpace >
typedef Kratos::unique_ptr<Mapper> Kratos::Mapper< TSparseSpace, TDenseSpace >::MapperUniquePointerType

◆ NodeType

template<class TSparseSpace , class TDenseSpace >
typedef Node Kratos::Mapper< TSparseSpace, TDenseSpace >::NodeType

◆ TMappingMatrixType

template<class TSparseSpace , class TDenseSpace >
typedef TSparseSpace::MatrixType Kratos::Mapper< TSparseSpace, TDenseSpace >::TMappingMatrixType

Constructor & Destructor Documentation

◆ Mapper() [1/2]

template<class TSparseSpace , class TDenseSpace >
Kratos::Mapper< TSparseSpace, TDenseSpace >::Mapper ( )
default

Constructor.

◆ ~Mapper() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual Kratos::Mapper< TSparseSpace, TDenseSpace >::~Mapper ( )
virtualdefault

Destructor.

◆ Mapper() [2/2]

template<class TSparseSpace , class TDenseSpace >
Kratos::Mapper< TSparseSpace, TDenseSpace >::Mapper ( )
inline

Default constructor.

◆ ~Mapper() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual Kratos::Mapper< TSparseSpace, TDenseSpace >::~Mapper ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AreMeshesConforming()

template<class TSparseSpace , class TDenseSpace >
virtual int Kratos::Mapper< TSparseSpace, TDenseSpace >::AreMeshesConforming ( ) const
inlinevirtual

Quering for mesh conformity This function is deprecated and will eventually be removed, hence it is best not to use it returns 1 if all the nodes are conform and 0 otherwise.

Reimplemented in Kratos::NearestNeighborMapper< TSparseSpace, TDenseSpace, TMapperBackend >.

◆ Clone()

template<class TSparseSpace , class TDenseSpace >
virtual MapperUniquePointerType Kratos::Mapper< TSparseSpace, TDenseSpace >::Clone ( ModelPart rModelPartOrigin,
ModelPart rModelPartDestination,
Parameters  JsonParameters 
) const
pure virtual

◆ GetInterfaceModelPartDestination()

template<class TSparseSpace , class TDenseSpace >
virtual ModelPart& Kratos::Mapper< TSparseSpace, TDenseSpace >::GetInterfaceModelPartDestination ( )
inlinevirtual

◆ GetInterfaceModelPartOrigin()

template<class TSparseSpace , class TDenseSpace >
virtual ModelPart& Kratos::Mapper< TSparseSpace, TDenseSpace >::GetInterfaceModelPartOrigin ( )
inlinevirtual

◆ GetMappingMatrix()

template<class TSparseSpace , class TDenseSpace >
virtual TMappingMatrixType& Kratos::Mapper< TSparseSpace, TDenseSpace >::GetMappingMatrix ( )
inlinevirtual

This method returns the mapping-matrix.

Returns
Reference to the mapping-matrix

Reimplemented in Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.

◆ GetVertexMorphingRadius()

template<class TSparseSpace , class TDenseSpace >
virtual double Kratos::Mapper< TSparseSpace, TDenseSpace >::GetVertexMorphingRadius ( const NodeType rNode) const
inlineprotectedvirtual

Reimplemented in Kratos::MapperVertexMorphing.

◆ Info() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual std::string Kratos::Mapper< TSparseSpace, TDenseSpace >::Info ( ) const
inlinevirtual

◆ Info() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual std::string Kratos::Mapper< TSparseSpace, TDenseSpace >::Info ( ) const
inlinevirtual

◆ Initialize()

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Initialize ( void  )
inlinevirtual

◆ InverseMap() [1/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::InverseMap ( const Variable< array_1d< double, 3 > > &  rOriginVariable,
const Variable< array_1d< double, 3 > > &  rDestinationVariable,
Kratos::Flags  MappingOptions 
)
pure virtual

Mapping from Destination to Origin, Vector Variable Same as InveseMap, but maps an array3-variable.

See also
InverseMap

Implemented in Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.

◆ InverseMap() [2/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::InverseMap ( const Variable< array_3d > &  rDestinationVariable,
const Variable< array_3d > &  rOriginVariable 
)
pure virtual

◆ InverseMap() [3/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::InverseMap ( const Variable< double > &  rDestinationVariable,
const Variable< double > &  rOriginVariable 
)
pure virtual

◆ InverseMap() [4/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::InverseMap ( const Variable< double > &  rOriginVariable,
const Variable< double > &  rDestinationVariable,
Kratos::Flags  MappingOptions 
)
pure virtual

Mapping from Destination to Origin, Scalar Variable Data is exchanged on the Interface, from the Destination-Modelpart to the Origin-ModelPart (the modelparts were specified in the construction Phase of the Mapper) It does the opposite of Map.

Parameters
rOriginVariableVariable on the Origin-ModelPart
rDestinationVariableVariable on the Destination-ModelPart
MappingOptionsflags used to specify options for the mapping
See also
Map

Implemented in Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.

◆ KRATOS_CLASS_POINTER_DEFINITION() [1/2]

template<class TSparseSpace , class TDenseSpace >
Kratos::Mapper< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION ( Mapper< TSparseSpace, TDenseSpace >  )

Pointer definition of Mapper.

◆ KRATOS_CLASS_POINTER_DEFINITION() [2/2]

template<class TSparseSpace , class TDenseSpace >
Kratos::Mapper< TSparseSpace, TDenseSpace >::KRATOS_CLASS_POINTER_DEFINITION ( Mapper< TSparseSpace, TDenseSpace >  )

◆ Map() [1/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Map ( const Variable< array_1d< double, 3 > > &  rOriginVariable,
const Variable< array_1d< double, 3 > > &  rDestinationVariable,
Kratos::Flags  MappingOptions 
)
pure virtual

Mapping from Origin to Destination, Vector Variable Same as Map, but maps an array3-variable.

See also
Map

Implemented in Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.

◆ Map() [2/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Map ( const Variable< array_3d > &  rOriginVariable,
const Variable< array_3d > &  rDestinationVariable 
)
pure virtual

◆ Map() [3/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Map ( const Variable< double > &  rOriginVariable,
const Variable< double > &  rDestinationVariable 
)
pure virtual

◆ Map() [4/4]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Map ( const Variable< double > &  rOriginVariable,
const Variable< double > &  rDestinationVariable,
Kratos::Flags  MappingOptions 
)
pure virtual

Mapping from Origin to Destination, Scalar Variable Data is exchanged on the Interface, from the Origin-Modelpart to the Destination-ModelPart (the modelparts were specified in the construction Phase of the Mapper)

Parameters
rOriginVariableVariable on the Origin-ModelPart
rDestinationVariableVariable on the Destination-ModelPart
MappingOptionsflags used to specify options for the mapping
See also
InverseMap

Implemented in Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.

◆ PrintData() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

◆ PrintData() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

◆ PrintInfo() [1/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

◆ PrintInfo() [2/2]

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

◆ Update()

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::Update ( )
inlinevirtual

◆ UpdateInterface()

template<class TSparseSpace , class TDenseSpace >
virtual void Kratos::Mapper< TSparseSpace, TDenseSpace >::UpdateInterface ( Kratos::Flags  MappingOptions,
double  SearchRadius 
)
pure virtual

Updates the mapping-system after the geometry/mesh has changed After changes in the topology (e.g. remeshing or sliding interfaces) the relations for the mapping have to be recomputed. This means that the search has to be conducted again and the mapping-system has to be rebuilt, hence this is expensive.

Parameters
MappingOptionsflags used to specify how the update has to be done
SearchRadiussearch radius used for the search

Implemented in Kratos::Projection3D2DMapper< TSparseSpace, TDenseSpace, TMapperBackend >, Kratos::InterpolativeMapperBase< TSparseSpace, TDenseSpace, TMapperBackend >, and Kratos::CouplingGeometryMapper< TSparseSpace, TDenseSpace >.


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