apply_bcs Subroutine

public subroutine apply_bcs(state)

Update ghost-state vectors from the current solution and BC types.

Called at the top of spatial_discretization::compute_resid(state). For 'dirichlet' and 'inflow' BCs the ghost state is already correct (set once by the driver) and no action is taken. For 'outflow', 'reflecting', and 'nonreflecting' the ghost state is recomputed every call.

On exit: - state%is_periodic is set consistently with state%bc_left / state%bc_right. - state%q_left, state%fl_pos, state%fl_neg are updated for the left ghost. - state%q_right, state%fr_pos, state%fr_neg are updated for the right ghost.

Arguments

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

Solver instance state.