Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
partition.h
Go to the documentation of this file.
1
12#ifndef PARTITION_H
13#define PARTITION_H
14
15#include <array>
16#include <cstdint>
17#include <vector>
18
19#include "common_typedef.h"
20
21class DistributedMesh;
22
27uint64_t hilbert_key(const std::array<double, N_DIM> & x, const std::array<double, N_DIM> & lo,
28 const std::array<double, N_DIM> & hi);
29
36std::vector<int> partition_hilbert(const DistributedMesh & mesh, int n_parts);
37
42std::array<int, N_DIM> grid_shape(int n_parts, const std::array<double, N_DIM> & extent);
43
52std::vector<int> partition_multijagged(const DistributedMesh & mesh, int n_parts);
53
58std::vector<int> partition_graph(const DistributedMesh & mesh, int n_parts);
59
62
63#endif // PARTITION_H
The mesh during setup, spread over the ranks. Each rank starts from its block of the mesh (cells,...
Definition distributed_mesh.h:50
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
Typedefs for common types.
bool have_graph_partitioner()
Whether this build has a graph partitioner.
Definition partition.cpp:65
std::vector< int > partition_hilbert(const DistributedMesh &mesh, int n_parts)
Owner rank of every block cell of a distributed mesh: cells sorted along the Hilbert curve of their v...
Definition partition.cpp:74
std::array< int, N_DIM > grid_shape(int n_parts, const std::array< double, N_DIM > &extent)
Parts per axis of the grid of n_parts blocks of a box with these extents that has the least total are...
Definition partition.cpp:144
std::vector< int > partition_multijagged(const DistributedMesh &mesh, int n_parts)
Owner rank of every block cell of a distributed mesh by multi-jagged coordinate partitioning (collect...
Definition partition.cpp:185
uint64_t hilbert_key(const std::array< double, N_DIM > &x, const std::array< double, N_DIM > &lo, const std::array< double, N_DIM > &hi)
Position along the Hilbert curve of a point in the box [lo, hi] (any dimension; 63 / N_DIM bits per a...
Definition partition.cpp:27
std::vector< int > partition_graph(const DistributedMesh &mesh, int n_parts)
Owner rank of every block cell of a distributed mesh from dKaMinPar on its dual graph (collective)....
Definition partition.cpp:293