|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page documents how the PETSc-backed C testing layer is structured and how to extend it safely.
Key directories:
tests/c/: C test sources and shared fixture helperstests/smoke/: executable smoke runner and reserved tiny fixture directoriestests/fixtures/: Python/control-plane YAML fixturesCurrent C files:
test_support.htest_support.ctest_install_check.ctest_geometry.ctest_solver_kernels.ctest_particle_kernels.ctest_io.ctest_postprocessing.cCanonical user-facing targets:
make doctormake unitmake unit-geometrymake unit-solvermake unit-particlesmake unit-iomake unit-postmake smokemake checkCompatibility aliases (install-check, ctest*) should be preserved for continuity, but documentation and new contributor guidance should always prefer the canonical names.
Use this rule set:
doctor:unit-*:smoke:test-python:scripts/picurv, schema, and repository metadata behaviorIf a test can run against a small local fixture without invoking the full executables, it almost always belongs in unit-*.
tests/c/test_support.* provides the shared PETSc-backed fixture layer.
Current responsibilities:
SimCtx and UserCtx fixturesDMDA objectsDMSwarm objects/tmpFuture C tests should reuse these helpers instead of rebuilding fixtures inline unless a suite truly needs a specialized setup.
Naming:
test_io.c -> make unit-io)Assertions:
Tolerances:
1e-12 for algebraic invariants1e-10 to 1e-9 for interpolation and I/O round-tripsRules:
/tmp/tmp/picurv-test-*) so a failed test can be debugged manuallyRecommended workflow:
tests/c/test_<area>.c filetest_support.*Makefileunit-<area> target