Control ingress for the field-statistics pipeline. More...
#include "variables.h"Go to the source code of this file.
Functions | |
| PetscErrorCode | ParseFieldStatisticsConfig (SimCtx *simCtx) |
| Resolves field-statistics configuration from the control file. | |
| PetscErrorCode | ParsePostStatisticsEnsembles (SimCtx *simCtx) |
| Resolves the statistics ensembles a post-processing recipe defines. | |
| PetscErrorCode | DestroyFieldStatisticsConfig (SimCtx *simCtx) |
| Releases the window definitions resolved by ParseFieldStatisticsConfig() and the ensembles resolved by ParsePostStatisticsEnsembles(). | |
Control ingress for the field-statistics pipeline.
Resolves the generated master control into the window definitions the rest of the pipeline consumes. The user-facing keys these options come from are documented in 3. field_statistics.
A window list is variable arity, so its option names are constructed rather than literal. Every constructed name belongs to a family declared in the ingress audit manifest, which is what keeps the audit's guarantee intact rather than opening a hole in it.
This module owns only configuration. It creates no PETSc vectors: the accumulator factory runs later and sizes itself from the definitions resolved here.
Definition in file statistics_config.h.
| PetscErrorCode ParseFieldStatisticsConfig | ( | SimCtx * | simCtx | ) |
Resolves field-statistics configuration from the control file.
Reads the option families, resolves every field name through the typed catalog, validates each definition through PicurvWindowInit, and stores the resulting windows on the context. Each resolved definition is reported at LOG_INFO through LOG_ALLOW, so it carries the usual dual gate and is surfaced by allow-listing the emitting function. Whether statistics were active at all is recorded unconditionally by the startup banner.
Leaves the context untouched when statistics are disabled or no window is configured, so a run that does not ask for statistics allocates nothing.
Must run before CreateAndInitializeAllVectors, which sizes the per-window accumulators from the window count resolved here.
| [in,out] | simCtx | Simulation context to populate. |
Resolves field-statistics configuration from the control file.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/statistics_config.h.
Definition at line 393 of file statistics_config.c.
| PetscErrorCode ParsePostStatisticsEnsembles | ( | SimCtx * | simCtx | ) |
Resolves the statistics ensembles a post-processing recipe defines.
An ensemble is a window over one instant instead of over time: its samples are the particles in each cell (source particles) or the single state of each cell (source eulerian) at the step being processed. Its fields and covariances use the run windows' option families under the ensemble kind, which the recipe parser forwards from the post-processing file. A particle field is named by its particle name and resolved to the Eulerian field it scatters to.
| [in,out] | simCtx | Context whose post-processing parameters receive the ensembles; run windows must already be resolved, since names may not clash. |
Resolves the statistics ensembles a post-processing recipe defines.
Definition at line 317 of file statistics_config.c.
| PetscErrorCode DestroyFieldStatisticsConfig | ( | SimCtx * | simCtx | ) |
Releases the window definitions resolved by ParseFieldStatisticsConfig() and the ensembles resolved by ParsePostStatisticsEnsembles().
| [in,out] | simCtx | Simulation context to clear; safe when nothing was resolved. |
Releases the window definitions resolved by ParseFieldStatisticsConfig() and the ensembles resolved by ParsePostStatisticsEnsembles().
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/statistics_config.h.
Definition at line 460 of file statistics_config.c.