|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
C unit tests for pointwise spatial target resolution. More...
Go to the source code of this file.
Macros | |
| #define | TARGET_TEST_N 6 /* fixture size; DMDA is TARGET_TEST_N + 1 per dimension */ |
| #define | TARGET_CELL_EXTENT 5 /* cell-like span: indices [1, 6) */ |
| #define | TARGET_NODE_EXTENT 6 /* node-like nonperiodic span: indices [0, 6) */ |
Functions | |
| static PetscErrorCode | PlanCount (UserCtx *user, FieldId field_id, PetscInt *count) |
| Builds a plan and returns its global point count. | |
| static PetscErrorCode | TestCellCenteredExcludesBoundaryAndDummy (void) |
| Cell-centered fields must exclude the dummy slot and the extra high slot. | |
| static PetscErrorCode | TestFaceLayoutsAreNodeLikeInOwnDirection (void) |
| Each face family is node-like in exactly its own direction. | |
| static PetscErrorCode | TestPeriodicDirectionsDropDuplicatePlane (void) |
| Periodic directions must drop the wrapped duplicate plane. | |
| static PetscErrorCode | TestComponentStaggeredRejected (void) |
| Component-staggered fields cannot share one pointwise domain and are rejected. | |
| static PetscErrorCode | TestFluidMaskThreshold (void) |
| The fluid mask admits fluid cells and rejects blanked ones at the documented threshold. | |
| static PetscErrorCode | TestCellSpanAgreesWithOwnedCellRange (void) |
| The cell-centered span must agree with the existing owned-cell helper. | |
| int | main (int argc, char **argv) |
| Entry point for the spatial target suite. | |
C unit tests for pointwise spatial target resolution.
Covers the Stage 2 acceptance items in Field Statistics Phase 2 Implementation Specification section 13: cell, node, and I/J/K-face layouts, and nonperiodic, mixed, and fully periodic domains with no duplicate planes.
The fixture builds a DMDA of size n + 1 per dimension, so with n = 6 each dimension has seven slots: one extra non-physical high-side slot, and under the solver's shifted convention a boundary/dummy slot at index zero.
Definition in file test_statistics_target.c.
| #define TARGET_TEST_N 6 /* fixture size; DMDA is TARGET_TEST_N + 1 per dimension */ |
Definition at line 20 of file test_statistics_target.c.
| #define TARGET_CELL_EXTENT 5 /* cell-like span: indices [1, 6) */ |
Definition at line 21 of file test_statistics_target.c.
| #define TARGET_NODE_EXTENT 6 /* node-like nonperiodic span: indices [0, 6) */ |
Definition at line 22 of file test_statistics_target.c.
Builds a plan and returns its global point count.
Definition at line 25 of file test_statistics_target.c.
|
static |
Cell-centered fields must exclude the dummy slot and the extra high slot.
Definition at line 36 of file test_statistics_target.c.
|
static |
Each face family is node-like in exactly its own direction.
Definition at line 75 of file test_statistics_target.c.
|
static |
Periodic directions must drop the wrapped duplicate plane.
The periodic repair algorithms write index zero and the final slot from the opposite side, so both are dependent duplicates. A node-like direction therefore loses one entry under periodicity, while a cell-like direction is unchanged because its duplicates were already outside the span.
Definition at line 107 of file test_statistics_target.c.
|
static |
Component-staggered fields cannot share one pointwise domain and are rejected.
Definition at line 152 of file test_statistics_target.c.
|
static |
The fluid mask admits fluid cells and rejects blanked ones at the documented threshold.
Definition at line 187 of file test_statistics_target.c.
|
static |
The cell-centered span must agree with the existing owned-cell helper.
GetOwnedCellRange reports cells by their origin node index, while field storage uses the solver's shifted convention where the cell with origin j lives at array index j + 1. The two therefore describe the same cells in different index spaces. This pins that relationship so the target plan and the established helper cannot drift apart.
Definition at line 221 of file test_statistics_target.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Entry point for the spatial target suite.
Definition at line 250 of file test_statistics_target.c.