cfd_gui.namelist_io¶
This page is generated from
src/cfd_gui/namelist_io.py. For narrative architecture context, start with the developer guide.
namelist_io
¶
Read and write Fortran namelist (.nml) files for the 1D Euler solver.
This module defines the canonical list of config parameters (mirroring
config_t in src/config.f90), their types, defaults, valid choices,
and human-readable tooltips. The GUI config editor is driven entirely
from :data:SCHEMA.
The parser is regex-based and handles scalar values only (matching the solver's own namelist usage).
Param(key, group, ptype, default, label, tooltip='', choices=list(), min_val=None, max_val=None)
dataclass
¶
Metadata for a single namelist variable.
defaults_dict()
¶
Return {key: default} for every parameter.
parse_namelist(path)
¶
Parse a Fortran namelist file into {group: {key: value}}.
flat_from_namelist(path)
¶
Parse namelist and flatten into a single {key: value} dict.
write_namelist(values, path)
¶
Write a namelist file from a flat {key: value} dict.
Only writes values that differ from the built-in defaults so the generated file stays concise.