|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
C unit tests for setup, initialization, and cleanup lifecycle entry points. More...
#include "test_support.h"#include "ParticleSwarm.h"#include "initialcondition.h"#include "runloop.h"#include "setup.h"#include <stdio.h>#include <string.h>Go to the source code of this file.
Functions | |
| static PetscErrorCode | AssertDirectoryExists (const char *path, const char *context) |
| Asserts that a directory path exists and is readable. | |
| static PetscErrorCode | WriteContextOnlyFile (const char *path, const char *contents) |
| Writes one small temporary text file used by the partial-lifecycle context-only fixture. | |
| static PetscErrorCode | PrepareContextOnlyConfig (char *tmpdir, size_t tmpdir_len, char *control_path, size_t control_path_len) |
| Creates the control-file bundle needed for the context-only cleanup test. | |
| static PetscErrorCode | FreeLifecycleContext (SimCtx **simCtx_ptr) |
| Finalizes and frees one lifecycle test context, then clears any PETSc options used to build it. | |
| static PetscErrorCode | BuildLifecycleContext (PetscBool enable_particles, SimCtx **simCtx_out, char *tmpdir, size_t tmpdir_len) |
| Builds a full setup fixture through environment, grid, BC, and domain-rank initialization. | |
| static PetscErrorCode | BuildContextOnly (SimCtx **simCtx_out, char *tmpdir, size_t tmpdir_len) |
| Builds only the top-level simulation context used by partial-initialization cleanup tests. | |
| static PetscErrorCode | TestSharedRuntimeFixtureContracts (void) |
| Tests that the shared richer runtime fixture mirrors normalized production setup contracts. | |
| static PetscErrorCode | TestSetupLifecycleCoreSolverSetup (void) |
| Tests the core setup lifecycle through environment, grid, BC, rank-info, and Eulerian-state initialization. | |
| static PetscErrorCode | TestSetupLifecycleParticleInitialization (void) |
| Tests particle-swarm initialization and deterministic settlement on a tiny fully initialized case. | |
| static PetscErrorCode | TestSetupLifecycleRandomGeneratorsAndCleanup (void) |
| Tests standalone RNG initialization helpers and minimal-context cleanup. | |
| static PetscErrorCode | TestSetupLifecycleCleanupAcrossInitializationStates (void) |
| Tests cleanup after partial and fuller setup states without requiring unsupported double-finalization behavior. | |
| int | main (int argc, char **argv) |
| Runs the unit-setup PETSc test binary. | |
C unit tests for setup, initialization, and cleanup lifecycle entry points.
Definition in file test_setup_lifecycle.c.
|
static |
Asserts that a directory path exists and is readable.
Definition at line 19 of file test_setup_lifecycle.c.
|
static |
Writes one small temporary text file used by the partial-lifecycle context-only fixture.
Definition at line 32 of file test_setup_lifecycle.c.
|
static |
Creates the control-file bundle needed for the context-only cleanup test.
Definition at line 47 of file test_setup_lifecycle.c.
|
static |
Finalizes and frees one lifecycle test context, then clears any PETSc options used to build it.
Definition at line 134 of file test_setup_lifecycle.c.
|
static |
Builds a full setup fixture through environment, grid, BC, and domain-rank initialization.
Definition at line 144 of file test_setup_lifecycle.c.
|
static |
Builds only the top-level simulation context used by partial-initialization cleanup tests.
Definition at line 154 of file test_setup_lifecycle.c.
|
static |
Tests that the shared richer runtime fixture mirrors normalized production setup contracts.
Definition at line 172 of file test_setup_lifecycle.c.
|
static |
Tests the core setup lifecycle through environment, grid, BC, rank-info, and Eulerian-state initialization.
Definition at line 198 of file test_setup_lifecycle.c.
|
static |
Tests particle-swarm initialization and deterministic settlement on a tiny fully initialized case.
Definition at line 239 of file test_setup_lifecycle.c.
|
static |
Tests standalone RNG initialization helpers and minimal-context cleanup.
Definition at line 278 of file test_setup_lifecycle.c.
|
static |
Tests cleanup after partial and fuller setup states without requiring unsupported double-finalization behavior.
Definition at line 323 of file test_setup_lifecycle.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Runs the unit-setup PETSc test binary.
Definition at line 351 of file test_setup_lifecycle.c.