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.
Namespaces | Macros
mpi_data_communicator.cpp File Reference
#include <algorithm>
#include "includes/parallel_environment.h"
#include "mpi/includes/mpi_data_communicator.h"
#include "mpi/includes/mpi_manager.h"
#include "mpi/includes/mpi_message.h"
#include "mpi/utilities/data_communicator_factory.h"
Include dependency graph for mpi_data_communicator.cpp:

Namespaces

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

Macros

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SYNC_SHAPE_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_REDUCE_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_LOC_IMPLEMENTATION_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCANSUM_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SENDRECV_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_BROADCAST_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCATTER_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_GATHER_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_PUBLIC_INTERFACE_FOR_TYPE(...)
 
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_IMPLEMENTATION_FOR_TYPE(...)
 

Macro Definition Documentation

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_INTERFACE_FOR_TYPE (   ...)

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_LOC_IMPLEMENTATION_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_LOC_IMPLEMENTATION_FOR_TYPE (   ...)
Value:
std::pair<__VA_ARGS__, int> MPIDataCommunicator::MinLocAll(const __VA_ARGS__& rLocalValue) const { \
std::pair<__VA_ARGS__, int> local_values({rLocalValue, Rank()}); \
return AllReduceDetailWithLocation(local_values, MPI_MINLOC); \
} \
std::pair<__VA_ARGS__, int> MPIDataCommunicator::MaxLocAll(const __VA_ARGS__& rLocalValue) const { \
std::pair<__VA_ARGS__, int> local_values({rLocalValue, Rank()}); \
return AllReduceDetailWithLocation(local_values, MPI_MAXLOC); \
}

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_BROADCAST_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_BROADCAST_INTERFACE_FOR_TYPE (   ...)
Value:
void MPIDataCommunicator::BroadcastImpl(__VA_ARGS__& rBuffer, const int SourceRank) const { \
BroadcastDetail(rBuffer,SourceRank); \
} \
void MPIDataCommunicator::BroadcastImpl(std::vector<__VA_ARGS__>& rBuffer, const int SourceRank) const { \
BroadcastDetail(rBuffer,SourceRank); \
} \

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_GATHER_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_GATHER_INTERFACE_FOR_TYPE (   ...)

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_IMPLEMENTATION_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_IMPLEMENTATION_FOR_TYPE (   ...)
Value:
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_BROADCAST_INTERFACE_FOR_TYPE(__VA_ARGS__) \
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SENDRECV_INTERFACE_FOR_TYPE(...)
Definition: mpi_data_communicator.cpp:150

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_PUBLIC_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_PUBLIC_INTERFACE_FOR_TYPE (   ...)
Value:
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_ALLREDUCE_INTERFACE_FOR_TYPE(__VA_ARGS__) \
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCANSUM_INTERFACE_FOR_TYPE(__VA_ARGS__) \
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCATTER_INTERFACE_FOR_TYPE(__VA_ARGS__) \
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_GATHER_INTERFACE_FOR_TYPE(__VA_ARGS__) \
KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SYNC_SHAPE_INTERFACE_FOR_TYPE(__VA_ARGS__) \
#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_REDUCE_INTERFACE_FOR_TYPE(...)
Definition: mpi_data_communicator.cpp:40

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_REDUCE_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_REDUCE_INTERFACE_FOR_TYPE (   ...)

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCANSUM_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCANSUM_INTERFACE_FOR_TYPE (   ...)
Value:
__VA_ARGS__ MPIDataCommunicator::ScanSum(const __VA_ARGS__& LocalValue) const { \
__VA_ARGS__ partial_sums(LocalValue); \
ScanDetail(LocalValue, partial_sums, MPI_SUM); \
return partial_sums; \
} \
std::vector<__VA_ARGS__> MPIDataCommunicator::ScanSum(const std::vector<__VA_ARGS__>& rLocalValues) const { \
return ScanDetail(rLocalValues, MPI_SUM); \
} \
void MPIDataCommunicator::ScanSum( \
const std::vector<__VA_ARGS__>& rLocalValues, std::vector<__VA_ARGS__>& rPartialSums) const { \
ScanDetail(rLocalValues,rPartialSums,MPI_SUM); \
} \

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCATTER_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SCATTER_INTERFACE_FOR_TYPE (   ...)
Value:
std::vector<__VA_ARGS__> MPIDataCommunicator::Scatter( \
const std::vector<__VA_ARGS__>& rSendValues, const int SourceRank) const { \
return ScatterDetail(rSendValues, SourceRank); \
} \
void MPIDataCommunicator::Scatter( \
const std::vector<__VA_ARGS__>& rSendValues, std::vector<__VA_ARGS__>& rRecvValues, \
const int SourceRank) const { \
ScatterDetail(rSendValues,rRecvValues,SourceRank); \
} \
std::vector<__VA_ARGS__> MPIDataCommunicator::Scatterv( \
const std::vector<std::vector<__VA_ARGS__>>& rSendValues, const int SourceRank) const { \
return ScattervDetail(rSendValues, SourceRank); \
} \
void MPIDataCommunicator::Scatterv( \
const std::vector<__VA_ARGS__>& rSendValues, const std::vector<int>& rSendCounts, \
const std::vector<int>& rSendOffsets, std::vector<__VA_ARGS__>& rRecvValues, \
const int SourceRank) const { \
ScattervDetail(rSendValues,rSendCounts,rSendOffsets,rRecvValues,SourceRank); \
} \

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SENDRECV_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SENDRECV_INTERFACE_FOR_TYPE (   ...)

◆ KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SYNC_SHAPE_INTERFACE_FOR_TYPE

#define KRATOS_MPI_DATA_COMMUNICATOR_DEFINE_SYNC_SHAPE_INTERFACE_FOR_TYPE (   ...)
Value:
bool MPIDataCommunicator::SynchronizeShape(__VA_ARGS__& rValue) const { \
return SynchronizeShapeDetail(rValue); \
} \
bool MPIDataCommunicator::SynchronizeShape( \
const __VA_ARGS__& rSendValue, const int SendDestination, const int SendTag, \
__VA_ARGS__& rRecvValue, const int RecvSource, const int RecvTag) const { \
return SynchronizeShapeDetail(rSendValue, SendDestination, SendTag, \
rRecvValue, RecvSource, RecvTag); \
}