Read, validate, report, and persist ORB5-compatible input namelists. More...
#include "readinput.hpp"
Static Public Member Functions | |
| static void | clear_warnings () |
| Remove all retained input-warning messages. | |
| static void | close_input_file () |
| Close the root input and normalized-output streams. | |
| static const std::vector< std::string > & | get_warnings () |
| Access retained input-warning messages. | |
| static void | open_input_file (bool nl_input_path, const std::string &path_to_input) |
| Stage and open the simulation input on every MPI rank. | |
| static void | read_antenna (int &nwarnings, int &nerrors) |
| Read and validate the externally imposed antenna configuration. | |
| static void | read_basic (int phase, int &nwarnings, int &nerrors) |
Process the BASIC namelist in one of two initialization phases. | |
| static void | read_collisions (int &nwarnings, int &nerrors) |
| Read and validate the collision-model configuration. | |
| static void | read_diag (int &nwarnings, int &nerrors) |
Read general output cadence and diagnostic controls from DIAG. | |
| static void | read_diagnostics (int &nwarnings, int &nerrors) |
| Read diagnostic-product selections and binning parameters. | |
| static void | read_equil (int &nwarnings, int &nerrors) |
Read, validate, report, and persist the EQUIL namelist. | |
| static void | read_fields (int &nwarnings, int &nerrors) |
Read, validate, report, and persist the FIELDS namelist. | |
| static void | read_islands (int &nwarnings, int &nerrors) |
| Read and validate the magnetic-island namelist. | |
| static void | read_parallel (int &nwarnings, int &nerrors) |
Read and validate the PARALLEL MPI-decomposition namelist. | |
| static void | read_solver (int &nwarnings, int &nerrors) |
Read, validate, report, and persist the SOLVER namelist. | |
| static void | read_sorting (int &nwarnings, int &nerrors) |
Read and validate the particle SORTING namelist. | |
| static void | read_species (int &nwarnings, int &nerrors) |
Read all sequential TYPE_SPECIES/ATTRIBUTES namelist pairs. | |
Read, validate, report, and persist ORB5-compatible input namelists.
ReadInput is the boundary between textual run configuration and the typed global state consumed by numerical modules. It stages an explicitly named input as input.in, parses case-insensitive Fortran-style namelist keys, applies defaults and cross-parameter validation, prints a reproducible input summary, and stores validated values in the main HDF5 result file.
Warning and error counts accumulate across calls. Warnings are retained for later summary reporting; fatal input errors are counted so ControlAll can reject the run after all relevant blocks have been checked. The reader is stateful and is intended for the single input sequence orchestrated by ControlAll, not for concurrent use.
|
static |
Remove all retained input-warning messages.
|
static |
Close the root input and normalized-output streams.
|
static |
Access retained input-warning messages.
|
static |
Stage and open the simulation input on every MPI rank.
| [in] | nl_input_path | True when path_to_input was supplied explicitly. |
| [in] | path_to_input | Source file to copy to input.in when explicit. |
Rank zero stages an explicit file and, outside dry-run mode, opens out.inp.0000 for the normalized namelist echo. All ranks scan past the free-form header. Missing or unreadable input aborts MPI_COMM_WORLD.
|
static |
Read and validate the externally imposed antenna configuration.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
Initializes antenna mode/profile views before assigning values.
|
static |
Process the BASIC namelist in one of two initialization phases.
| [in] | phase | Phase 1 parses and validates; phase 2 reports and persists the already validated values. |
| [in,out] | nwarnings | Accumulated non-fatal warning count. |
| [in,out] | nerrors | Accumulated fatal validation-error count. |
|
static |
Read and validate the collision-model configuration.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read general output cadence and diagnostic controls from DIAG.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read diagnostic-product selections and binning parameters.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
Allocates per-species diagnostic arrays when needed and stores the resulting configuration under /parameters/diagnostics.
|
static |
Read, validate, report, and persist the EQUIL namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read, validate, report, and persist the FIELDS namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read and validate the magnetic-island namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read and validate the PARALLEL MPI-decomposition namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read, validate, report, and persist the SOLVER namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read and validate the particle SORTING namelist.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
|
static |
Read all sequential TYPE_SPECIES/ATTRIBUTES namelist pairs.
| [in,out] | nwarnings | Accumulated warning count. |
| [in,out] | nerrors | Accumulated error count. |
Pairs are consumed in species order without rewinding between species, matching the original Fortran namelist stream semantics.