|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page is a contributor-oriented map of how the C solver executes from process start to timestep loop. Use it as a practical companion to architecture and methods pages when modifying solver behavior.
High-level startup sequence:
PetscInitializenp > 0)scripts/pic.flow is the control-plane generator. It writes normalized runtime artifacts under runs/<run_id>/config/ and launches C binaries with -control_file.
Core generated files consumed by C:
*.control (solver flags),bcs.run (boundary face/type/handler + params),whitelist.run and profile.run,grid.run (for file/grid_gen paths),post.run (postprocessor path).Most solver-wide state flows through:
SimCtx: global run configuration, solver controls, pointers to hierarchy and shared runtime services.UserCtx: per-block/per-level field ownership, DM/Vec handles, boundary configs, and local coupling context.BoundaryFaceConfig: per-face mathematical type + handler + param list.position, DMSwarm_CellID, status fields, etc.).Eulerian:
Lagrangian:
StartStep and particle_restart_mode.-pinit.Per-step sequence:
step and time,Concrete output calls in the loop are:
Boundary lifecycle is object-style (function pointers per handler):
bcs.run,Initialize once,PreStep, Apply, optional PostStep) in priority order.Useful entry points:
When adding or changing physics behavior:
solvers.c, rhs.c, poisson.c, Particle*, Boundaries*),SimCtx or UserCtx only when ownership is clear,High-value checks during development:
DisplayBanner summary (BCs, modes, solver selection),ProfilingLogTimestepSummary),pic.flow validate before solver execution.