s_compute_num_diags_uniform Subroutine

private subroutine s_compute_num_diags_uniform(self, kl, ku)

Arguments

Type IntentOptional Attributes Name
class(sll_t_spline_interpolator_1d), intent(in) :: self
integer, intent(out) :: kl
integer, intent(out) :: ku

Called by

proc~~s_compute_num_diags_uniform~~CalledByGraph proc~s_compute_num_diags_uniform s_compute_num_diags_uniform proc~s_spline_interpolator_1d__init sll_t_spline_interpolator_1d%s_spline_interpolator_1d__init proc~s_spline_interpolator_1d__init->proc~s_compute_num_diags_uniform

Source Code

  subroutine s_compute_num_diags_uniform( self, kl, ku )
    class(sll_t_spline_interpolator_1d), intent(in   ) :: self
    integer                            , intent(  out) :: kl
    integer                            , intent(  out) :: ku

    associate( degree => self % bspl % degree )

      ! FIXME: In Hermite case ku and kl computed in general case when derivatives
      !        of B-splines do not vanish at boundary
      ! TODO: reduce kl and ku to take advantage of uniform grid
      select case( self % bc_xmin )
        case ( sll_p_periodic ); ku = (degree+1)/2
        case ( sll_p_hermite  ); ku = max( (degree+1)/2, degree-1 )
        case ( sll_p_greville ); ku = degree
      end select

      select case( self % bc_xmax )
        case ( sll_p_periodic ); kl = (degree+1)/2
        case ( sll_p_hermite  ); kl = max( (degree+1)/2, degree-1 )
        case ( sll_p_greville ); kl = degree
      end select

    end associate

  end subroutine s_compute_num_diags_uniform