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::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType > Class Template Reference

Short class definition. More...

#include <pointer_map_communicator.h>

Collaboration diagram for Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >:

Public Member Functions

Life Cycle
 GlobalPointerMapCommunicator (const DataCommunicator &rDataCommunicator)
 Construct a new Global Pointer Map Communicator object. More...
 
virtual ~GlobalPointerMapCommunicator ()=default
 Destructor. More...
 
GlobalPointerMapCommunicatoroperator= (GlobalPointerMapCommunicator const &rOther)=delete
 Assignment constructor. More...
 
 GlobalPointerMapCommunicator (GlobalPointerMapCommunicator const &rOther)=delete
 Copy constructor. More...
 
Operations
template<class TApplyFunctor >
void SendAndApplyRemotely (ProxyType< TApplyFunctor > &rApplyProxy)
 Sends and applies remote Gp values. More...
 
template<class TApplyFunctor >
ProxyType< TApplyFunctor > GetApplyProxy (TApplyFunctor &&rApplyFunctor)
 Get the Apply Proxy object. More...
 
bool IsDistributed () const
 Returns jobs parallel status. More...
 
int GetMyPID () const
 Get the current rank. 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...
 

Protected Member Functions

Protected Operators
template<class... TArgs>
std::vector< intComputeCommunicationPlan (const std::unordered_map< int, TArgs... > &rNonLocalGlobalPointerMap)
 

Protected Attributes

Protected Member Variables
const DataCommunicatormrDataCommunicator
 
const int mCurrentRank
 

Type Definitions

using IndexType = std::size_t
 
using GlobalPointerType = GlobalPointer< TPointerDataType >
 
using DataVectorType = std::vector< TValueDataType >
 
using GlobalPointerValueVectorPair = std::pair< GlobalPointerType, DataVectorType >
 
template<class TApplyFunctor >
using ProxyType = ApplyProxy< TPointerDataType, TValueDataType, TApplyFunctor >
 
 KRATOS_CLASS_POINTER_DEFINITION (GlobalPointerMapCommunicator)
 Pointer definition of GlobalPointerMapCommunicator. More...
 

Detailed Description

template<class TPointerDataType, class TValueDataType>
class Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >

Short class definition.

Detail class definition.

Member Typedef Documentation

◆ DataVectorType

template<class TPointerDataType , class TValueDataType >
using Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::DataVectorType = std::vector<TValueDataType>

◆ GlobalPointerType

template<class TPointerDataType , class TValueDataType >
using Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GlobalPointerType = GlobalPointer<TPointerDataType>

◆ GlobalPointerValueVectorPair

template<class TPointerDataType , class TValueDataType >
using Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GlobalPointerValueVectorPair = std::pair<GlobalPointerType, DataVectorType>

◆ IndexType

template<class TPointerDataType , class TValueDataType >
using Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::IndexType = std::size_t

◆ ProxyType

template<class TPointerDataType , class TValueDataType >
template<class TApplyFunctor >
using Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::ProxyType = ApplyProxy<TPointerDataType, TValueDataType, TApplyFunctor>

Constructor & Destructor Documentation

◆ GlobalPointerMapCommunicator() [1/2]

template<class TPointerDataType , class TValueDataType >
Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GlobalPointerMapCommunicator ( const DataCommunicator rDataCommunicator)
inline

Construct a new Global Pointer Map Communicator object.

This constructor should only be called in non-parallel regions

Parameters
rDataCommunicatorData communicator

◆ ~GlobalPointerMapCommunicator()

template<class TPointerDataType , class TValueDataType >
virtual Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::~GlobalPointerMapCommunicator ( )
virtualdefault

Destructor.

◆ GlobalPointerMapCommunicator() [2/2]

template<class TPointerDataType , class TValueDataType >
Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GlobalPointerMapCommunicator ( GlobalPointerMapCommunicator< TPointerDataType, TValueDataType > const &  rOther)
delete

Copy constructor.

Member Function Documentation

◆ ComputeCommunicationPlan()

template<class TPointerDataType , class TValueDataType >
template<class... TArgs>
std::vector<int> Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::ComputeCommunicationPlan ( const std::unordered_map< int, TArgs... > &  rNonLocalGlobalPointerMap)
inlineprotected

◆ GetApplyProxy()

template<class TPointerDataType , class TValueDataType >
template<class TApplyFunctor >
ProxyType<TApplyFunctor> Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GetApplyProxy ( TApplyFunctor &&  rApplyFunctor)
inline

Get the Apply Proxy object.

The functor passed via rApplyFunctor should be thread safe

Returns the Apply proxy.

Template Parameters
TApplyFunctor
Parameters
rApplyFunctorThread safe functor
Returns
ApplyProxy<TPointerDataType, TValueDataType, TApplyFunctor>

◆ GetMyPID()

template<class TPointerDataType , class TValueDataType >
int Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::GetMyPID ( ) const
inline

Get the current rank.

◆ Info()

template<class TPointerDataType , class TValueDataType >
virtual std::string Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::Info ( ) const
inlinevirtual

Turn back information as a string.

◆ IsDistributed()

template<class TPointerDataType , class TValueDataType >
bool Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::IsDistributed ( ) const
inline

Returns jobs parallel status.

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TPointerDataType , class TValueDataType >
Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::KRATOS_CLASS_POINTER_DEFINITION ( GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >  )

Pointer definition of GlobalPointerMapCommunicator.

◆ operator=()

template<class TPointerDataType , class TValueDataType >
GlobalPointerMapCommunicator& Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::operator= ( GlobalPointerMapCommunicator< TPointerDataType, TValueDataType > const &  rOther)
delete

Assignment constructor.

◆ PrintData()

template<class TPointerDataType , class TValueDataType >
virtual void Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::PrintData ( std::ostream &  rOStream) const
inlinevirtual

Print object's data.

◆ PrintInfo()

template<class TPointerDataType , class TValueDataType >
virtual void Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::PrintInfo ( std::ostream &  rOStream) const
inlinevirtual

Print information about this object.

◆ SendAndApplyRemotely()

template<class TPointerDataType , class TValueDataType >
template<class TApplyFunctor >
void Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::SendAndApplyRemotely ( ProxyType< TApplyFunctor > &  rApplyProxy)
inline

Sends and applies remote Gp values.

This method is used to do communication between processes to apply non_local gp values in each process in GP's owning process

Ghost mesh synchronization needs to be done afterwards.

Template Parameters
TApplyFunctor
Parameters
rApplyProxyThe proxy which holds the user specified methods

Member Data Documentation

◆ mCurrentRank

template<class TPointerDataType , class TValueDataType >
const int Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::mCurrentRank
protected

◆ mrDataCommunicator

template<class TPointerDataType , class TValueDataType >
const DataCommunicator& Kratos::GlobalPointerMapCommunicator< TPointerDataType, TValueDataType >::mrDataCommunicator
protected

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