IOSS 2.0

Ioss_Decomposition.h
Go to the documentation of this file.
1 /*
2 * Copyright(C) 1999-2017 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * * Neither the name of NTESS nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 #ifndef IOSS_DECOMPOSITON_H
35 #define IOSS_DECOMPOSITON_H
36
37 #include <Ioss_CodeTypes.h>
38 #include <Ioss_Map.h>
39 #include <Ioss_ParallelUtils.h>
40 #include <Ioss_PropertyManager.h>
41 #include <algorithm>
42 #include <assert.h>
43 #include <map>
44 #include <string>
45 #include <vector>
46
47 #if !defined(NO_PARMETIS_SUPPORT)
48 #include <parmetis.h>
49 #endif
50
51 #if !defined(NO_ZOLTAN_SUPPORT)
52 #undef MPICPP
53 #include <zoltan_cpp.h>
54 #endif
55
56 namespace Ioss {
57 class BlockDecompositionData
58 {
59 public:
60 BlockDecompositionData() = default;
61
62 const std::string &name() const { return name_; }
63 int zone() const { return zone_; }
64 int section() const { return section_; }
65 int64_t id() const { return id_; }
66 size_t file_count() const { return fileCount; }
67 size_t ioss_count() const { return iossCount; }
68 size_t global_count() const { return globalCount; }
69
70 std::string name_{};
71 int zone_{0};
72 int section_{0};
73
74 size_t fileSectionOffset{0}; // In partial read, where start
75 int64_t id_{0};
76 size_t fileCount{0};
77 size_t iossCount{0};
78 size_t globalCount{0};
79
80 size_t zoneNodeOffset{0};
81 std::string topologyType{"unknown"};
82 int nodesPerEntity{0};
83 int attributeCount{0};
84
85 // maps from file-block data to ioss-block data
86 // The local_map.size() elements starting at localIossOffset are local.
87 // ioss[localIossOffset+i] = file[local_map[i]];
88 size_t localIossOffset{0};
89 std::vector<int> localMap;
90
91 // Maps from file-block data to export list.
92 // export[i] = file[export_map[i]
93 std::vector<int> exportMap;
94 std::vector<int> exportCount;
95 std::vector<int> exportIndex;
96
97 // Maps from import data to ioss-block data.
98 // ioss[import_map[i] = local_map[i];
99 std::vector<int> importMap;
100 std::vector<int> importCount;
101 std::vector<int> importIndex;
102 };
103
104 class SetDecompositionData
105 {
106 public:
107 SetDecompositionData() = default;
108 SetDecompositionData(const SetDecompositionData &) = delete;
109 SetDecompositionData(SetDecompositionData &&) = default;
110
111 ~SetDecompositionData()
112 {
113 if (setComm_ != MPI_COMM_NULL) {
114 MPI_Comm_free(&setComm_);
115 }
116 }
117
118 const std::string &name() const { return name_; }
119 int64_t id() const { return id_; }
120 int zone() const { return zone_; }
121 int section() const { return section_; }
122 size_t file_count() const { return fileCount; }
123 size_t ioss_count() const { return entitylist_map.size(); }
124 size_t df_count() const { return distributionFactorCount; }
125
126 // contains global entity-list positions for all entities in this set on this processor.
127 std::vector<size_t> entitylist_map;
128 std::vector<bool> hasEntities; // T/F if this set exists on processor p
129
130 std::string name_{};
131 int64_t id_{0};
132 int zone_{0};
133 int section_{0};
134 size_t fileCount{0}; // Number of nodes in nodelist for file decomposition
135 int root_{0}; // Lowest number processor that has nodes for this nodest
136 std::string topologyType{};
137 size_t parentBlockIndex{0};
138
139 int distributionFactorValsPerEntity{-1}; // number of df / element or node. -1 if nonconstant.
140 size_t distributionFactorCount{0};
141 double distributionFactorValue{
142 0.0}; // If distributionFactorConstant == true, the constant value
143 MPI_Comm setComm_{MPI_COMM_NULL};
144 bool distributionFactorConstant{false}; // T if all distribution factors the same value.
145 };
146
147 template <typename INT> class Decomposition
148 {
149 public:
150 Decomposition(const Ioss::PropertyManager &props, MPI_Comm comm);
151
152 size_t global_node_count() const { return m_globalNodeCount; }
153 size_t global_elem_count() const { return m_globalElementCount; }
154 size_t ioss_node_count() const { return nodeGTL.size(); }
155 size_t ioss_elem_count() const { return localElementMap.size() + importElementMap.size(); }
156 size_t file_node_count() const { return m_nodeCount; }
157 size_t file_elem_count() const { return m_elementCount; }
158 size_t file_node_offset() const { return m_nodeOffset; }
159 size_t file_elem_offset() const { return m_elementOffset; }
160
161 bool needs_centroids() const;
162
163 void generate_entity_distributions(size_t globalNodeCount, size_t globalElementCount);
164
165 // T/F if node with global index node owned by this processors ioss-decomp.
166 bool i_own_node(size_t global_index) const
167 {
168 // global_index is 1-based index into global list of nodes [1..global_node_count]
169 return std::binary_search(nodeGTL.begin(), nodeGTL.end(), global_index);
170 }
171
172 // T/F if element with global index elem owned by this processors ioss-decomp.
173 bool i_own_elem(size_t global_index) const
174 {
175 // global_index is 1-based index into global list of elements [1..global_element_count]
176 return elemGTL.count(global_index) != 0;
177 }
178
179 size_t node_global_to_local(size_t global_index) const
180 {
181 // global_index is 1-based index into global list of nodes [1..global_node_count]
182 // return value is 1-based index into local list of nodes on this
183 // processor (ioss-decomposition)
184 // Note that for 'int', equivalence and equality are the same, so
185 // lower_bound is OK here (EffectiveSTL, Item 19)
186 typename std::vector<INT>::const_iterator I =
187 lower_bound(nodeGTL.begin(), nodeGTL.end(), global_index);
188 assert(I != nodeGTL.end());
189 return std::distance(nodeGTL.begin(), I) + 1; // Convert to 1-based index.
190 }
191
192 size_t elem_global_to_local(size_t global_index) const
193 {
194 // global_index is 1-based index into global list of elements [1..global_node_count]
195 // return value is 1-based index into local list of elements on this
196 // processor (ioss-decomposition)
197 typename std::map<INT, INT>::const_iterator I = elemGTL.find(global_index);
198 assert(I != elemGTL.end());
199 return I->second;
200 }
201
202 void show_progress(const std::string &message) const
203 {
204 if (m_showProgress) {
205 Ioss::ParallelUtils pu(m_comm);
206 pu.progress(message);
207 }
208 }
209
210 void decompose_model(
211 #if !defined(NO_ZOLTAN_SUPPORT)
212 Zoltan &zz,
213 #endif
214 std::vector<BlockDecompositionData> &element_blocks);
215
216 void simple_decompose();
217
218 void simple_node_decompose();
219
220 void calculate_element_centroids(const std::vector<double> &x, const std::vector<double> &y,
221 const std::vector<double> &z);
222
223 #if !defined(NO_ZOLTAN_SUPPORT)
224 void zoltan_decompose(Zoltan &zz);
225
226 void get_local_element_list(const ZOLTAN_ID_PTR &export_global_ids, size_t export_count);
227 #endif
228
229 #if !defined(NO_PARMETIS_SUPPORT)
230 void metis_decompose(idx_t *pointer, idx_t *adjacency,
231 std::vector<BlockDecompositionData> &el_blocks);
232
233 void internal_metis_decompose(std::vector<BlockDecompositionData> &el_blocks,
234 idx_t *element_dist, idx_t *pointer, idx_t *adjacency,
235 idx_t *elem_partition);
236 #endif
237
238 void get_node_entity_proc_data(INT *entity_proc, const Ioss::MapContainer &node_map,
239 bool do_map) const;
240
241 void get_element_block_communication(std::vector<BlockDecompositionData> &el_blocks);
242 void build_global_to_local_elem_map();
243 void get_local_node_list();
244 void get_shared_node_list();
245 template <typename T>
246 void communicate_element_data(T *file_data, T *ioss_data, size_t comp_count) const;
247
248 template <typename T>
249 void communicate_set_data(T *file_data, T *ioss_data, const SetDecompositionData &set,
250 size_t comp_count) const;
251
252 template <typename T, typename U>
253 void communicate_block_data(T *file_data, U *ioss_data, const BlockDecompositionData &block,
254 size_t comp_count) const;
255
256 template <typename T>
257 void communicate_node_data(T *file_data, T *ioss_data, size_t comp_count) const;
258
259 MPI_Comm m_comm;
260 int m_processor{};
261 int m_processorCount{};
262 std::string m_method;
263
264 // Values for the file decomposition
265 int m_spatialDimension{3};
266 size_t m_globalElementCount{0};
267 size_t m_elementCount{0};
268 size_t m_elementOffset{0};
269 size_t m_importPreLocalElemIndex{0};
270
271 size_t m_globalNodeCount{0};
272 size_t m_nodeCount{0};
273 size_t m_nodeOffset{0};
274 size_t m_importPreLocalNodeIndex{0};
275
276 bool m_retainFreeNodes{true};
277 bool m_showProgress{false};
278 bool m_showHWM{false};
279
280 std::vector<double> m_centroids;
281 std::vector<INT> m_pointer; // Index into adjacency, processor list for each element...
282 std::vector<INT> m_adjacency; // Size is sum of element connectivity sizes
283
284 std::vector<INT> m_nodeCommMap; // node/processor pair of the
285 // nodes I communicate with. Stored node#,proc,node#,proc, ...
286
287 // The global element at index 'I' (0-based) is on block B in the
288 // file decomposition.
289 // if m_fileBlockIndex[B] <= I && m_fileBlockIndex[B+1] < I
290 std::vector<size_t> m_fileBlockIndex;
291
292 private:
293 // This processor "manages" the elements on the exodus mesh file from
294 // element_offset to element_offset+count (0-based). This is
295 // 'file' data
296 //
297 // This processor also appears to the Ioss clients to own other
298 // element and node data based on the decomposition. This is the
299 // 'ioss' data.
300 //
301 // The indices in 'local_element_map' are the elements that are
302 // common to both the 'file' data and the 'ioss' data.
303 // local_element_map[i] contains the location in 'file' data for
304 // the 'ioss' data at location 'i+import_pre_local_elem_index'
305 //
306 // local_element_map[i]+m_elementOffset is the 0-based global index
307 //
308 // The indices in 'import_element_map' map the data received via
309 // mpi communication from other processors into 'ioss' data.
310 // if 'ind=import_element_map[i]', then ioss[ind] = comm_recv[i]
311 // Note that this is the reverse direction of the
312 // local_element_map mapping.
313 //
314 // The indices in 'export_element_map' are used to pull from
315 // 'file' data into the comm_send vector. if 'ind =
316 // export_element_map[i]', then 'comm_send[i] = file[ind]' for i =
317 // 0..#exported_elements
318 //
319 // local_element_map.size() + import_element_map.size() == #
320 // ioss elements on this processor.
321 //
322 // local_element_map.size() + export_element_map.size() == #
323 // file elements on this processor.
324 //
325 // export_element_map and import_element_map are sorted.
326 // The primary key is processor order followed by global id.
327 // The processor association is via 'export_proc_disp' and
328 // 'import_proc_disp' Both are of size '#processors+1' and
329 // the elements for processor p range from [X_proc_disp[p] to
330 // X_proc_disp[p+1])
331
332 std::vector<INT> localElementMap;
333
334 std::vector<INT> importElementMap;
335 std::vector<INT> importElementCount;
336 std::vector<INT> importElementIndex;
337
338 std::vector<INT> exportElementMap;
339 std::vector<INT> exportElementCount;
340 std::vector<INT> exportElementIndex;
341
342 std::vector<INT> nodeIndex;
343
344 std::vector<INT> exportNodeMap;
345 std::vector<INT> exportNodeCount;
346 std::vector<INT> exportNodeIndex;
347
348 std::vector<INT>
349 importNodeMap; // Where to put each imported nodes data in the list of all data...
350 std::vector<INT> importNodeCount;
351 std::vector<INT> importNodeIndex;
352
353 std::vector<INT> localNodeMap;
354
355 std::vector<INT> m_elementDist;
356 std::vector<INT> m_nodeDist;
357
358 // Note that nodeGTL is a sorted vector.
359 std::vector<INT> nodeGTL; // Convert from global index to local index (1-based)
360 std::map<INT, INT> elemGTL; // Convert from global index to local index (1-based)
361 };
362 } // namespace Ioss
363 #endif
Ioss::Decomposition::metis_decompose
void metis_decompose(idx_t *pointer, idx_t *adjacency, std::vector< BlockDecompositionData > &el_blocks)
Definition: Ioss_Decomposition.C:621
Ioss::SetDecompositionData::name
const std::string & name() const
Definition: Ioss_Decomposition.h:118
Ioss::BlockDecompositionData::topologyType
std::string topologyType
Definition: Ioss_Decomposition.h:81
Ioss::SetDecompositionData::entitylist_map
std::vector< size_t > entitylist_map
Definition: Ioss_Decomposition.h:127
Ioss::BlockDecompositionData::exportIndex
std::vector< int > exportIndex
Definition: Ioss_Decomposition.h:95
Ioss::SetDecompositionData::zone
int zone() const
Definition: Ioss_Decomposition.h:120
Ioss::Decomposition::ioss_elem_count
size_t ioss_elem_count() const
Definition: Ioss_Decomposition.h:155
Ioss::Decomposition::m_nodeDist
std::vector< INT > m_nodeDist
Definition: Ioss_Decomposition.h:356
Ioss::BlockDecompositionData::id
int64_t id() const
Definition: Ioss_Decomposition.h:65
Ioss::Decomposition::exportElementCount
std::vector< INT > exportElementCount
Definition: Ioss_Decomposition.h:339
Ioss::SetDecompositionData::setComm_
MPI_Comm setComm_
Definition: Ioss_Decomposition.h:143
Ioss::Decomposition::simple_decompose
void simple_decompose()
Definition: Ioss_Decomposition.C:566
Ioss::SetDecompositionData::fileCount
size_t fileCount
Definition: Ioss_Decomposition.h:134
Ioss::BlockDecompositionData::name
const std::string & name() const
Definition: Ioss_Decomposition.h:62
Ioss::BlockDecompositionData::exportMap
std::vector< int > exportMap
Definition: Ioss_Decomposition.h:93
Ioss::BlockDecompositionData::fileCount
size_t fileCount
Definition: Ioss_Decomposition.h:76
Ioss::Decomposition::m_importPreLocalElemIndex
size_t m_importPreLocalElemIndex
Definition: Ioss_Decomposition.h:269
Ioss::SetDecompositionData::ioss_count
size_t ioss_count() const
Definition: Ioss_Decomposition.h:123
Ioss::SetDecompositionData::section
int section() const
Definition: Ioss_Decomposition.h:121
Ioss_Map.h
Ioss::Decomposition::m_showProgress
bool m_showProgress
Definition: Ioss_Decomposition.h:277
Ioss::Decomposition::elem_global_to_local
size_t elem_global_to_local(size_t global_index) const
Definition: Ioss_Decomposition.h:192
Ioss::Decomposition::file_node_count
size_t file_node_count() const
Definition: Ioss_Decomposition.h:156
Ioss::SetDecompositionData::parentBlockIndex
size_t parentBlockIndex
Definition: Ioss_Decomposition.h:137
Ioss::Decomposition::m_comm
MPI_Comm m_comm
Definition: Ioss_Decomposition.h:259
Ioss::SetDecompositionData::section_
int section_
Definition: Ioss_Decomposition.h:133
Ioss::Decomposition::m_elementOffset
size_t m_elementOffset
Definition: Ioss_Decomposition.h:268
Ioss::BlockDecompositionData::name_
std::string name_
Definition: Ioss_Decomposition.h:70
Ioss::BlockDecompositionData::localMap
std::vector< int > localMap
Definition: Ioss_Decomposition.h:89
Ioss::BlockDecompositionData::importIndex
std::vector< int > importIndex
Definition: Ioss_Decomposition.h:101
Ioss::Decomposition::nodeGTL
std::vector< INT > nodeGTL
Definition: Ioss_Decomposition.h:359
Ioss::BlockDecompositionData::exportCount
std::vector< int > exportCount
Definition: Ioss_Decomposition.h:94
Ioss::Decomposition::importNodeCount
std::vector< INT > importNodeCount
Definition: Ioss_Decomposition.h:350
Ioss::Decomposition::m_nodeOffset
size_t m_nodeOffset
Definition: Ioss_Decomposition.h:273
Ioss::Decomposition::file_elem_offset
size_t file_elem_offset() const
Definition: Ioss_Decomposition.h:159
Ioss::BlockDecompositionData::attributeCount
int attributeCount
Definition: Ioss_Decomposition.h:83
Ioss
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:66
Ioss::Decomposition::nodeIndex
std::vector< INT > nodeIndex
Definition: Ioss_Decomposition.h:342
Ioss::Decomposition::simple_node_decompose
void simple_node_decompose()
Definition: Ioss_Decomposition.C:586
Ioss::Decomposition::i_own_node
bool i_own_node(size_t global_index) const
Definition: Ioss_Decomposition.h:166
Ioss::Decomposition::m_globalElementCount
size_t m_globalElementCount
Definition: Ioss_Decomposition.h:266
Ioss::Decomposition::i_own_elem
bool i_own_elem(size_t global_index) const
Definition: Ioss_Decomposition.h:173
Ioss::Decomposition::localNodeMap
std::vector< INT > localNodeMap
Definition: Ioss_Decomposition.h:353
Ioss::Decomposition::importNodeIndex
std::vector< INT > importNodeIndex
Definition: Ioss_Decomposition.h:351
Ioss::SetDecompositionData::hasEntities
std::vector< bool > hasEntities
Definition: Ioss_Decomposition.h:128
Ioss::Decomposition::Decomposition
Decomposition(const Ioss::PropertyManager &props, MPI_Comm comm)
Definition: Ioss_Decomposition.C:187
Ioss::Decomposition::exportNodeMap
std::vector< INT > exportNodeMap
Definition: Ioss_Decomposition.h:344
Ioss::SetDecompositionData::zone_
int zone_
Definition: Ioss_Decomposition.h:132
Ioss::Decomposition::m_showHWM
bool m_showHWM
Definition: Ioss_Decomposition.h:278
Ioss::Decomposition::m_processor
int m_processor
Definition: Ioss_Decomposition.h:260
Ioss::BlockDecompositionData::iossCount
size_t iossCount
Definition: Ioss_Decomposition.h:77
Ioss::Decomposition::node_global_to_local
size_t node_global_to_local(size_t global_index) const
Definition: Ioss_Decomposition.h:179
Ioss::Decomposition::file_elem_count
size_t file_elem_count() const
Definition: Ioss_Decomposition.h:157
INT
int INT
Definition: Ioss_StructuredBlock.h:53
Ioss::BlockDecompositionData::nodesPerEntity
int nodesPerEntity
Definition: Ioss_Decomposition.h:82
Ioss::PropertyManager
A collection of Ioss::Property objects.
Definition: Ioss_PropertyManager.h:49
Ioss::Decomposition::get_element_block_communication
void get_element_block_communication(std::vector< BlockDecompositionData > &el_blocks)
Definition: Ioss_Decomposition.C:230
Ioss_ParallelUtils.h
Ioss::BlockDecompositionData::importMap
std::vector< int > importMap
Definition: Ioss_Decomposition.h:99
Ioss::SetDecompositionData::df_count
size_t df_count() const
Definition: Ioss_Decomposition.h:124
Ioss::Decomposition::communicate_set_data
void communicate_set_data(T *file_data, T *ioss_data, const SetDecompositionData &set, size_t comp_count) const
Definition: Ioss_Decomposition.C:1469
Ioss::Decomposition::generate_entity_distributions
void generate_entity_distributions(size_t globalNodeCount, size_t globalElementCount)
Definition: Ioss_Decomposition.C:216
Ioss::BlockDecompositionData
Definition: Ioss_Decomposition.h:57
Ioss::Decomposition::communicate_block_data
void communicate_block_data(T *file_data, U *ioss_data, const BlockDecompositionData &block, size_t comp_count) const
Definition: Ioss_Decomposition.C:1559
Ioss::SetDecompositionData::id
int64_t id() const
Definition: Ioss_Decomposition.h:119
Ioss::BlockDecompositionData::file_count
size_t file_count() const
Definition: Ioss_Decomposition.h:66
Ioss::BlockDecompositionData::globalCount
size_t globalCount
Definition: Ioss_Decomposition.h:78
Ioss::SetDecompositionData::distributionFactorValsPerEntity
int distributionFactorValsPerEntity
Definition: Ioss_Decomposition.h:139
Ioss::BlockDecompositionData::id_
int64_t id_
Definition: Ioss_Decomposition.h:75
Ioss::Decomposition::m_method
std::string m_method
Definition: Ioss_Decomposition.h:262
Ioss::Decomposition::exportNodeIndex
std::vector< INT > exportNodeIndex
Definition: Ioss_Decomposition.h:346
Ioss::Decomposition::needs_centroids
bool needs_centroids() const
Definition: Ioss_Decomposition.C:204
Ioss::SetDecompositionData::file_count
size_t file_count() const
Definition: Ioss_Decomposition.h:122
Ioss::BlockDecompositionData::global_count
size_t global_count() const
Definition: Ioss_Decomposition.h:68
Ioss::Decomposition::m_pointer
std::vector< INT > m_pointer
Definition: Ioss_Decomposition.h:281
Ioss::SetDecompositionData::distributionFactorConstant
bool distributionFactorConstant
Definition: Ioss_Decomposition.h:144
Ioss::BlockDecompositionData::section
int section() const
Definition: Ioss_Decomposition.h:64
Ioss::SetDecompositionData
Definition: Ioss_Decomposition.h:104
Ioss::Decomposition::m_adjacency
std::vector< INT > m_adjacency
Definition: Ioss_Decomposition.h:282
Ioss::Decomposition::show_progress
void show_progress(const std::string &message) const
Definition: Ioss_Decomposition.h:202
Ioss::Decomposition::m_elementCount
size_t m_elementCount
Definition: Ioss_Decomposition.h:267
Ioss_PropertyManager.h
Ioss::Decomposition::m_retainFreeNodes
bool m_retainFreeNodes
Definition: Ioss_Decomposition.h:276
Ioss::Decomposition::file_node_offset
size_t file_node_offset() const
Definition: Ioss_Decomposition.h:158
Ioss::SetDecompositionData::SetDecompositionData
SetDecompositionData()=default
Ioss::SetDecompositionData::name_
std::string name_
Definition: Ioss_Decomposition.h:130
Ioss::Decomposition::global_elem_count
size_t global_elem_count() const
Definition: Ioss_Decomposition.h:153
Ioss::Decomposition::get_node_entity_proc_data
void get_node_entity_proc_data(INT *entity_proc, const Ioss::MapContainer &node_map, bool do_map) const
Definition: Ioss_Decomposition.C:1633
Ioss::Decomposition::m_centroids
std::vector< double > m_centroids
Definition: Ioss_Decomposition.h:280
Ioss::SetDecompositionData::~SetDecompositionData
~SetDecompositionData()
Definition: Ioss_Decomposition.h:111
Ioss::Decomposition::build_global_to_local_elem_map
void build_global_to_local_elem_map()
Definition: Ioss_Decomposition.C:990
Ioss::SetDecompositionData::distributionFactorCount
size_t distributionFactorCount
Definition: Ioss_Decomposition.h:140
Ioss::Decomposition::m_processorCount
int m_processorCount
Definition: Ioss_Decomposition.h:261
Ioss::Decomposition::m_nodeCommMap
std::vector< INT > m_nodeCommMap
Definition: Ioss_Decomposition.h:284
Ioss::Decomposition::get_shared_node_list
void get_shared_node_list()
Definition: Ioss_Decomposition.C:1221
Ioss::Decomposition::decompose_model
void decompose_model(Zoltan &zz, std::vector< BlockDecompositionData > &element_blocks)
Definition: Ioss_Decomposition.C:314
Ioss::BlockDecompositionData::fileSectionOffset
size_t fileSectionOffset
Definition: Ioss_Decomposition.h:74
Ioss::BlockDecompositionData::ioss_count
size_t ioss_count() const
Definition: Ioss_Decomposition.h:67
Ioss::Decomposition::communicate_element_data
void communicate_element_data(T *file_data, T *ioss_data, size_t comp_count) const
Definition: Ioss_Decomposition.C:1363
Ioss::Decomposition::importElementIndex
std::vector< INT > importElementIndex
Definition: Ioss_Decomposition.h:336
Ioss::Decomposition::exportElementMap
std::vector< INT > exportElementMap
Definition: Ioss_Decomposition.h:338
Ioss::BlockDecompositionData::localIossOffset
size_t localIossOffset
Definition: Ioss_Decomposition.h:88
Ioss::ParallelUtils
Definition: Ioss_ParallelUtils.h:49
Ioss::BlockDecompositionData::section_
int section_
Definition: Ioss_Decomposition.h:72
Ioss::Decomposition::calculate_element_centroids
void calculate_element_centroids(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
Definition: Ioss_Decomposition.C:399
Ioss::Decomposition::localElementMap
std::vector< INT > localElementMap
Definition: Ioss_Decomposition.h:332
Ioss::BlockDecompositionData::zone_
int zone_
Definition: Ioss_Decomposition.h:71
Ioss::Decomposition::m_spatialDimension
int m_spatialDimension
Definition: Ioss_Decomposition.h:265
Ioss::BlockDecompositionData::zoneNodeOffset
size_t zoneNodeOffset
Definition: Ioss_Decomposition.h:80
Ioss::Decomposition::get_local_element_list
void get_local_element_list(const ZOLTAN_ID_PTR &export_global_ids, size_t export_count)
Definition: Ioss_Decomposition.C:952
Ioss::Decomposition::importElementCount
std::vector< INT > importElementCount
Definition: Ioss_Decomposition.h:335
Ioss::BlockDecompositionData::importCount
std::vector< int > importCount
Definition: Ioss_Decomposition.h:100
Ioss::BlockDecompositionData::zone
int zone() const
Definition: Ioss_Decomposition.h:63
Ioss::Decomposition::m_importPreLocalNodeIndex
size_t m_importPreLocalNodeIndex
Definition: Ioss_Decomposition.h:274
Ioss::Decomposition::ioss_node_count
size_t ioss_node_count() const
Definition: Ioss_Decomposition.h:154
Ioss::Decomposition::elemGTL
std::map< INT, INT > elemGTL
Definition: Ioss_Decomposition.h:360
Ioss::Decomposition::importNodeMap
std::vector< INT > importNodeMap
Definition: Ioss_Decomposition.h:349
Ioss::SetDecompositionData::distributionFactorValue
double distributionFactorValue
Definition: Ioss_Decomposition.h:141
Ioss::Decomposition::get_local_node_list
void get_local_node_list()
Definition: Ioss_Decomposition.C:1014
Ioss::MapContainer
std::vector< int64_t > MapContainer
Definition: Ioss_Map.h:48
Ioss::Decomposition::zoltan_decompose
void zoltan_decompose(Zoltan &zz)
Definition: Ioss_Decomposition.C:820
Ioss::Decomposition::m_nodeCount
size_t m_nodeCount
Definition: Ioss_Decomposition.h:272
MPI_Comm
int MPI_Comm
Definition: Ioss_CodeTypes.h:96
Ioss::Decomposition::exportNodeCount
std::vector< INT > exportNodeCount
Definition: Ioss_Decomposition.h:345
Ioss::Decomposition::internal_metis_decompose
void internal_metis_decompose(std::vector< BlockDecompositionData > &el_blocks, idx_t *element_dist, idx_t *pointer, idx_t *adjacency, idx_t *elem_partition)
Definition: Ioss_Decomposition.C:733
Ioss::Decomposition::communicate_node_data
void communicate_node_data(T *file_data, T *ioss_data, size_t comp_count) const
Definition: Ioss_Decomposition.C:1670
Ioss::Decomposition::m_elementDist
std::vector< INT > m_elementDist
Definition: Ioss_Decomposition.h:355
Ioss::Decomposition::m_globalNodeCount
size_t m_globalNodeCount
Definition: Ioss_Decomposition.h:271
Ioss::Decomposition::exportElementIndex
std::vector< INT > exportElementIndex
Definition: Ioss_Decomposition.h:340
Ioss::SetDecompositionData::root_
int root_
Definition: Ioss_Decomposition.h:135
Ioss_CodeTypes.h
Ioss::SetDecompositionData::id_
int64_t id_
Definition: Ioss_Decomposition.h:131
Ioss::Decomposition::global_node_count
size_t global_node_count() const
Definition: Ioss_Decomposition.h:152
Ioss::SetDecompositionData::topologyType
std::string topologyType
Definition: Ioss_Decomposition.h:136
Ioss::Decomposition::m_fileBlockIndex
std::vector< size_t > m_fileBlockIndex
Definition: Ioss_Decomposition.h:290
Ioss::ParallelUtils::progress
void progress(const std::string &output) const
Definition: Ioss_ParallelUtils.C:522
Ioss::BlockDecompositionData::BlockDecompositionData
BlockDecompositionData()=default
Ioss::Decomposition::importElementMap
std::vector< INT > importElementMap
Definition: Ioss_Decomposition.h:334