Partition-of-unity should hold across several representative t values.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_014(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 multiple t (n=8)" logical :: ok real(wp), parameter :: tol = 1.0e-12_wp real(wp) :: ts(5) integer :: k ts = [ 0.0_wp, 0.1_wp, 0.33_wp, 0.77_wp, 1.0_wp ] ok = .true. do k = 1, size(ts) ok = ok .and. (abs(sum(lagrange_poly(ts(k), 8)) - 1.0_wp) <= tol) end do call report_test(name, ok, id, nfail) end subroutine test_014