test_032 Subroutine

subroutine test_032(id, nfail)

Uses

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

With two control colors (order 1), Bézier and Lagrange interpolation are identical.

Arguments

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

Calls

proc~~test_032~~CallsGraph proc~test_032 test_032 proc~bezier bezier proc~test_032->proc~bezier proc~lagrange lagrange proc~test_032->proc~lagrange proc~report_test report_test proc~test_032->proc~report_test proc~factorial factorial proc~bezier->proc~factorial proc~lagrange_poly lagrange_poly proc~lagrange->proc~lagrange_poly

Called by

proc~~test_032~~CalledByGraph proc~test_032 test_032 program~check check program~check->proc~test_032

Source Code

   subroutine test_032(id, nfail)
      use forcolormap_utils, only: bezier, lagrange
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "bezier == lagrange for 2 colors (order=1)"
      logical :: ok
      integer :: colors(2,3)
      integer, allocatable :: bmap(:,:), lmap(:,:)

      colors(1,:) = [ 0,   128, 255 ]
      colors(2,:) = [ 255,  64,   0 ]

      bmap = bezier(colors, 32)
      lmap = lagrange(colors, 32)
      ok = all(bmap == lmap)
      call report_test(name, ok, id, nfail)
   end subroutine test_032