test_033 Subroutine

subroutine test_033(id, nfail)

Uses

  • proc~~test_033~~UsesGraph proc~test_033 test_033 module~forcolormap_utils forcolormap_utils proc~test_033->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

Both Bézier and Lagrange colormaps must preserve endpoints for 3 control colors.

Arguments

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

Calls

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

Called by

proc~~test_033~~CalledByGraph proc~test_033 test_033 program~check check program~check->proc~test_033

Source Code

   subroutine test_033(id, nfail)
      use forcolormap_utils, only: bezier, lagrange
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "bezier and lagrange: endpoints preserved for 3 colors"
      logical :: ok
      integer :: colors(3,3)
      integer, allocatable :: bmap(:,:), lmap(:,:)
      integer :: levels_

      levels_ = 41
      colors(1,:) = [ 5,  10,  15 ]
      colors(2,:) = [ 25, 30,  35 ]
      colors(3,:) = [ 45, 50,  55 ]

      bmap = bezier(colors,  levels_)
      lmap = lagrange(colors, levels_)

      ok = all(bmap(1,:) == colors(1,:)) .and. all(bmap(levels_,:) == colors(3,:)) .and. &
         all(lmap(1,:) == colors(1,:)) .and. all(lmap(levels_,:) == colors(3,:))
      call report_test(name, ok, id, nfail)
   end subroutine test_033