C unit tests for grid bounding-box helper routines. More...
Go to the source code of this file.
Functions | |
| static PetscErrorCode | TestComputeLocalBoundingBoxUniformGrid (void) |
| Tests local bounding-box construction on a uniform grid. | |
| static PetscErrorCode | TestGatherAndBroadcastBoundingBoxes (void) |
| Tests collective gather and broadcast of rank-local bounding boxes. | |
| static PetscErrorCode | TestReadGridGenerationInputsNonDimensionalizesBounds (void) |
| Tests that programmatic domain bounds are non-dimensionalized by L_ref. | |
| static PetscErrorCode | TestBalanceCoarsestOwnershipBalancesFinestLevel (void) |
| Tests that the coarsest split puts each refined finest-level boundary nearest its share. | |
| static PetscErrorCode | TestOversizedGridIsRefusedOn32BitIndices (void) |
| Tests that a grid too large for 32-bit PetscInt is refused before its DMs are created. | |
| int | main (int argc, char **argv) |
| Runs the unit-grid PETSc test binary. | |
C unit tests for grid bounding-box helper routines.
Definition in file test_grid.c.
|
static |
Tests local bounding-box construction on a uniform grid.
Definition at line 16 of file test_grid.c.
|
static |
Tests collective gather and broadcast of rank-local bounding boxes.
Definition at line 42 of file test_grid.c.
|
static |
Tests that programmatic domain bounds are non-dimensionalized by L_ref.
A file-backed grid is divided by the reference length when the conductor publishes it as an asset; a programmatic grid has no such staging step, so ReadGridGenerationInputs() must perform the same division so all three grid modes take dimensional user input and the postprocessor's unconditional Coordinates * L_ref round-trips correctly.
Definition at line 88 of file test_grid.c.
|
static |
Tests that the coarsest split puts each refined finest-level boundary nearest its share.
128 cells on 4 ranks at 3 levels: PETSc's even coarsest split (9,9,8,8 of 34 points) refines to finest owned cells 33/36/32/27; 9,8,8,9 refines to 33/32/32/31, the best refinement allows. Unrefined, the last rank takes both spare points of 130, 32/32/32/34, so each owns 32 cells, which PETSc's 33/33/32/32 does not.
Definition at line 156 of file test_grid.c.
|
static |
Tests that a grid too large for 32-bit PetscInt is refused before its DMs are created.
1300^3 cells give 1301^3 nodes, whose 3-component fields need about 6.6e9 entries. A 64-bit-index build indexes them, so the test applies to 32-bit builds only.
Definition at line 176 of file test_grid.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-grid PETSc test binary.
Definition at line 211 of file test_grid.c.