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.
metis_divide_heterogeneous_input_in_memory_process.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 authors: Pooyan Dadvand
11 // Jordi Cotela
12 // Carlos Roig
13 //
14 
15 #pragma once
16 
17 // Project includes
18 #include "includes/model_part_io.h"
20 
21 
22 namespace Kratos
23 {
26 
29 
33 
37 
41 
45 
48 {
49 public:
52 
55 
57 
58  using BaseType::SizeType;
59  using BaseType::GraphType;
60  using BaseType::idxtype;
61 
65 
67  MetisDivideHeterogeneousInputInMemoryProcess(IO& rIO, ModelPartIO& rSerialIO, const DataCommunicator& rDataComm, int Dimension = 3, int Verbosity = 0, bool SynchronizeConditions = false):
68  BaseType(rIO,rDataComm.Size(),Dimension,Verbosity,SynchronizeConditions), mrSerialIO(rSerialIO), mrDataComm(rDataComm)
69  {
70  KRATOS_ERROR_IF_NOT(mrDataComm.IsDistributed()) << "DataCommunicator must be distributed!" << std::endl;
71  }
72 
75  {
76  }
77 
78 
82 
83  void operator()()
84  {
85  this->Execute();
86  }
87 
88 
92 
94 
96  void Execute() override;
97 
101 
102 
106 
107 
111 
113  std::string Info() const override
114  {
115  return "MetisDivideHeterogeneousInputInMemoryProcess";
116  }
117 
119  void PrintInfo(std::ostream& rOStream) const override
120  {
121  rOStream << "MetisDivideHeterogeneousInputInMemoryProcess";
122  }
123 
125  void PrintData(std::ostream& rOStream) const override
126  {
127  }
128 
129 
133 
134 
136 
137 protected:
140 
141 
145 
146 
150 
151 
155 
156 
160 
161 
165 
166 
170 
171 
173 
174 private:
177 
178 
182 
183  ModelPartIO& mrSerialIO;
184 
185  const DataCommunicator& mrDataComm;
186 
190 
191 
195 
196 
200 
201 
205 
206 
210 
211  // Copy constructor.
212  //MetisDivideHeterogeneousInputInMemoryProcess(MetisDivideHeterogeneousInputInMemoryProcess const& rOther);
213 
214 
216 
217 }; // Class MetisDivideHeterogeneousInputInMemoryProcess
218 
220 
223 
224 
228 
230 
232 
233 }
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
IO provides different implementation of input output procedures which can be used to read and write w...
Definition: io.h:58
Definition: amatrix_interface.h:41
Call Metis to divide an heterogeneous mesh, by partitioning its nodal graph.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:48
void operator()()
Definition: metis_divide_heterogeneous_input_in_memory_process.h:83
MetisDivideHeterogeneousInputInMemoryProcess(IO &rIO, ModelPartIO &rSerialIO, const DataCommunicator &rDataComm, int Dimension=3, int Verbosity=0, bool SynchronizeConditions=false)
Default constructor.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:67
std::string Info() const override
Turn back information as a string.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:113
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:125
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:119
virtual ~MetisDivideHeterogeneousInputInMemoryProcess()
Destructor.
Definition: metis_divide_heterogeneous_input_in_memory_process.h:74
MetisDivideHeterogeneousInputProcess BaseType
Definition: metis_divide_heterogeneous_input_in_memory_process.h:56
KRATOS_CLASS_POINTER_DEFINITION(MetisDivideHeterogeneousInputInMemoryProcess)
Pointer definition of MetisDivideHeterogeneousInputInMemoryProcess.
Call Metis to divide an heterogeneous mesh, by partitioning its nodal graph.
Definition: metis_divide_heterogeneous_input_process.h:36
idx_t idxtype
Definition: metis_divide_heterogeneous_input_process.h:49
An IO class for reading and writing a modelpart.
Definition: model_part_io.h:56
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
std::size_t SizeType
Definition: nurbs_utilities.h:41
TSpaceType::IndexType Size(TSpaceType &dummy, typename TSpaceType::VectorType const &rV)
Definition: add_strategies_to_python.cpp:111
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21