test_026 Subroutine

subroutine test_026(id, nfail)

Uses

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

If all control colors are identical, the generated map should be constant.

Arguments

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

Calls

proc~~test_026~~CallsGraph proc~test_026 test_026 proc~lagrange lagrange proc~test_026->proc~lagrange proc~report_test report_test proc~test_026->proc~report_test proc~lagrange_poly lagrange_poly proc~lagrange->proc~lagrange_poly

Called by

proc~~test_026~~CalledByGraph proc~test_026 test_026 program~check check program~check->proc~test_026

Source Code

   subroutine test_026(id, nfail)
      use forcolormap_utils, only: lagrange
      integer, intent(inout) :: id, nfail
      character(len=*), parameter :: name = "lagrange: constant control colors -> constant map"
      logical :: ok
      integer :: colors(3,3)
      integer, allocatable :: map(:,:)

      colors(1,:) = [ 7, 8, 9 ]
      colors(2,:) = [ 7, 8, 9 ]
      colors(3,:) = [ 7, 8, 9 ]

      map = lagrange(colors, 32)
      ok = all(map(:,1) == 7) .and. all(map(:,2) == 8) .and. all(map(:,3) == 9)
      call report_test(name, ok, id, nfail)
   end subroutine test_026