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.
data_communicator_factory.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main author: Jordi Cotela
11 //
12 
13 #ifndef KRATOS_DATA_COMMUNICATOR_FACTORY_INCLUDED
14 #define KRATOS_DATA_COMMUNICATOR_FACTORY_INCLUDED
15 
16 #include <string>
17 
19 
20 namespace Kratos
21 {
22 
24 
39 namespace DataCommunicatorFactory
40 {
41 
43 
50 const DataCommunicator& DuplicateAndRegister(
51  const DataCommunicator& rOriginalCommunicator,
52  const std::string& rNewCommunicatorName);
53 
55 
77 const DataCommunicator& SplitAndRegister(
78  const DataCommunicator& rOriginalCommunicator,
79  int Color,
80  int Key,
81  const std::string& rNewCommunicatorName);
82 
84 
95 const DataCommunicator& CreateFromRanksAndRegister(
96  const DataCommunicator& rOriginalCommunicator,
97  const std::vector<int>& rRanks,
98  const std::string& rNewCommunicatorName);
99 
101 
117 const DataCommunicator& CreateUnionAndRegister(
118  const DataCommunicator& rFirstDataCommunicator,
119  const DataCommunicator& rSecondDataCommunicator,
120  const DataCommunicator& rParentDataCommunicator,
121  const std::string& rNewCommunicatorName);
122 
124 
140 const DataCommunicator& CreateIntersectionAndRegister(
141  const DataCommunicator& rFirstDataCommunicator,
142  const DataCommunicator& rSecondDataCommunicator,
143  const DataCommunicator& rParentDataCommunicator,
144  const std::string& rNewCommunicatorName);
145 
146 }
147 
148 }
149 
150 #endif // KRATOS_DATA_COMMUNICATOR_FACTORY_INCLUDED
const DataCommunicator & DuplicateAndRegister(const DataCommunicator &rOriginalCommunicator, const std::string &rNewCommunicatorName)
Create a new MPIDataCommunicator as a duplicate of an existing one.
Definition: data_communicator_factory.cpp:28
const DataCommunicator & CreateIntersectionAndRegister(const DataCommunicator &rFirstDataCommunicator, const DataCommunicator &rSecondDataCommunicator, const DataCommunicator &rParentDataCommunicator, const std::string &rNewCommunicatorName)
Create a new MPIDataCommunicator as the intersection of the given ones.
Definition: data_communicator_factory.cpp:105
const DataCommunicator & SplitAndRegister(const DataCommunicator &rOriginalCommunicator, int Color, int Key, const std::string &rNewCommunicatorName)
Create a new MPIDataCommunicator by splitting an existing one.
Definition: data_communicator_factory.cpp:41
const DataCommunicator & CreateFromRanksAndRegister(const DataCommunicator &rOriginalCommunicator, const std::vector< int > &rRanks, const std::string &rNewCommunicatorName)
Create a new MPIDataCommunicator connecting the provided ranks.
Definition: data_communicator_factory.cpp:55
const DataCommunicator & CreateUnionAndRegister(const DataCommunicator &rFirstDataCommunicator, const DataCommunicator &rSecondDataCommunicator, const DataCommunicator &rParentDataCommunicator, const std::string &rNewCommunicatorName)
Create a new MPIDataCommunicator as the union of the given ones.
Definition: data_communicator_factory.cpp:77
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21