!> @file upwind1.f90 !> @brief First-order upwind reconstruction scheme. module upwind1 use precision, only: wp implicit none private public :: upwind1_reconstruct contains ! --------------------------------------------------------------------------- !> First-order upwind reconstruction. !! !! Returns the centre element of the stencil, which corresponds to the !! cell immediately adjacent to the interface for both the left-biased !! (positive) and right-biased (negative) stencils assembled by !! spatial_discretization. !! !! @param[in] f_stencil Split flux stencil (neq x stencil_width) !! @param[out] f_hat Upwind flux at the interface ! --------------------------------------------------------------------------- pure subroutine upwind1_reconstruct(f_stencil, f_hat) real(wp), intent(in) :: f_stencil(:, :) real(wp), intent(out) :: f_hat(:) f_hat = f_stencil(:, (size(f_stencil, 2) + 1) / 2) end subroutine upwind1_reconstruct end module upwind1