flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_decomposition_policy.cpp File Reference

ctest decomposition_policy: the census of the default ("auto") level-0 decomposition against the legacy aligned ORB (doc/vof_distributed_partition_design.md §5.2, §7). More...

#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <map>
#include <set>
#include <string>
#include <vector>
#include "mac_cutcell_mg.hpp"

Go to the source code of this file.

Macros

#define CHECK(cond, ...)

Typedefs

using Dec = peclet::core::decomp::BlockDecomposer<3>

Functions

int main ()

Detailed Description

ctest decomposition_policy: the census of the default ("auto") level-0 decomposition against the legacy aligned ORB (doc/vof_distributed_partition_design.md §5.2, §7).

Pure host function (CutcellMG::decomposition), no MPI launch, no Kokkos initialisation.

Census: the design's grids plus every grid flow's MPI ctests and coupling's MPI tests decompose, at np 1..8, 12, 16, 24, 32, 48, 96 (and 192 on 128x96x64). For each configuration, auto = levels 0, legacy = levels 1:

  1. legacy exact => auto == legacy (origins, sizes, tree split positions);
  2. maxCells(auto) <= maxCells(legacy);
  3. nestDepth(auto) >= min(nestDepth(legacy), 3), and nestDepth(auto) >= nestDepth(legacy) whenever auto took a coarse-first partition (neither legacy nor the balance-aware aligned ORB A2, recomputed here; review 2026-10-20 #3);
  4. 128x96x64 at np 3/12/24/32/96 (and 192): max == min, >= 4 in-place halvings (evenness);
  5. 48^3 at np 4: max == min;
  6. two calls identical;
  7. splitAxes(auto) is a subset of splitAxes(legacy), and equal to it unless legacy's max/mean >= 5/4 (the WO-D guard, §13.4(2)); a configuration the guard reverts (the auto policy without the guard, recomputed here, differs from auto) has auto == legacy;
  8. 768x128x256 and 480x80x160 at np 2..32: a legacy partition that keeps y whole keeps it;
  9. levels 2..7 (the legacy coarse-first search) on the published configurations – foxberry 384^3 and 400^3, channel_dns 377/754/1508/3016 x 240 x 503 and 384x128x128 – reproduce the pre-partition partitions bit for bit (CutcellMG::fingerprint recorded from core fcb3b06 + flow 91964b7; review 2026-10-20 #1);

at np > 1, nestDepth(d) == the leading in-place coarsenings (rows neither telescoped nor final) of CutcellMG::predict(telescope = true, min_extent = 4), capped at 4, for d = auto and legacy: nestDepth re-implements initMpi's telescope trigger (review 2026-10-20 #4); plus the §9 block shapes of 128x96x64 at np 3, 24 (np 12: legacy's, the guard reverts it), and np 192 = one 16^3 block per rank. Prints the CHANGED list (auto != legacy): the state-hash re-baseline list; and the REVERTED list (WO-D) over the census and the §13.4(2) replica set (the design grids also at np 9, 10, 15, 20; the channel grids at np 2..32).

Definition in file test_decomposition_policy.cpp.

Macro Definition Documentation

◆ CHECK

#define CHECK ( cond,
... )
Value:
do { \
if (!(cond)) { \
std::printf("FAIL "); \
std::printf(__VA_ARGS__); \
std::printf("\n"); \
++fails; \
} \
} while (0)
static int fails

Definition at line 50 of file test_decomposition_policy.cpp.

Referenced by main().

Typedef Documentation

◆ Dec

using Dec = peclet::core::decomp::BlockDecomposer<3>

Definition at line 43 of file test_decomposition_policy.cpp.

Function Documentation

◆ main()