core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
block_decomposer.hpp File Reference
#include <array>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <limits>
#include <stack>
#include <vector>
#include "peclet/core/common/types.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::decomp::Block< Dim >
 A rank-owned axis-aligned block of the global cell grid. More...
 
class  peclet::core::decomp::BlockDecomposer< Dim >
 Orthogonal recursive bisection of a Dim-dimensional global cell grid into numBlocks axis-aligned blocks; by the suite's convention block b is owned by rank b. More...
 
struct  peclet::core::decomp::AlignedWeightedChoice< Dim >
 What chooseAlignedWeighted returns: the partition, the alignment exponent a (align = 2^a on every axis; 0 = the plain weighted ORB) and that partition's weightImbalance, for logging. More...
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::decomp
 

Functions

template<int Dim>
Real peclet::core::decomp::weightImbalance (const BlockDecomposer< Dim > &dec, const std::vector< Real > &weights)
 Weight imbalance of a decomposition — the balancer's own metric: the heaviest block's total weight over the mean, max_b W(b) / (W_total / numBlocks).
 
template<std::size_t N, int Dim = static_cast<int>(N)>
AlignedWeightedChoice< Dim > peclet::core::decomp::chooseAlignedWeighted (std::size_t numBlocks, const std::array< Index, N > &G, const std::vector< Real > &weights, Real budget=1.05, int aMax=std::numeric_limits< int >::max())
 Choose the alignment of a weighted ORB from an imbalance budget (amr/docs/ amr_mg_core_boundary.md §11.4): the LARGEST a whose coarse-first aligned weighted ORB (init(numBlocks, G, weights, {2^a,…})) has weightImbalance <= budget, else a = 0 with today's partition, init(numBlocks, G, weights), bit for bit — never worse than now.