18 #include <unordered_map>
38 typedef std::unique_ptr<EnvironmentManager>
Pointer;
62 constexpr
static bool MakeDefault =
true;
63 constexpr
static bool DoNotMakeDefault =
false;
78 static void SetDefaultDataCommunicator(
const std::string& rName);
81 static int GetDefaultRank();
84 static int GetDefaultSize();
100 template<
class TDataCommunicatorInputType>
101 static void RegisterFillCommunicatorFactory(std::function<FillCommunicator::Pointer(
ModelPart&, TDataCommunicatorInputType&)> FillCommunicatorFactory);
108 template<
class TDataCommunicatorInputType>
109 static void RegisterCommunicatorFactory(std::function<Communicator::UniquePointer(
ModelPart&, TDataCommunicatorInputType&)> CommunicatorFactory);
117 KRATOS_DEPRECATED_MESSAGE(
"This function is deprecated, please use \"CreateFillCommunicatorFromGlobalParallelism\" instead")
127 static
FillCommunicator::Pointer CreateFillCommunicatorFromGlobalParallelism(
129 const std::
string& rDataCommunicatorName);
138 static
FillCommunicator::Pointer CreateFillCommunicatorFromGlobalParallelism(
149 static
Communicator::UniquePointer CreateCommunicatorFromGlobalParallelism(
151 const std::
string& rDataCommunicatorName);
160 static
Communicator::UniquePointer CreateCommunicatorFromGlobalParallelism(
169 static
void RegisterDataCommunicator(
172 const bool Default = DoNotMakeDefault);
177 static
void UnregisterDataCommunicator(
185 static
bool HasDataCommunicator(
const std::
string& rName);
189 static
std::
string GetDefaultDataCommunicatorName();
191 static
bool MPIIsInitialized();
193 static
bool MPIIsFinalized();
203 static
void PrintInfo(
std::ostream &rOStream);
206 static
void PrintData(
std::ostream &rOStream);
229 template<class TDataCommunicatorInputType>
230 void RegisterFillCommunicatorFactoryDetail(
std::function<
FillCommunicator::Pointer(
ModelPart&, TDataCommunicatorInputType&)> FillCommunicatorFactory);
232 template<class TDataCommunicatorInputType>
233 void RegisterCommunicatorFactoryDetail(
std::function<
Communicator::UniquePointer(
ModelPart&, TDataCommunicatorInputType&)> CommunicatorFactory);
235 void RegisterDataCommunicatorDetail(
238 const bool Default = DoNotMakeDefault);
240 void UnregisterDataCommunicatorDetail(
const std::
string& Name);
246 void SetDefaultDataCommunicatorDetail(
const std::
string& rName);
252 bool HasDataCommunicatorDetail(
const std::
string& rName)
const;
254 bool MPIIsInitializedDetail()
const;
256 bool MPIIsFinalizedDetail()
const;
264 void SetAsDefault(
std::unordered_map<
std::
string,
DataCommunicator::UniquePointer>::iterator& rThisCommunicator);
274 void PrintInfoDetail(
std::ostream &rOStream)
const;
277 void PrintDataDetail(
std::ostream &rOStream)
const;
301 static
bool mDestroyed;
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
The Commmunicator class manages communication for distributed ModelPart instances.
Definition: communicator.h:67
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
Definition: parallel_environment.h:36
EnvironmentManager(EnvironmentManager &rOther)=delete
EnvironmentManager()=default
virtual bool IsFinalized() const =0
virtual ~EnvironmentManager()=default
virtual bool IsInitialized() const =0
std::unique_ptr< EnvironmentManager > Pointer
Definition: parallel_environment.h:38
Base class defining the API for the fill communicator utilities.
Definition: fill_communicator.h:52
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Holder for general data related to MPI (or suitable serial equivalents for non-MPI runs).
Definition: parallel_environment.h:57
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
DataCommunicator & GetDefaultDataCommunicator()
Definition: testing.cpp:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Kratos::PeriodicInterfaceProcess Process operator(std::istream &rIStream, PeriodicInterfaceProcess &rThis)
input stream function
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33
tuple const
Definition: ode_solve.py:403
namespace
Definition: array_1d.h:793