test_011 Subroutine

subroutine test_011(id, nfail)

Uses

  • proc~~test_011~~UsesGraph proc~test_011 test_011 module~forcolormap_parameters forcolormap_parameters proc~test_011->module~forcolormap_parameters module~forcolormap_utils forcolormap_utils proc~test_011->module~forcolormap_utils iso_fortran_env iso_fortran_env module~forcolormap_parameters->iso_fortran_env module~forcolormap_utils->module~forcolormap_parameters

Endpoints t=0 and t=1 must select the first and last node, respectively.

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: id
integer, intent(inout) :: nfail

Calls

proc~~test_011~~CallsGraph proc~test_011 test_011 proc~lagrange_poly lagrange_poly proc~test_011->proc~lagrange_poly proc~report_test report_test proc~test_011->proc~report_test

Called by

proc~~test_011~~CalledByGraph proc~test_011 test_011 program~check check program~check->proc~test_011

Source Code

   subroutine test_011(id, nfail)
      use forcolormap_parameters, only: wp
      use forcolormap_utils,      only: lagrange_poly
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "lagrange_poly: endpoints t=0 and t=1 (n=5)"
      logical :: ok
      real(wp), parameter :: tol = 1.0e-12_wp
      real(wp) :: B0(5), B1(5)

      B0 = lagrange_poly(0.0_wp, 5)
      B1 = lagrange_poly(1.0_wp, 5)

      ok = (abs(B0(1) - 1.0_wp) <= tol) .and. all(abs(B0(2:)) <= tol) .and. &
         (abs(B1(5) - 1.0_wp) <= tol) .and. all(abs(B1(:4)) <= tol)

      call report_test(name, ok, id, nfail)
   end subroutine test_011