BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Mesh_Partitioner.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_CL_MESH_PARTITIONER_HPP
13#define BELFEM_CL_MESH_PARTITIONER_HPP
14
15
16
17#include "graph_typedefs.hpp"
18#include "cl_Mesh.hpp"
19
20
21namespace belfem
22{
23 namespace mesh
24 {
25
26
28 {
29 Mesh * mMesh;
30
31 const metis_t mNumberOfPartitions;
32
33 Vector< metis_t > mPartition;
34
35 const bool mForceContiguousPartitions = true ;
36
37 const bool mResetVertexContainers = true ;
38//------------------------------------------------------------------------------
39 public:
40//------------------------------------------------------------------------------
41
42 Partitioner( Mesh * aMesh,
43 const uint aNumberOfPartitions,
44 bool aSetProcOwnerships = true,
45 bool aForceContiguousPartitions = true,
46 bool aResetVertexContainers = true );
47
48//------------------------------------------------------------------------------
49
51
52//------------------------------------------------------------------------------
53
57 const Vector < metis_t > &
58 partition();
59
60//------------------------------------------------------------------------------
61 private:
62//------------------------------------------------------------------------------
63
64 void
65 create_graph( Graph & aGraph );
66
67//------------------------------------------------------------------------------
68
69 void
70 run_metis( Graph & aGraph );
71
72//------------------------------------------------------------------------------
73
74 void
75 set_element_owners();
76
77//------------------------------------------------------------------------------
78
79 void
80 fix_facet_related_ownerships( );
81
82//------------------------------------------------------------------------------
83 };
84 }
85}
86#endif //BELFEM_CL_MESH_PARTITIONER_HPP
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
const Vector< metis_t > & partition()
returns a vector containing the partitioning data
Definition cl_Mesh_Partitioner.cpp:291
Partitioner(Mesh *aMesh, const uint aNumberOfPartitions, bool aSetProcOwnerships=true, bool aForceContiguousPartitions=true, bool aResetVertexContainers=true)
Definition cl_Mesh_Partitioner.cpp:26
Definition cl_EF_EdgeFunction.hpp:17
USER GUIDES:
Definition cl_Capacitor.cpp:16
Cell< graph::Vertex * > Graph
Definition cl_Graph_Vertex.hpp:329
unsigned int uint
Definition typedefs.hpp:30
int metis_t
Definition graph_typedefs.hpp:53