test_012 Subroutine

subroutine test_012(id, nfail)

Uses

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

Symmetry check: for n=3, t=0.5 should select the middle basis function.

Arguments

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

Calls

proc~~test_012~~CallsGraph proc~test_012 test_012 proc~lagrange_poly lagrange_poly proc~test_012->proc~lagrange_poly proc~report_test report_test proc~test_012->proc~report_test

Called by

proc~~test_012~~CalledByGraph proc~test_012 test_012 program~check check program~check->proc~test_012

Source Code

   subroutine test_012(id, nfail)
      use forcolormap_parameters, only: wp
      use forcolormap_utils,      only: lagrange_poly
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "lagrange_poly: t=0.5 gives middle node for n=3"
      logical :: ok
      real(wp), parameter :: tol = 1.0e-12_wp
      real(wp) :: B(3)

      B = lagrange_poly(0.5_wp, 3)
      ok = abs(B(2) - 1.0_wp) <= tol .and. abs(B(1)) <= tol .and. abs(B(3)) <= tol
      call report_test(name, ok, id, nfail)
   end subroutine test_012