PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
Developer Ingestion Map

This page maps configuration flow from YAML schema to generated artifacts and C ingestion/use sites.

1. End-to-End Flow

  1. picurv validates YAML inputs.
  2. picurv generates *.control, bcs*.run, and post.run, plus optional whitelist.run / profile.run sidecars when those features are enabled.
  3. CreateSimulationContext() in src/setup.c loads -control_file and ingests options.
  4. Secondary file parsers ingest BC/post/logging profile inputs.
  5. Runtime modules consume parsed values during setup, solve, and postprocess.

2. Mapping Matrix

YAML / Source Key Generated Artifact Key C Ingestion Site Primary Runtime Consumers
case.run_control.* -start_step, -totalsteps, -dt src/setup.c (CreateSimulationContext) src/runloop.c, setup/timestep logic
case.grid.programmatic_settings.im/jm/km/... -im/-jm/-km, bounds, stretch (im/jm/km translated from YAML cell counts to C node counts) src/io.c (ReadGridGenerationInputs) src/grid.c
--ni/--nj/--nk, cluster.execution.decomposition, deprecated case.grid.da_processors_*, or the automatic choice (4.1 MPI Decomposition) -da_processors_x/y/z (solver control); da_processors (post recipe, the postprocessor's own) src/setup.c; src/io.c (ParsePostProcessingSettings) src/grid.c DMDA creation
case.models.domain.blocks -nblk src/setup.c src/grid.c
paired case.boundary_conditions periodic faces BC rows; periodic axes are derived in C src/Boundaries.c, src/io.c (DeterminePeriodicity) src/grid.c DMDA creation, periodic field synchronization
case.models.physics.particles.* -numParticles, -pinit, -particle_restart_mode, -particle_random_seed, -psrc_*, -particle_fields_* src/setup.c, src/ParticleInitialConditions.c (fields) src/ParticleSwarm.c, src/ParticleMotion.c, src/runloop.c (applies fields), statistics kernels
case.models.physics.turbulence.* -les, -les_constant_cs, -les_dynamic_frequency, -les_filter_width, -les_test_filter_kernel, -les_test_filter_width_ratio, -les_averaging_mode, -les_averaging_directions, -les_clip_mode, -les_clip_max_cs, -les_min_viscosity_ratio, -les_gradient_model, -wallfunction, -wall_roughness src/setup.c src/solvers.c, src/les.c, src/Filter.c, src/rhs.c, src/Boundaries.c, src/wallfunction.c
monitor.diagnostics.les.* (deprecated alias case.models.physics.turbulence.les.diagnostics) -les_diagnostics, -les_diagnostics_cadence, -les_yoshizawa_ci src/setup.c src/les.c (LogLESDiagnostics)
solver.interpolation.method -interpolation_method src/setup.c src/interpolation.c (dispatch in InterpolateAllFieldsToSwarm)
case.boundary_conditions bcs*.run rows BC parser path (src/Boundaries.c + helpers) BC handler factory and boundary application
An INLET entry's particles (particles_per_cell, fields) -particle_inlet_count, -particle_inlet_<n>_face, -particle_inlet_<n>_particles_per_cell, -particle_inlet_<n>_fields_* src/ParticleSwarm.c (ParticleInletsCreate), src/ParticleInitialConditions.c (fields) src/ParticleSwarm.c (InjectParticlesAtInlets), src/runloop.c
A prescribed_velocity INLET entry's fluctuations (reynolds_stress, length_scales, time_scale) -inflow_fluctuations, -face_source_<id>_fluct, -face_source_<id>_fluct_stress_<g>_frame, -face_source_<id>_fluct_stress_<g>_expr_<c>, -face_source_<id>_fluct_length, -face_source_<id>_fluct_time src/setup.c (InflowFluctuation allocation), src/BC_Handlers.c (Initialize_InletPrescribedVelocity) src/BC_Handlers.c (StepInletFluctuation), src/io.c (checkpoint)
case.source_random_seed -source_random_seed src/setup.c src/expression.c (cell draws), src/BC_Handlers.c (face draws)
case.sources, case.constants, a prescribed_velocity or moving entry's source/constraints, case.properties.initial_conditions.source source_id in the bcs row; -face_source_<id>_frame, -face_source_<id>_expr_<c>, -face_source_<id>_bulk_velocity, -face_source_<id>_flow_rate, -ic_source_frame, -ic_source_expr_<c>, and for a sum or project -ic_source_field_weight (the staged generator field's scale, beside its -ic_dir) and -ic_source_project src/expression.c (PicurvVelocitySourceCreate), src/BC_Handlers.c (bulk velocity), src/initialcondition.c (field weight, projection) src/BC_Handlers.c (prescribed-velocity inlet), src/initialcondition.c (IC_MODE_SOURCE, ProjectInitialVelocity)
solver.operation_mode.* -euler_field_source src/setup.c src/initialcondition.c, src/grid.c, src/AnalyticalSolutions.c
solver.verification.sources.diffusivity -verification_diffusivity_expr src/verification_sources.c src/verification_sources.c, src/ParticlePhysics.c
solver.verification.sources.scalar -verification_scalar_expr src/verification_sources.c src/verification_sources.c, src/AnalyticalSolutions.c, src/ParticlePhysics.c, src/logging.c
solver.strategy/tolerances/momentum_solver.* solver flags (-mom_*, pseudo-CFL, etc.) src/setup.c src/momentumsolvers.c
solver.momentum_solver.newton_krylov.* application selectors -mom_nk_jacobian_*, -mom_nk_preconditioner_*; prefixed -mom_nk_snes_*, -mom_nk_ksp_* application parsing plus PETSc options db via SNESSetFromOptions() src/momentum_newton_krylov.c
case.properties.fluid.schmidt_number, case.models.physics.turbulence.turbulent_schmidt_number, case.models.physics.particles.iem_constant (deprecated alias solver.scalar_transport.*) -schmidt_number, -turb_schmidt_number, -iem_constant src/setup.c src/ParticlePhysics.c (diffusivity, IEM), src/particle_statistics.c, scalar/particle transport
solver.poisson_solver.* / legacy solver.pressure_solver.* -ps_ksp_*, -ps_pc_type, -mg_*, -ps_mg_levels_* src/setup.c + PETSc options db src/poisson.c
solver.petsc_passthrough_options raw flags in control PETSc options db PETSc KSP/PC stack, mostly in src/poisson.c
monitor.io.data_output_frequency -tio src/setup.c src/io.c, src/setup.c, src/runloop.c
monitor.io.particle_console_output_frequency -particle_console_output_freq src/setup.c src/io.c, src/setup.c, particle console logging
monitor.io.particle_log_interval -logfreq src/setup.c particle console snapshot rows: IDs that are multiples of it, at most 32 per rank
monitor.io.statistics_console_output_frequency -statistics_console_output_freq src/statistics_config.c src/logging.c statistics console snapshot, src/runloop.c
monitor.io.write_initial_checkpoint / write_final_checkpoint -write_initial_checkpoint / -write_final_checkpoint src/setup.c src/io.c WriteCheckpointBundle
fixed run topology canonical -output_dir, -restart_dir, -log_dir, -analysis_dir picurv_cli/core.py, then src/setup.c src/io.c, src/setup.c, src/runloop.c, src/logging.c
monitor.logging.verbosity, monitor.logging.enabled_functions LOG_LEVEL env, whitelist.run src/setup.c + src/logging.c logging macros/system
monitor.logging.trace_particles -picurv_trace_particles src/setup.c LOG_PARTICLE() stage lines (include/logging.h) in src/ParticleMotion.c, src/walkingsearch.c, src/interpolation.c, src/ParticlePhysics.c, src/ParticleSwarm.c
monitor.profiling.* profile.run (selected-mode only) + explicit profiling flags in *.control src/setup.c + profiling init profiler summaries
monitor.diagnostics.petsc.* solver/postprocessor executable arguments (-info, -malloc_*, -log_view, -objects_dump, etc.) PETSc initialization PETSc info/memory/log/object diagnostics
monitor.diagnostics.runtime_memory_log.* -runtime_memory_log_enabled src/setup.c src/logging.c, src/runloop.c, src/postprocessor.c, src/simulator.c
monitor.field_statistics.* -field_statistics_enabled, -field_statistics_window_count, -field_statistics_window_<i>_* src/statistics_config.c (ParseFieldStatisticsConfig) src/statistics_window.c, src/statistics_accumulator.c, src/runloop.c, src/io.c checkpoint state
monitor.solution_monitoring.convergence.* -solution_convergence_enabled/-solution_convergence_mode/-solution_convergence_period_steps/-solution_convergence_window_steps in *.control src/setup.c existing src/logging.c and src/runloop.c convergence path; every completed timestep
cluster.execution.walltime_guard.* -walltime_guard_* in solver *.control src/setup.c src/runloop.c runtime walltime estimator and graceful final-write cutoff
monitor.solver_monitoring.poisson.* prefixed Poisson monitor flags in control (-ps_ksp_*) PETSc options db src/poisson.c KSP monitor setup
monitor.solver_monitoring.momentum.* bare Newton history/SNES/KSP monitor flags (-mom_nk_*) src/setup.c + PETSc options db src/momentum_newton_krylov.c
monitor.solver_monitoring.petsc_passthrough_options raw flags in control PETSc options db PETSc monitors/debug options
post.run_control.* startTime/endTime/timeStep in post.run src/io.c (ParsePostProcessingSettings) src/postprocessor.c main loop, when no step list is given
(conductor, at job start) step_list_file in post.run src/io.c (ParsePostProcessingSettings) ResolvePostProcessingSteps in src/postprocessor.c
(conductor, at staging; 4.1 MPI Decomposition) da_processors in post.run src/io.c (ParsePostProcessingSettings) InitializeSingleGridDM in src/grid.c
post.io.input_extensions.* eulerianExt, particleExt in post.run src/io.c ReadSimulationFields, ReadAllSwarmFields, swarm precheck
post.statistics_pipeline.* statistics_pipeline, statistics_output_prefix src/io.c GlobalStatisticsPipeline dispatch
post.io.paraview_series No PETSc option; conductor-only policy picurv_cli/core.py finalize_post_paraview_series writes PVD collections after field processing
post.field_statistics.* field_statistics_windows, field_statistics_outputs, field_statistics_formats, field_statistics_source_step, field_statistics_homogeneous src/io.c (ParsePostProcessingSettings) FieldStatisticsPipeline in src/postprocessor.c, derivation and homogeneous merge in src/statistics_accumulator.c, profile in src/postprocessing_kernels.c
post.field_statistics.ensembles[] field_statistics_ensemble_count, field_statistics_ensemble_<n>_*, forwarded by src/io.c to the options -field_statistics_ensemble_<n>_* src/statistics_config.c (ParsePostStatisticsEnsembles, sharing the window field and covariance parser) FieldStatisticsPipeline in src/postprocessor.c; particle cells via PicurvWindowStorageFromParticles
post.spectra.* (digest only) spectra_signature src/io.c (ParsePostProcessingSettings) accepted and ignored; exists so a changed spectra recipe reaches the recipe fingerprint each step's output record carries

