Endpoints t=0 and t=1 must select the first and last node, respectively.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_011(id, nfail) use forcolormap_parameters, only: wp use forcolormap_utils, only: lagrange_poly integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "lagrange_poly: endpoints t=0 and t=1 (n=5)" logical :: ok real(wp), parameter :: tol = 1.0e-12_wp real(wp) :: B0(5), B1(5) B0 = lagrange_poly(0.0_wp, 5) B1 = lagrange_poly(1.0_wp, 5) ok = (abs(B0(1) - 1.0_wp) <= tol) .and. all(abs(B0(2:)) <= tol) .and. & (abs(B1(5) - 1.0_wp) <= tol) .and. all(abs(B1(:4)) <= tol) call report_test(name, ok, id, nfail) end subroutine test_011