Both Bézier and Lagrange colormaps must preserve endpoints for 3 control colors.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
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