3. Python-Only Orchestration Mapping (No C Ingestion)

These keys are consumed by picurv orchestration only:

YAML / Source Key Generated Artifact Key Ingestion Site Runtime Consumer
cluster.scheduler.type scheduler selector picurv_cli/core.py (validate_cluster_config) run/sweep scheduler dispatch
cluster.resources.* #SBATCH directives picurv_cli/core.py (Slurm renderers) Slurm scheduler
cluster.notifications.* #SBATCH --mail-* picurv_cli/core.py Slurm scheduler
cluster.execution.module_setup pre-launch shell lines in *.sbatch picurv_cli/core.py batch script runtime env
cluster.execution.launcher* launch command (srun/mpirun) picurv_cli/core.py solver and field postprocessor launches
study.base_configs.* per-case config materialization picurv_cli/core.py (sweep_workflow) case generation pipeline
study.parameters case matrix expansion picurv_cli/core.py (expand_parameter_matrix) study case synthesis
study.execution.max_concurrent_array_tasks Slurm array N throttle picurv_cli/core.py Slurm scheduler
study.metrics metrics_table.csv extraction contract picurv_cli/core.py metric extractors study aggregation/reporting
study.plotting results/plots/* output controls picurv_cli/core.py plotting pipeline study reporting
post.spectra.tasks[*] spectra.gen shell-spectrum/plane-spectrum/line-spectrum arguments picurv_cli/core.py (normalize_post_spectra_config) run_post_spectra_stage, generators/spectra.gen
post.spectra.output_prefix spectra CSV basenames under <run.analysis>/spectra/<recipe_id>/ picurv_cli/core.py (post_spectra_task_basename) run_post_spectra_stage
post.reducers.tasks[*] reduce.gen wall-profile/cross-section/profile-series arguments, resolved from the run picurv_cli/core.py (normalize_post_reducers_config) run_post_reducers_stage (from the post finalizer, or --only reducers), generators/reduce.gen

4. Important Exceptions

  • PETSc runtime option consumption is not only explicit PetscOptionsGet*.
  • KSPSetFromOptions in src/poisson.c ingests prefixed PETSc options dynamically.
  • monitor.diagnostics.petsc.* is intentionally emitted as executable arguments rather than control-file rows so PETSc initialization-time options are available before runtime setup reads *.control.
  • LOG_LEVEL is environment-driven (src/logging.c) and intentionally outside control-file parsing.

5. Mode-Dependent Normalization in <tt>picurv</tt>

Some launcher behaviors depend on other config selections before values ever reach C:

  • A generator in case.properties.initial_conditions.source is resolved with its params into a staged Python-generated PETSc vector, planned for precompute, and read by the runtime before it adds the source's expressions. Channel/duct providers validate wall topology and measure selected initial spectra through spectra.gen. resampled_velocity resolves its source_file against the workspace when it runs and hands ic.gen the absolute path; a Ucont result is measured on the velocity the runtime reconstructs from it.
  • A type: file term validates and stages one Ucat or Ucont PETSc vector in the existing ReadFieldData naming layout. With a file-backed grid it also refuses a vector sized for another grid.
  • solver.operation_mode.eulerian_field_source and case.run_control.start_step supersede IC materialization when load or restart state has authority.
  • solver.operation_mode.eulerian_field_source: analytical makes case.properties.initial_conditions.source the field at every step, and accepts case.grid.mode: programmatic_c or case.grid.mode: file.
  • case.properties.initial_conditions.source is an explicit launcher requirement. A source named by a string is looked up in the case's top-level sources:, and its constants are inlined into every expression before the options are written.

This means the YAML contract is intentionally stricter than "whatever C would do with missing options" in several places.

6. Safety-Critical Ingress

Run-owned directories are not user ingress. The generator emits the canonical -output_dir, -restart_dir, -log_dir, and -analysis_dir values after all user-derived flags, and rejects those flags in raw PETSc passthrough. Submission preflight rechecks staged controls, while the C runtime independently checks the log cleanup target immediately before recursive deletion. See 4.2 Fixed Run Trees and Shared Immutable Assets.

7. Drift Prevention

For selector-specific contributor hook points, see Modular Selector Extension Guide.