init_from_config Subroutine

public subroutine init_from_config(state, cfg)

Populate a solver_state_t from a config_t.

Embeds a copy of @p cfg into state%cfg and computes the two derived grid scalars state%n_pt and state%dx. Also initialises state%dt from cfg%dt, applies problem-type-specific BC promotions (smooth_wave → periodic, woodward_colella → reflecting), and sets state%is_periodic.

Call this once after read_config() and before init_flux_scheme() / init_recon_scheme() / apply_initial_condition().

Arguments

Type IntentOptional Attributes Name
type(solver_state_t), intent(inout) :: state

Solver state to populate.

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

Parsed configuration.