Defines @p block_t, a small DATA-ONLY record that tags a contiguous run of
the 1D domain with the spatial-discretization method that governs it
('fdm' or 'fvm') and the cell count it spans. The solver state owns a fixed
one-element array blocks(1); later phases generalise to multiple blocks.
Note
block_t deliberately carries no mesh, solution arrays, or procedure
pointers. Method dispatch for state-typed operations (e.g. the
residual) is done by internal select case (trim(blocks(1) % method))
at the call site, not by procedure pointers stored here: a state-typed
pointer inside the state would create a circular module dependency
(solver_state -> block_t -> interface -> solver_state). The grid and
solution arrays stay on @p solver_state_t.
The module is named @p block_mod (not block) because block is a Fortran
keyword; this mirrors the repo's cortex_run_attached.f90 /
cortex_run_attached_mod naming.
Discretization descriptor for one block of the 1D domain.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=8), | public | :: | method | = | method_fdm |
Spatial-discretization method token: 'fdm' (default) or 'fvm'.
Mirrors |
|
| integer, | public | :: | n_cell | = | 0 |
Number of cells this block spans (mirrors |