C unit tests for particle walking-search helpers and the initial-value expression engine. More...
#include "test_support.h"#include "walkingsearch.h"#include "ParticleInitialConditions.h"#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| static PetscErrorCode | TestCheckCellWithinLocalGrid (void) |
| Tests whether a cell index lies within the local grid ownership range. | |
| static PetscErrorCode | TestInitializeTraversalParameters (void) |
| Tests initialization of traversal parameters for particle search. | |
| static PetscErrorCode | TestRetrieveCurrentCell (void) |
| Tests retrieval of the current cell from logical particle coordinates. | |
| static PetscErrorCode | TestExpressionConformance (void) |
| Tests the runtime evaluator against every shared conformance case. | |
| static PetscErrorCode | TestExpressionRejectsOutsideLanguage (void) |
| Tests that the compiler refuses what the Python validator also refuses. | |
| static PetscErrorCode | TestExpressionDrawsArePureAndKeyed (void) |
| Tests that random draws are pure functions of their key. | |
| int | main (int argc, char **argv) |
| Runs the unit-particles PETSc test binary. | |
Variables | |
| static const char *const | kConformanceNames [] = {"x", "y", "z"} |
C unit tests for particle walking-search helpers and the initial-value expression engine.
Definition in file test_particle_kernels.c.
|
static |
Tests whether a cell index lies within the local grid ownership range.
Definition at line 18 of file test_particle_kernels.c.
|
static |
Tests initialization of traversal parameters for particle search.
Definition at line 40 of file test_particle_kernels.c.
|
static |
Tests retrieval of the current cell from logical particle coordinates.
Definition at line 69 of file test_particle_kernels.c.
|
static |
Tests the runtime evaluator against every shared conformance case.
tests/fixtures/expression_conformance.txt is also evaluated by generators/ic.gen in tests/test_expression_language.py, so the two implementations of the language cannot drift apart unnoticed.
Definition at line 98 of file test_particle_kernels.c.
|
static |
Tests that the compiler refuses what the Python validator also refuses.
Definition at line 136 of file test_particle_kernels.c.
|
static |
Tests that random draws are pure functions of their key.
The same particle always draws the same number; a different particle, event, or field default stream draws independently; an explicit stream is shared across fields; and the normal draw has zero mean and unit variance.
Definition at line 169 of file test_particle_kernels.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-particles PETSc test binary.
Definition at line 219 of file test_particle_kernels.c.
|
static |
Definition at line 90 of file test_particle_kernels.c.