test_009 Subroutine

subroutine test_009(id, nfail)

Uses

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

Lagrange basis should form a partition of unity: sum_i B_i(t) = 1.

Arguments

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

Calls

proc~~test_009~~CallsGraph proc~test_009 test_009 proc~lagrange_poly lagrange_poly proc~test_009->proc~lagrange_poly proc~report_test report_test proc~test_009->proc~report_test

Called by

proc~~test_009~~CalledByGraph proc~test_009 test_009 program~check check program~check->proc~test_009

Source Code

   subroutine test_009(id, nfail)
      use forcolormap_parameters, only: wp
      use forcolormap_utils,      only: lagrange_poly
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "lagrange_poly: partition of unity at t=0.37 (n=6)"
      logical :: ok
      real(wp), parameter :: tol = 1.0e-12_wp

      ok = abs(sum(lagrange_poly(0.37_wp, 6)) - 1.0_wp) <= tol
      call report_test(name, ok, id, nfail)
   end subroutine test_009