Initialize a bspline_1d type with multiple outputs directly from its
knots and b-spline coefficients. The last dimension of bcoef is the
output index.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bspline_1d), | intent(inout) | :: | me |
the spline |
||
| real(kind=wp), | intent(in), | dimension(:) | :: | tx |
The |
|
| real(kind=wp), | intent(in), | dimension(:,:) | :: | bcoef |
|
|
| integer(kind=ip), | intent(in) | :: | kx |
The order of spline pieces in |
||
| integer(kind=ip), | intent(out) | :: | iflag |
status flag (see initialize_from_coefficients_1d),
or 6005 if |
||
| logical, | intent(in), | optional | :: | extrap |
if true, then extrapolation is allowed (default is false) |
pure subroutine initialize_from_coefficients_1d_multi(me,tx,bcoef,kx,iflag,extrap) implicit none class(bspline_1d),intent(inout) :: me !! the spline real(wp),dimension(:),intent(in) :: tx !! The `(nx+kx)` knots in the \(x\) direction. real(wp),dimension(:,:),intent(in) :: bcoef !! `(nx,nf)` array of b-spline coefficients integer(ip),intent(in) :: kx !! The order of spline pieces in \(x\) integer(ip),intent(out) :: iflag !! status flag (see [[initialize_from_coefficients_1d]]), !! or 6005 if `bcoef` has no outputs logical,intent(in),optional :: extrap !! if true, then extrapolation is allowed !! (default is false) if (size(bcoef,2,kind=ip)<1_ip) then ! no outputs call me%destroy() iflag = 6005_ip me%iflag = iflag return end if call me%initialize_from_coefficients(tx,bcoef(:,1),kx,iflag,extrap) if (iflag==0_ip) then me%bcoef = bcoef me%nf = size(bcoef,2,kind=ip) end if end subroutine initialize_from_coefficients_1d_multi