!> !> @file evnnot.f90 !> !> @brief !> !> @copyright !> Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) !> SPC (Swiss Plasma Center) !> !> SPClibs is free software: you can redistribute it and/or modify it under !> the terms of the GNU Lesser General Public License as published by the Free !> Software Foundation, either version 3 of the License, or (at your option) !> any later version. !> !> SPClibs is distributed in the hope that it will be useful, but WITHOUT ANY !> WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS !> FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. !> !> You should have received a copy of the GNU Lesser General Public License !> along with this program. If not, see . !> !> @author !> (in alphabetical order) !> @author Trach-Minh Tran !> subroutine evnnot ( break, coef, l, k, brknew, lnew, coefg ) !************************************************************************* ! !! EVNNOT is a "fake" version of NEWNOT. ! ! Discussion: ! ! EVNNOT returns LNEW+1 knots in BRKNEW which are ! evenly spaced between BREAK(1) and BREAK(L+1). ! ! Reference: ! ! Carl DeBoor, ! A Practical Guide to Splines, ! Springer Verlag. ! ! Parameters: ! ! Input, real ( kind = 8 ) BREAK(L+1), coef, l, k.....contains the ! pp-representation of a certain function F of order K. Specifically, ! d**(k-1)f(x)=coef(k,i) for break(i) <= x < break(i+1) ! ! Input, integer LNEW, the number of subintervals into which the interval ! (a,b) is to be sectioned by the new breakpoint sequence brknew . ! ! Output, real ( kind = 8 ) BRKNEW(LNEW+1), the new breakpoints. ! ! Output, coefg the coefficient part of the pp-repr. break, coefg, l, 2 ! for the monotone p.linear function G with respect to which brknew will ! be equidistributed. ! implicit none integer k integer l integer lnew real ( kind = 8 ) break(l+1) real ( kind = 8 ) brknew(lnew+1) real ( kind = 8 ) coef(k,l) real ( kind = 8 ) coefg(2,l) integer i if ( lnew == 0 ) then brknew(1) = 0.5D+00 * ( break(1) + break(l+1) ) else do i = 1, lnew+1 brknew(i) = ( real ( lnew - i + 1, kind = 8 ) * break(1) & + real ( i - 1, kind = 8 ) * break(l+1) ) & / real ( lnew, kind = 8 ) end do end if return end