PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
audit_units.py File Reference

Enforce the physical-units rule and the published units indexes. More...

Go to the source code of this file.

Namespaces

namespace  audit_units
 

Functions

 audit_units.load_module (str name, Path path)
 Load a repository script as an importable module.
 
 audit_units.schema_leaves (dict schema)
 Yield every key path a schema accepts that is not itself a nested mapping.
 
list audit_units.uncovered_inputs (core)
 Name every solver-facing input with no recorded physical dimension.
 
str audit_units.dimension_name (core, dimension)
 Name a dimension triple by its constant in the conductor core.
 
dict audit_units.physical_inputs (core)
 Every input that carries a physical dimension, as the input index lists it.
 
dict audit_units.compiled_field_dimensions ()
 Field name to (catalog, FIELD_DIM_* suffix) for every compiled entry.
 
str audit_units.page_section (str heading)
 One @section body of page 19.
 
dict audit_units.documented_rows (str heading)
 Rows of the first table in a section: first column to second and third.
 
int audit_units.main ()
 Fail when an input lacks a dimension or an index disagrees with the code.
 

Variables

 audit_units.REPO_ROOT = Path(__file__).resolve().parents[2]
 
str audit_units.CORE = REPO_ROOT / "picurv_cli" / "core.py"
 
str audit_units.IC_GENERATOR = REPO_ROOT / "generators" / "ic.gen"
 
str audit_units.EULERIAN_CATALOG = REPO_ROOT / "src" / "field_catalog.c"
 
str audit_units.PARTICLE_CATALOG = REPO_ROOT / "src" / "particle_field_catalog.c"
 
str audit_units.PAGE = REPO_ROOT / "docs" / "pages" / "19_Nondimensionalization.md"
 
dict audit_units.SOLVER_INPUT_SCHEMAS
 
dict audit_units.DEDICATED_TABLE_SURFACES
 
dict audit_units.BUILTIN_IC_GENERATORS = {"zero", "constant", "streamwise_constant", "poiseuille"}
 
 audit_units.ENTRY_RE = re.compile(r"\b(?:FIELD_ENTRY|FIELD_COORDINATE_ENTRY|PARTICLE_FIELD_ENTRY)\‍(")
 
 audit_units.DIMENSION_RE = re.compile(r"FIELD_DIM_(\w+)")
 
 audit_units.NAME_RE = re.compile(r'"([^"]+)"')
 
 audit_units.INDEX_ROW_RE = re.compile(r"^\|\s*`([^`]+)`\s*\|\s*(\w+)\s*\|\s*`?(\w+)`?\s*\|", re.M)
 

Detailed Description

Enforce the physical-units rule and the published units indexes.

Every configuration input is physical and is converted to solver units exactly once; every catalogued field records the dimension post-processing scales it by. This checks that no solver-facing input lacks a recorded dimension, and that both indexes on page 19 match what the code records: the input index against INPUT_QUANTITIES and its sibling tables in picurv_cli/core.py, the field index against the FIELD_DIM_* argument of every entry in src/field_catalog.c and src/particle_field_catalog.c.

It does not check that a conversion is performed where the table says; the non-unit ingress tests and the units-equivalence smoke run check that.

Definition in file audit_units.py.