| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | wp | = | f64 |
Working precision |
| integer, | private | :: | index | ||||
| real(kind=wp), | private, | parameter | :: | inv(1:32) | = | [(1.0_wp/real(index, wp), index=1, 32)] |
Abstract type, B-splines
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | degree | ||||
| logical, | public | :: | periodic | ||||
| logical, | public | :: | uniform | ||||
| integer, | public | :: | ncells | ||||
| integer, | public | :: | nbasis | ||||
| integer, | public | :: | offset | ||||
| real(kind=wp), | public | :: | xmin | ||||
| real(kind=wp), | public | :: | xmax | ||||
| real(kind=wp), | public, | allocatable | :: | knots(:) | |||
| real(kind=wp), | private | :: | inv_dx |
| procedure, public :: init => s_bsplines_uniform__init | |
| procedure, public :: free => s_bsplines_uniform__free | |
| procedure, public :: find_cell => f_bsplines_uniform__find_cell | |
| procedure, public :: eval_basis => s_bsplines_uniform__eval_basis | |
| procedure, public :: eval_deriv => s_bsplines_uniform__eval_deriv | |
| procedure, public :: eval_basis_and_n_derivs => s_bsplines_uniform__eval_basis_and_n_derivs |
Find which grid cell contains the given point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(in) | :: | self |
uniform B-splines |
||
| real(kind=wp), | intent(in) | :: | x |
point of interest |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | x | |||
| integer, | intent(out) | :: | icell | |||
| real(kind=wp), | intent(out) | :: | x_offset |
Initialize uniform B-splines object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(out) | :: | self |
uniform B-splines |
||
| integer, | intent(in) | :: | degree |
spline degree |
||
| logical, | intent(in) | :: | periodic |
.true. if domain is periodic, .false. otherwise |
||
| real(kind=wp), | intent(in) | :: | xmin |
left boundary of x domain |
||
| real(kind=wp), | intent(in) | :: | xmax |
right boundary of x domain |
||
| integer, | intent(in) | :: | ncells |
number of grid cells in domain |
Free storage
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(inout) | :: | self |
uniform B-splines |
Evaluate value at x of all basis functions with support in local cell values[j] = B_j(x) for jmin <= j <= jmin+degree
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(in) | :: | self |
uniform B-splines |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation point |
||
| real(kind=wp), | intent(out) | :: | values(0:) | |||
| integer, | intent(out) | :: | jmin |
index of first non-zero B-spline |
Evaluate derivative at x of all basis functions with support in local cell derivs[j] = B_j'(x) for jmin <= j <= jmin+degree
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(in) | :: | self |
uniform B-splines |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation point |
||
| real(kind=wp), | intent(out) | :: | derivs(0:) | |||
| integer, | intent(out) | :: | jmin |
index of first non-zero B-spline |
Evaluate value and n derivatives at x of all basis functions with support in local cell derivs[i,j] = (d/dx)^i B_j(x) for 0 <= i <= n and jmin <= j <= jmin+degree
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sll_t_bsplines_uniform), | intent(in) | :: | self |
uniform B-splines |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation point |
||
| integer, | intent(in) | :: | n |
number of required derivatives |
||
| real(kind=wp), | intent(out) | :: | derivs(0:,0:) | |||
| integer, | intent(out) | :: | jmin |
index of first non-zero B-spline |