|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page is the developer-oriented map of the current PICurv C codebase.
src/simulator.csrc/postprocessor.cBoth rely on shared setup/context infrastructure from setup.c, io.c, and variables.h.
High-level stages:
PetscInitializeCreateSimulationContext (setup.c) parses control/options and initializes defaultsSetupSimulationEnvironment configures run directories and environment-dependent logging setupSetupGridAndSolversSetupBoundaryConditionsSetupDomainRankInfoInitializeEulerianStateInitializeParticleSwarm (if particles enabled)AdvanceSimulationFinalizeSimulation + PetscFinalizepost.run) into PostProcessParams.vts, .vtp) and statistics CSV outputsinclude/variables.hCreateSimulationContextDM, vectors, metrics, block-local geometry)For contributor orientation, the table below lists high-value public entry points per subsystem. Function names come from include/*.h and represent the safest integration seams.
runloop.c, solvers.cCurrent tests cover all src/*.c files at least at module level (unit suites and/or smoke). Coverage depth is intentionally uneven:
setup.c, io.c, runloop.c, postprocessor.c) are mainly covered by smoke and Python orchestration tests.Metric.c, rhs.c, poisson.c, post kernels) are covered by targeted C unit suites plus smoke.walkingsearch.c, wallfunction.c, Filter.c) are covered by specific unit cases but still benefit from deeper function-level API prose.When adding docs, prioritize:
Primary ingestion sites:
setup.c: PETSc option parsing for solver/post shared runtime controlsio.c: grid read/generation inputs, restart/data IO, post recipe parsingLOG_LEVEL)Not all option consumption is explicit PetscOptionsGet*; PETSc dynamic ingestion also occurs through calls like KSPSetFromOptions in poisson.c.
postprocessing_kernels.cpicurvParticlePhysics.c/ParticleMotion.c interfaceThis page describes Code Architecture within the PICurv workflow. For CFD users, the most reliable reading strategy is to map the page content to a concrete run decision: what is configured, what runtime stage it influences, and which diagnostics should confirm expected behavior.
Treat this page as both a conceptual reference and a runbook. If you are debugging, pair the method/procedure described here with monitor output, generated runtime artifacts under runs/<run_id>/config, and the associated solver/post logs so numerical intent and implementation behavior stay aligned.