BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
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
21
namespace
belfem
22
{
23
namespace
mesh
24
{
25
26
27
class
Partitioner
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
50
~Partitioner
();
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
cl_Mesh.hpp
belfem::Mesh
Top-level container for all mesh entities.
Definition
cl_Mesh.hpp:60
belfem::Vector< metis_t >
belfem::mesh::Partitioner::partition
const Vector< metis_t > & partition()
returns a vector containing the partitioning data
Definition
cl_Mesh_Partitioner.cpp:291
belfem::mesh::Partitioner::Partitioner
Partitioner(Mesh *aMesh, const uint aNumberOfPartitions, bool aSetProcOwnerships=true, bool aForceContiguousPartitions=true, bool aResetVertexContainers=true)
Definition
cl_Mesh_Partitioner.cpp:26
graph_typedefs.hpp
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::Graph
Cell< graph::Vertex * > Graph
Definition
cl_Graph_Vertex.hpp:329
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
belfem::metis_t
int metis_t
Definition
graph_typedefs.hpp:53
src
mesh
cl_Mesh_Partitioner.hpp
Generated by
1.18.0