get the exact spline antiderivative, with respect to rho2 the knotspan is increased by an extra multiplicity on both ends, and the new coefficients are computed as beta(i) = beta(i-1) + alpha(i)*(t(i+degree+1)-t(i))/(degree+1) From deBoor, "A practical guide to Splines", p.128
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_rProfile_bspl), | intent(in) | :: | sf |
self |
FUNCTION bsplProfile_antiderivative(sf) RESULT(antideriv) ! INPUT VARIABLES -------------------------! CLASS(t_rProfile_bspl), INTENT(IN) :: sf !! self ! OUTPUT VARIABLES -------------------------! CLASS(c_rProfile),ALLOCATABLE :: antideriv ! LOCAL VARIABLES -------------------------! REAL(wp) :: coefs(sf%n_coefs+1), knots(sf%n_knots+2), intermid INTEGER :: i, n_coefs, n_knots, deg ! CODE --------------------------------------------------------------------------------------------------------------------------! coefs = 0.0_wp knots = -42.0_wp n_coefs = sf%n_coefs+1 n_knots = sf%n_knots+2 deg = sf%deg+1 ! increase multiplicity at the edges knots(2:n_knots-1) = sf%knots knots(1) = sf%knots(1) knots(n_knots) = sf%knots(sf%n_knots) DO i=1,sf%n_coefs intermid = sf%coefs(i)*(sf%knots(i+deg)-sf%knots(i))/deg coefs(i+1) = coefs(i) + intermid END DO antideriv = t_rProfile_bspl(knots, coefs) END FUNCTION bsplProfile_antiderivative