Load the initial condition from a data file containing columns: x rho u p.
If the file grid matches the solver grid (same number of points and x-coordinates
within a small tolerance), the data is loaded directly. Otherwise, each primitive
is linearly interpolated onto the solver grid. Interpolation must be enabled via
cfg%ic_interp; a grid mismatch with ic_interp = .false. causes an error stop.
Extrapolation (solver domain wider than file domain) is always an error stop.
After filling state%ub, ghost states are set from the outermost loaded cells and
precompute_boundary_fluxes is called.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(inout) | :: | state |
Solver state (must have ub allocated, schemes bound) |
||
| type(config_t), | intent(in) | :: | cfg |
Runtime configuration (uses cfg%ic_file, cfg%ic_interp, cfg%gam) |