|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
PICurv testing is intentionally layered: Python control-plane validation, PETSc installation checks, focused C unit suites, executable smoke runs, MPI variants, and coverage gates. Choose the narrowest layer that answers your current question.
Function-level docs in tests/c/ are part of the repository contract. For new or touched C tests/helpers, keep the Doxygen blocks concise but descriptive: the @brief should state what the routine verifies or sets up, not just that it is a test-local routine.
python3 scripts/audit_function_docs.pymake test-python (make test alias)make coverage-pythonmake coverage-cmake coveragemake doctor (make install-check alias)make unitmake unit-geometrymake unit-setupmake unit-solvermake unit-particlesmake unit-iomake unit-loggingmake unit-postmake unit-gridmake unit-metricmake unit-boundariesmake unit-poisson-rhsmake unit-runtimemake unit-simulationmake unit-mpimake unit-periodic-devmake smokemake smoke-mpimake smoke-mpi-matrixmake smoke-stressmake smoke-periodic-devmake checkmake check-mpimake check-mpi-matrixmake check-fullmake check-stresstest_cli_smoke.pysubmit, cancel, and sweepsummarize JSON/text output plus failure pathspicurvtest_case_maintenance.pyinit origin metadata behaviorbuild, sync-binaries, sync-config, status-source, and pull-sourceoverwrite, prune)status-source)test_config_regressions.pytest_repo_consistency.pypicurv validatetest_install_check.c: PETSc environment and basic object viability (doctor: environment-visible, basic-petsc-objects)test_geometry.c: interpolation and geometric signed-distance helperstest_setup_lifecycle.c: setup/cleanup lifecycle, RNG, and initialized particle-settlement contractstest_solver_kernels.c: analytical geometry/particle dispatch, LES filter/eddy-viscosity, FlowSolver guardrails, and analytical source helperstest_particle_kernels.c: walking-search helper kernelstest_io.c: I/O path checks, parser helpers, scaling-ingestion contracts, and startup-banner summary contractstest_logging.c: log-level, allow-list, string-conversion, continuity/min-max/interpolation diagnostics, profiling, and snapshot-cadence contractstest_postprocessing.c: post-processing kernel contracts (specific-KE, displacement, nodal average, normalization, dimensionalization, Q-criterion)test_vtk_io.c: VTK writer and data-preparation contracts (coordinates, field gather/subsampling, particle prep)test_postprocessor.c: postprocessing orchestration contracts (swarm setup, pipeline dispatch, eulerian/particle output, statistics dispatch)test_statistics.c: statistics kernel contracts (MSD CSV output and empty-swarm behavior)test_grid.c: local/global bounding-box helperstest_metric.c: metric inversion, contravariant velocity, face geometry helperstest_boundaries.c: boundary factory plus direct handler-behavior checkstest_periodic_dev.c: non-gating periodic geometric/driven boundary harnessestest_poisson_rhs.c: pressure update, RHS, projection, body-force and diffusivity helperstest_runtime_kernels.c: setup/runloop/particle/interpolation/scatter/wall/walltime-guard/LES helper contractstest_mpi_kernels.c: multi-rank particle distribution, bbox collectives, and restart migration behaviortest_support.ctest_support.hda/fda/swarm contract (da = IM+1/JM+1/KM+1, coordinate-DM fda, production swarm fields)Single-rank smoke (make smoke) verifies:
-help launch viability (simulator, postprocessor)62 (PETSC_ERR_ARG_WRONG) and still satisfy the smoke contractpicurv init self-contained case creation and metadatainit + validate + dry-run checks (flat_channel, bent_channel, brownian_motion)load, init)Opt-in stress smoke (make smoke-stress) additionally verifies:
Periodic development smoke (make smoke-periodic-dev) is separate and non-gating:
make check, make check-full, or make coverage-cMulti-rank smoke (make smoke-mpi, make smoke-mpi-matrix) additionally verifies:
Useful env knobs:
TEST_MPI_NPROCS for unit-mpiSMOKE_MPI_NPROCS for smoke-mpiSMOKE_MPI_MATRIX_NPROCS for smoke-mpi-matrixKEEP_SMOKE_TMP=1 to preserve smoke temp workspace for debuggingscripts/picurv or YAML contracts:make test-pythonpython3 scripts/audit_function_docs.pymake unit-<area>make unit-setupmake unit-simulationmake unit-periodic-devmake smoke-periodic-devmake smoke plus MPI variant if rank behavior is involvedmake smoke-stressmake check (or make check-mpi)make check-fullmake coverageLocateParticleOrFindMigrationTarget boundary-clamp, ghost-handoff, tie-breaker, LOST, and MIGRATING_OUT branchesGuessParticleOwnerWithBBox heuristicMomentumSolver_Explicit_RungeKutta4MomentumSolver_DualTime_Picard_RK4PoissonSolver_MG and periodic/IBM stencil checks beyond the current Projection/PoissonLHSNew helper surface2026-03-20 audit snapshot: src/AnalyticalSolutions.c (23.93%) and src/BodyForces.c (11.69%) still need direct unit harnesses2026-03-20 audit snapshot: src/les.c (22.58%) still needs broader LES-model-path coverage2026-03-20 audit snapshot: src/poisson.c (45.66%) and src/rhs.c (61.95%) still need deeper direct branch coverage2026-03-20 audit snapshot: src/runloop.c (64.76%) still needs more runtime-orchestration branch coverage2026-03-20 audit snapshot: src/Boundaries.c (68.10%) still needs additional non-periodic boundary edge-case coverageunit-periodic-dev and smoke-periodic-dev until the product runtime path is stable enough for the default gatepython scripts/audit_function_docs.py, then pytest -q, then markdown link checks.doctor, unit-*, smoke*, check*, and coverage-c require PETSc/MPI tooling.check-full is the single-command comprehensive gate (check + unit-mpi + smoke-mpi + smoke-mpi-matrix).check-stress extends check-full with the opt-in smoke-stress layer.install-check, ctest-*) still exist, but canonical names are preferred in docs and CI.