Symmetry check: for n=3, t=0.5 should select the middle basis function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_012(id, nfail) use forcolormap_parameters, only: wp use forcolormap_utils, only: lagrange_poly integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "lagrange_poly: t=0.5 gives middle node for n=3" logical :: ok real(wp), parameter :: tol = 1.0e-12_wp real(wp) :: B(3) B = lagrange_poly(0.5_wp, 3) ok = abs(B(2) - 1.0_wp) <= tol .and. abs(B(1)) <= tol .and. abs(B(3)) <= tol call report_test(name, ok, id, nfail) end subroutine test_012