| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | n_coefs | ||||
| real(kind=wp), | public, | ALLOCATABLE | :: | coefs(:) | |||
| integer, | public | :: | n_knots |
number of knots, including repeated edge knots |
|||
| integer, | public | :: | deg | = | 0 | ||
| real(kind=wp), | public, | ALLOCATABLE | :: | knots(:) |
knot values, includinng edge knots |
||
| class(sll_c_bsplines), | public, | ALLOCATABLE | :: | bspl |
b-spline class |
initialize the rProfile of type bspline
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | knots(:) |
knots of the B-Spline with repeated start and end points |
||
| real(kind=wp), | intent(in) | :: | coefs(:) |
B-Spline coefficients |
self
finalize the type rProfile
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(t_rProfile_bspl), | intent(inout) | :: | sf |
self |
evaluate the n-th derivative of a radial profile with respect to rho ~sqrt(magnetic flux). NOTE: n has to be in [0,4] due to an explicit implementation of the product rule.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_rProfile) | :: | sf |
self |
|||
| real(kind=wp), | intent(in) | :: | rho |
rho position rho ~sqrt(magnetic flux) |
||
| integer, | intent(in), | optional | :: | deriv |
derivative in rho |
n-th derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
evaluate the 2nd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_rProfile) | :: | sf |
self |
|||
| real(kind=wp), | intent(in) | :: | rho |
rho position rho ~sqrt(magnetic flux) |
2nd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
evaluate the 3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_rProfile) | :: | sf |
self |
|||
| real(kind=wp), | intent(in) | :: | rho |
rho position rho ~sqrt(magnetic flux) |
3rd derivative of a radial profile with respect to rho ~sqrt(magnetic flux)
evaluate the 4th derivative of a radial profile with respect to rho ~sqrt(magnetic flux)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(c_rProfile) | :: | sf |
self |
|||
| real(kind=wp), | intent(in) | :: | rho |
rho position rho ~sqrt(magnetic flux) |
4th derivative of a radial profile with respect to rho ~sqrt(magnetic flux).
evaluate the n-th derivative of the bsplProfile at position s
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(t_rProfile_bspl), | intent(in) | :: | sf |
self |
||
| real(kind=wp), | intent(in) | :: | rho2 |
evaluation point in the toroidal flux coordinate (rho2=phi/phi_edge= rhopos^2) |
||
| integer, | intent(in), | optional | :: | deriv |
derivative of bspline(rho^2) in rho^2 |
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 |
TYPE, EXTENDS(c_rProfile) :: t_rProfile_bspl INTEGER :: n_knots !! number of knots, including repeated edge knots !INTEGER :: n_coefs !! number of B-Spline coefficients, part of abstract type INTEGER :: deg = 0 REAL(wp), ALLOCATABLE :: knots(:) !! knot values, includinng edge knots !REAL(wp), ALLOCATABLE :: coefs(:) !! B-Spline coefficients, part of abstract type CLASS(sll_c_bsplines),ALLOCATABLE :: bspl !! b-spline class CONTAINS PROCEDURE :: eval_at_rho2 => bsplProfile_eval_at_rho2 PROCEDURE :: antiderivative => bsplProfile_antiderivative FINAL :: bsplProfile_free END TYPE t_rProfile_bspl