initialize_runtime Subroutine

public subroutine initialize_runtime(ctx, cfg, nml_file, is_ok, message)

Populate ctx and bring the solver to a ready-to-run state.

Steps performed in order: copy config into context; initialise logger; initialise solver state from config; bind flux and recon scheme pointers (sets state%halo_width); instantiate the domain decomposition (decompose + validate_decomp, uses halo_width); allocate work arrays (uses decomp); bind the time-integration scheme pointer; apply initial conditions; optionally load a restart checkpoint; log the effective configuration.

Arguments

Type IntentOptional Attributes Name
type(solver_run_context_t), intent(inout) :: ctx

Context to initialise.

type(config_t), intent(in) :: cfg

Configuration loaded via read_config.

character(len=*), intent(in), optional :: nml_file

Optional namelist path stored in ctx % nml_file.

logical, intent(out), optional :: is_ok
character(len=*), intent(out), optional :: message