fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fitpack_core.F90 File Reference

Data Types

interface  fitpack_core::fitpack_polar_boundary
 
interface  fitpack_core::fitpack_swap
 
interface  fitpack_core::fp_comm_size
 Communication size for allocatable 1D arrays. More...
 
interface  fitpack_core::fp_comm_pack
 Pack allocatable arrays into communication buffer. More...
 
interface  fitpack_core::fp_comm_expand
 Expand communication buffer into allocatable arrays. More...
 

Modules

module  fitpack_core
 

Functions/Subroutines

subroutine, public fitpack_core::fitpack_error_handling (ierr, ierr_out, whereat)
 Dispatch an error code: return it to caller or halt with a message.
 
pure character(len=:) function, allocatable, public fitpack_core::fitpack_message (ierr)
 Convert an integer error flag to a human-readable message string.
 
subroutine, public fitpack_core::get_smoothing (old_smoothing, user_smoothing, nit, smooth_now)
 Choose the smoothing parameter(s) for an iterative fit.
 
pure character(len=:) function, allocatable, public fitpack_core::iopt_message (iopt)
 Convert an iopt computation-mode flag to a human-readable string.
 
elemental logical(fp_bool) function, public fitpack_core::fitpack_success (ierr)
 Test whether a FITPACK error flag indicates success.
 
pure subroutine, public fitpack_core::bispeu (tx, nx, ty, ny, c, kx, ky, x, y, z, m, wrk, lwrk, ier)
 Evaluate a bivariate spline at scattered points \( (x_i, y_i) \).
 
pure subroutine, public fitpack_core::bispev (tx, nx, ty, ny, c, kx, ky, x, mx, y, my, z, wrk, lwrk, iwrk, kwrk, ier)
 Evaluate a bivariate spline on a rectangular grid.
 
pure subroutine, public fitpack_core::clocur (iopt, ipar, idim, m, u, mx, x, w, k, s, nest, n, t, nc, c, fp, wrk, lwrk, iwrk, ier)
 Determine a smooth closed parametric spline curve approximation.
 
pure subroutine, public fitpack_core::cocosp (m, x, y, w, n, t, e, maxtr, maxbin, c, sq, sx, bind, wrk, lwrk, iwrk, kwrk, ier)
 Fit a cubic spline with convexity/concavity constraints and user-specified knots.
 
pure subroutine, public fitpack_core::concon (iopt, m, x, y, w, v, s, nest, maxtr, maxbin, n, t, c, sq, sx, bind, wrk, lwrk, iwrk, kwrk, ier)
 Fit a cubic spline with convexity/concavity constraints and automatic knot placement.
 
pure subroutine, public fitpack_core::concur (iopt, idim, m, u, mx, x, xx, w, ib, db, nb, ie, de, ne, k, s, nest, n, t, nc, c, np, cp, fp, wrk, lwrk, iwrk, ier)
 Determine a smooth parametric spline curve with derivative constraints at endpoints.
 
pure subroutine, public fitpack_core::cualde (idim, t, n, c, nc, k1, u, d, nd, ier)
 Evaluate all derivatives of a parametric spline curve at a single point.
 
pure subroutine, public fitpack_core::curev (idim, t, n, c, nc, k, u, m, x, mx, ier)
 Evaluate a parametric spline curve at a set of parameter values.
 
pure subroutine, public fitpack_core::curfit (iopt, m, x, y, w, xb, xe, k, s, nest, n, t, c, fp, wrk, lwrk, iwrk, ier)
 Determine a smooth spline approximation of degree \( k \) to a set of data points.
 
real(fp_real) function, public fitpack_core::dblint (tx, nx, ty, ny, c, kx, ky, xb, xe, yb, ye, wrk)
 Compute the double integral of a bivariate spline over a rectangle.
 
pure real(fp_real) function, public fitpack_core::evapol (tu, nu, tv, nv, c, rad, x, y)
 Evaluate a polar spline \( f(x,y) = s(u,v) \) at a Cartesian point.
 
pure subroutine, public fitpack_core::fourco (t, n, c, alfa, m, ress, resc, wrk1, wrk2, ier)
 Compute Fourier coefficients of a cubic spline.
 
pure subroutine fitpack_core::fpader (t, n, c, k1, x, l, d)
 Evaluate all derivatives of a spline at a single point.
 
pure subroutine fitpack_core::fpadno (maxtr, up, left, right, info, count, merk, jbind, n1, ier)
 Add a branch to the constraint-set binary tree.
 
pure subroutine fitpack_core::fpadpo (idim, t, n, c, nc, k, cp, np, cc, t1, t2)
 Add a polynomial curve to a spline curve in B-spline representation.
 
pure real(fp_real) function, dimension(n) fitpack_core::fpback (a, z, n, k, nest)
 Solve an upper triangular banded system by back-substitution.
 
pure real(fp_real) function, dimension(n) fitpack_core::fpbacp (a, b, z, n, k, k1, nest)
 Solve a bordered upper triangular system by back-substitution.
 
pure subroutine fitpack_core::fpbfou (t, n, par, ress, resc)
 Compute Fourier coefficients of cubic B-splines.
 
pure subroutine fitpack_core::fpbisp (tx, nx, ty, ny, c, kx, ky, x, mx, y, my, z, wx, wy, lx, ly)
 Evaluate a tensor product spline on a grid.
 
pure real(fp_real) function, dimension(max_order+1) fitpack_core::fpbspl (t, n, k, x, l)
 Evaluate the non-zero B-splines at a given point.
 
pure integer(fp_size) function fitpack_core::fp_knot_interval (t, x, l_start, l_max)
 Find knot interval index l such that t(l) <= x < t(l+1). Uses hybrid search: linear for small ranges, binary for large. This replaces the repeated pattern: do while (x >= t(l+1) .and. l /= l_max) l = l + 1 end do.
 
pure integer(fp_flag) function fitpack_core::fpchec (x, m, t, n, k)
 Verify knot positions against data points (Schoenberg-Whitney check).
 
pure integer function fitpack_core::fpched (x, m, t, n, k, ib, ie)
 Verify knot positions for a constrained spline (Schoenberg-Whitney check).
 
pure integer(fp_flag) function fitpack_core::fpchep (x, m, t, n, k)
 Verify knot positions for a periodic spline (Schoenberg-Whitney check).
 
pure subroutine fitpack_core::fpclos (iopt, idim, m, u, mx, x, w, k, s, nest, tol, maxit, k1, k2, n, t, nc, c, fp, fpint, z, a1, a2, b, g1, g2, q, nrdata, ier)
 Core algorithm for closed (periodic) parametric curve fitting.
 
pure subroutine fitpack_core::fpclos_reset_interp (idim, k, m, mx, n, nc, nest, kk, kk1, u, x, t, c, fp, per, fp0, s, fpint, nrdata, done)
 Set up the initial knot configuration for closed-curve interpolation.
 
pure subroutine fitpack_core::fpcoco (iopt, m, x, y, w, v, s, nest, maxtr, maxbin, n, t, c, sq, sx, bind, e, wrk, lwrk, iwrk, kwrk, ier)
 Fit a convexity-constrained cubic smoothing spline.
 
pure subroutine fitpack_core::fpcons (iopt, idim, m, u, mx, x, w, ib, ie, k, s, nest, tol, maxit, k1, k2, n, t, nc, c, fp, fpint, z, a, b, g, q, nrdata, ier)
 Core algorithm for constrained parametric curve fitting.
 
pure subroutine fitpack_core::fpcosp (m, x, y, w, n, t, e, maxtr, maxbin, c, sq, sx, bind, nm, mb, a, b, const, z, zz, u, q, info, up, left, right, jbind, ibind, ier)
 Core algorithm for convexity-constrained cubic spline fitting.
 
pure elemental subroutine fitpack_core::fpcsin (a, b, par, sia, coa, sib, cob, ress, resc)
 Compute weighted Fourier integrals of a cubic polynomial.
 
pure subroutine fitpack_core::fpcurf (iopt, x, y, w, m, xb, xe, k, s, nest, tol, maxit, k1, k2, n, t, c, fp, fpint, z, a, b, g, q, nrdata, ier)
 Core algorithm for univariate spline curve fitting.
 
pure subroutine fitpack_core::fpcuro (a, b, c, d, x, n)
 Find the real zeros of a cubic polynomial.
 
pure subroutine fitpack_core::fpcyt1 (a, n, nn)
 LU-decompose a cyclic tridiagonal matrix.
 
pure subroutine fitpack_core::fpcyt2 (a, n, b, c, nn)
 Solve a cyclic tridiagonal system using LU factors from fpcyt1.
 
pure subroutine fitpack_core::fpdeno (maxtr, up, left, right, nbind, merk)
 Prune short branches from the constraint-set binary tree.
 
pure subroutine fitpack_core::fpdisc (t, n, k2, b, nest)
 Compute the discontinuity jumps of the B-spline derivatives.
 
pure subroutine fitpack_core::fpfrno (maxtr, up, left, right, info, point, merk, n1, count, ier)
 Collect free nodes from the constraint-set binary tree.
 
elemental subroutine fitpack_core::fpgivs (piv, ww, cos, sin)
 Compute parameters of a Givens plane rotation.
 
pure subroutine fitpack_core::fp_rotate_row (h, band, a, yi, z, j_start)
 Rotate an observation row into the upper triangular band matrix.
 
pure subroutine fitpack_core::fp_rotate_row_vec (h, band, a, nest, xi, z, j_start, n, idim)
 Rotate an observation row into a band matrix with vector RHS.
 
pure subroutine fitpack_core::fp_rotate_shifted (h, band, a, nest, yi, z, j_start, j_end)
 Rotate a smoothing-matrix row into a band matrix using shifted pivots.
 
pure subroutine fitpack_core::fp_rotate_shifted_vec (h, band, a, nest, xi, z, j_start, j_end, n, idim)
 Rotate a smoothing-matrix row into a band matrix with vector RHS.
 
pure subroutine fitpack_core::fp_rotate_row_2mat_vec (h1, band1, h2, band2, a1, a2, nest, xi, z, j1_start, j1_end, n, idim)
 Rotate a split observation row into the block-triangular periodic system with vector RHS.
 
pure subroutine fitpack_core::fp_rotate_row_2mat (h1, band1, h2, band2, a1, a2, nest, yi, z, j1_start, j1_end)
 Rotate a split observation row into the block-triangular periodic system with scalar RHS.
 
pure subroutine fitpack_core::fp_rotate_row_block (h, band, a, na, right, q, nrhs, irot_start)
 Rotate a row into a band matrix with contiguous-block RHS.
 
pure subroutine fitpack_core::fp_rotate_row_stride (h, band, a, na, right, c, ldc, nrhs, irot_start)
 Rotate a row into a band matrix with stride (row-access) RHS.
 
pure subroutine fitpack_core::fp_rotate_2mat_stride (h1, band1, h2, band2, a1, a2, na, right, c, ldc, nrhs, j1_start, j1_end)
 Rotate a split row into the block-triangular periodic system with stride RHS.
 
pure subroutine fitpack_core::fpgrdi (ifsu, ifsv, ifbu, ifbv, lback, u, mu, v, mv, z, mz, dz, iop0, iop1, tu, nu, tv, nv, p, c, nc, sq, fp, fpu, fpv, mm, mvnu, spu, spv, right, q, au, av1, av2, bu, bv, aa, bb, cc, cosi, nru, nrv)
 Compute spline coefficients on a polar/spherical grid via Kronecker product.
 
pure subroutine fitpack_core::fpgrpa (ifsu, ifsv, ifbu, ifbv, idim, ipar, u, mu, v, mv, z, mz, tu, nu, tv, nv, p, c, nc, fp, fpu, fpv, mm, mvnu, spu, spv, right, q, au, au1, av, av1, bu, bv, nru, nrv)
 Compute parametric surface spline coefficients on a grid.
 
pure subroutine fitpack_core::fpgrre (ifsx, ifsy, ifbx, ifby, x, mx, y, my, z, mz, kx, ky, tx, nx, ty, ny, p, c, nc, fp, fpx, fpy, mm, mynx, kx1, kx2, ky1, ky2, spx, spy, right, q, ax, ay, bx, by, nrx, nry)
 Compute grid-based spline coefficients via Kronecker product decomposition.
 
pure subroutine fitpack_core::fpgrsp (ifsu, ifsv, ifbu, ifbv, lback, u, mu, v, mv, r, mr, dr, iop0, iop1, tu, nu, tv, nv, p, c, nc, sq, fp, fpu, fpv, mm, mvnu, spu, spv, right, q, au, av1, av2, bu, bv, a0, a1, b0, b1, c0, c1, cosi, nru, nrv)
 Compute spherical grid spline coefficients via Kronecker product.
 
pure subroutine fitpack_core::fpinst (iopt, t, n, c, k, x, l, tt, nn, cc, nest)
 Insert a single knot into a B-spline representation.
 
pure subroutine fitpack_core::fpintb (t, n, bint, nk1, x, y)
 Compute definite integrals of the normalized B-splines.
 
pure subroutine fitpack_core::fpknot (x, m, t, n, fpint, nrdata, nrint, nest, istart)
 Select and insert a new knot at the location of maximum residual.
 
pure subroutine fitpack_core::fpopdi (ifsu, ifsv, ifbu, ifbv, u, mu, v, mv, z, mz, z0, dz, iopt, ider, tu, nu, tv, nv, nuest, nvest, p, step, c, nc, fp, fpu, fpv, nru, nrv, wrk, lwrk)
 Compute smoothing spline on a polar grid with origin constraints.
 
pure subroutine fitpack_core::fpopsp (ifsu, ifsv, ifbu, ifbv, u, mu, v, mv, r, mr, r0, r1, dr, iopt, ider, tu, nu, tv, nv, nuest, nvest, p, step, c, nc, fp, fpu, fpv, nru, nrv, wrk, lwrk)
 Compute smoothing spline on a spherical grid with pole constraints.
 
pure subroutine fitpack_core::fporde (x, y, m, kx, ky, tx, nx, ty, ny, nummer, index, nreg)
 Sort scattered data points into rectangular panels.
 
pure subroutine fitpack_core::fppara (iopt, idim, m, u, mx, x, w, ub, ue, k, s, nest, tol, maxit, k1, k2, n, t, nc, c, fp, fpint, z, a, b, g, q, nrdata, ier)
 Core algorithm for open parametric curve fitting.
 
pure subroutine fitpack_core::fppasu (iopt, ipar, idim, u, mu, v, mv, z, mz, s, nuest, nvest, tol, maxit, nc, nu, tu, nv, tv, c, fp, fp0, fpold, reducu, reducv, fpintu, fpintv, lastdi, nplusu, nplusv, nru, nrv, nrdatu, nrdatv, wrk, lwrk, ier)
 Core algorithm for parametric surface fitting on a grid.
 
pure subroutine fitpack_core::fpperi (iopt, x, y, w, m, k, s, nest, tol, maxit, k1, k2, n, t, c, fp, fpint, z, a1, a2, b, g1, g2, q, nrdata, ier)
 Core algorithm for univariate periodic spline fitting.
 
pure subroutine fitpack_core::fpperi_reset_interp (k, m, n, nest, kk, kk1, x, y, t, c, fp, per, fp0, s, fpint, nrdata, done)
 Set up the initial knot configuration for periodic spline interpolation.
 
pure subroutine fitpack_core::fppocu (idim, k, a, b, ib, db, nb, ie, de, ne, cp, np)
 Construct a polynomial curve satisfying endpoint derivative constraints.
 
pure subroutine fitpack_core::fppogr (iopt, ider, u, mu, v, mv, z, mz, z0, r, s, nuest, nvest, tol, maxit, nc, nu, tu, nv, tv, c, fp, fp0, fpold, reducu, reducv, fpintu, fpintv, dz, step, lastdi, nplusu, nplusv, lasttu, nru, nrv, nrdatu, nrdatv, wrk, lwrk, ier)
 Driver for polar grid smoothing spline with knot selection.
 
pure subroutine fitpack_core::fppola (iopt1, iopt2, iopt3, m, u, v, z, w, rad, s, nuest, nvest, eta, tol, maxit, ib1, ib3, nc, ncc, intest, nrest, nu, tu, nv, tv, c, fp, sup, fpint, coord, f, ff, row, cs, cosi, a, q, bu, bv, spu, spv, h, index, nummer, wrk, lwrk, ier)
 Core algorithm for spline fitting on a polar domain.
 
elemental subroutine fitpack_core::root_finding_iterate (p1, f1, p2, f2, p3, f3, p, fpms, acc, check1, check3, success)
 Update the smoothing parameter \( p \) during iterative knot selection.
 
pure subroutine fitpack_core::fprank (a, f, n, m, na, tol, c, sq, rank, aa, ff, h)
 Compute the minimum-norm least-squares solution under rank deficiency.
 
elemental subroutine fitpack_core::fprati (p1, f1, p2, f2, p3, f3, p)
 Rational interpolation for the smoothing parameter search.
 
pure subroutine fitpack_core::fpregr (iopt, x, mx, y, my, z, mz, xb, xe, yb, ye, kx, ky, s, nxest, nyest, tol, maxit, nc, nx, tx, ny, ty, c, fp, fp0, fpold, reducx, reducy, fpintx, fpinty, lastdi, nplusx, nplusy, nrx, nry, nrdatx, nrdaty, wrk, lwrk, ier)
 Driver for rectangular grid smoothing surface with knot selection.
 
elemental integer function fitpack_core::new_knot_dimension (n1, n1add, n1max, n2, n2add, n2max, last)
 Choose which dimension receives the next knot during bivariate fitting.
 
elemental subroutine fitpack_core::fprota (cos, sin, a, b)
 Apply a Givens plane rotation to two scalars.
 
pure subroutine fitpack_core::fprppo (nu, nv, if1, if2, cosi, ratio, c, f, ncoff)
 Convert constrained polar spline coefficients to standard form.
 
pure subroutine fitpack_core::fprpsp (nt, np, co, si, c, f, ncoff)
 Convert constrained spherical spline coefficients to standard form.
 
pure subroutine fitpack_core::fpseno (maxtr, up, left, right, info, merk, ibind, nbind)
 Fetch and advance to the next branch in the constraint-set tree.
 
pure subroutine fitpack_core::fpspgr (iopt, ider, u, mu, v, mv, r, mr, r0, r1, s, nuest, nvest, tol, maxit, nc, nu, tu, nv, tv, c, fp, fp0, fpold, reducu, reducv, fpintu, fpintv, dr, step, lastdi, nplusu, nplusv, lastu0, lastu1, nru, nrv, nrdatu, nrdatv, wrk, lwrk, ier)
 Driver for spherical grid smoothing spline with knot selection.
 
pure subroutine fitpack_core::fpsphe (iopt, m, teta, phi, r, w, s, ntest, npest, eta, tol, maxit, ib1, ib3, nc, ncc, intest, nrest, nt, tt, np, tp, c, fp, sup, fpint, coord, f, ff, row, coco, cosi, a, q, bt, bp, spt, spp, h, index, nummer, wrk, lwrk, ier)
 Core algorithm for spline fitting on the sphere.
 
pure subroutine fitpack_core::fpsuev (idim, tu, nu, tv, nv, c, u, mu, v, mv, f, wu, wv, lu, lv)
 Evaluate a parametric bicubic tensor-product spline surface.
 
pure subroutine fitpack_core::fpsurf (iopt, m, x, y, z, w, xb, xe, yb, ye, kxx, kyy, s, nxest, nyest, eta, tol, maxit, nmax, km1, km2, ib1, ib3, nc, intest, nrest, nx0, tx, ny0, ty, c, fp, fp0, fpint, coord, f, ff, a, q, bx, by, spx, spy, h, index, nummer, wrk, lwrk, ier)
 Core algorithm for bivariate tensor-product spline surface fitting.
 
pure subroutine sort_xy (interchanged, m, nmax, nc, nk1x, nk1y, iopt, l1, l2, c, f, x, y, tx, ty, nx, ny, nx0, ny0)
 Restore original x/y ordering if axes were interchanged.
 
pure subroutine fitpack_core::fpsysy (a, n, g)
 Solve a small symmetric linear system by Cholesky factorization.
 
pure subroutine fitpack_core::fptrnp (m, mm, idim, n, nr, sp, p, b, z, a, q, right)
 Triangularize the tensor-product system for non-periodic grids.
 
pure subroutine fitpack_core::fptrpe (m, mm, idim, n, nr, sp, p, b, z, a, aa, q, right)
 Triangularize the tensor-product system for periodic grids.
 
pure subroutine, public fitpack_core::insert (iopt, t, n, c, k, x, tt, nn, cc, nest, ier)
 Insert a single knot into a spline, returning a new B-spline representation.
 
pure subroutine, public fitpack_core::insert_inplace (iopt, t, n, c, k, x, nest, ier)
 Insert a single knot into a spline in place (avoiding aliasing issues).
 
pure subroutine, public fitpack_core::parcur (iopt, ipar, idim, m, u, mx, x, w, ub, ue, k, s, nest, n, t, nc, c, fp, wrk, lwrk, iwrk, ier)
 Determine a smooth parametric spline curve approximation.
 
pure subroutine, public fitpack_core::parder (tx, nx, ty, ny, c, kx, ky, nux, nuy, x, mx, y, my, z, wrk, lwrk, iwrk, kwrk, ier)
 Evaluate a partial derivative of a bivariate spline on a rectangular grid.
 
pure subroutine, public fitpack_core::pardeu (tx, nx, ty, ny, c, kx, ky, nux, nuy, x, y, z, m, wrk, lwrk, iwrk, kwrk, ier)
 Evaluate a partial derivative of a bivariate spline at scattered points.
 
pure subroutine, public fitpack_core::pardtc (tx, nx, ty, ny, c, kx, ky, nux, nuy, newc, ier)
 Transform B-spline coefficients to obtain the partial derivative spline.
 
pure subroutine, public fitpack_core::parsur (iopt, ipar, idim, mu, u, mv, v, f, s, nuest, nvest, nu, tu, nv, tv, c, fp, wrk, lwrk, iwrk, kwrk, ier)
 Fit a smooth parametric surface to gridded data.
 
pure subroutine, public fitpack_core::percur (iopt, m, x, y, w, k, s, nest, n, t, c, fp, wrk, lwrk, iwrk, ier)
 Determine a smooth periodic spline approximation to data.
 
subroutine, public fitpack_core::pogrid (iopt, ider, mu, u, mv, v, z, z0, r, s, nuest, nvest, nu, tu, nv, tv, c, fp, wrk, lwrk, iwrk, kwrk, ier)
 Fit a smooth bivariate spline to gridded data on a polar (disc) domain.
 
pure subroutine, public fitpack_core::polar (iopt, m, x, y, z, w, rad, s, nuest, nvest, eps, nu, tu, nv, tv, u, v, c, fp, wrk1, lwrk1, wrk2, lwrk2, iwrk, kwrk, ier)
 Fit a smooth bivariate spline to scattered data on a polar domain.
 
pure subroutine, public fitpack_core::profil (iopt, tx, nx, ty, ny, c, kx, ky, u, nu, cu, ier)
 Extract a cross-section (profile) of a bivariate spline.
 
pure subroutine, public fitpack_core::regrid (iopt, mx, x, my, y, z, xb, xe, yb, ye, kx, ky, s, nxest, nyest, nx, tx, ny, ty, c, fp, wrk, lwrk, iwrk, kwrk, ier)
 Fit a smoothing bivariate spline to data on a rectangular grid.
 
pure subroutine, public fitpack_core::spalde (t, n, c, k1, x, d, ier)
 Evaluate all derivatives of a spline at a single point.
 
pure subroutine, public fitpack_core::spgrid (iopt, ider, mu, u, mv, v, r, r0, r1, s, nuest, nvest, nu, tu, nv, tv, c, fp, wrk, lwrk, iwrk, kwrk, ier)
 Fit a smooth bivariate spline to gridded data on a sphere (latitude-longitude grid).
 
pure subroutine, public fitpack_core::sphere (iopt, m, teta, phi, r, w, s, ntest, npest, eps, nt, tt, np, tp, c, fp, wrk1, lwrk1, wrk2, lwrk2, iwrk, kwrk, ier)
 Fit a smooth bicubic spherical spline to scattered data on a sphere.
 
pure subroutine, public fitpack_core::splder (t, n, c, k, nu, x, y, m, e, wrk, ier)
 Evaluate the \( \nu \)-th derivative of a spline \( s(x) \) at a set of points.
 
pure subroutine, public fitpack_core::splev (t, n, c, k, x, y, m, e, ier)
 Evaluate a spline \( s(x) \) of degree \( k \) at a set of points.
 
real(fp_real) function, public fitpack_core::splint (t, n, c, k, a, b, wrk)
 Compute the definite integral of a spline \( s(x) \) over \( [a, b] \).
 
pure subroutine, public fitpack_core::sproot (t, n, c, zeros, mest, m, ier)
 Find the zeros of a cubic spline \( s(x) \) given in B-spline representation.
 
pure subroutine, public fitpack_core::surev (idim, tu, nu, tv, nv, c, u, mu, v, mv, f, mf, wrk, lwrk, iwrk, kwrk, ier)
 Evaluate a parametric bicubic spline surface on a grid.
 
pure subroutine, public fitpack_core::surfit (iopt, m, x, y, z, w, xb, xe, yb, ye, kx, ky, s, nxest, nyest, nmax, eps, nx, tx, ny, ty, c, fp, wrk1, lwrk1, wrk2, lwrk2, iwrk, kwrk, ier)
 Fit a smoothing bivariate spline to scattered data.
 
pure integer(fp_size) function, dimension(size(list)), public fitpack_core::fitpack_argsort (list)
 Return the permutation indices that would sort an array.
 
pure recursive subroutine fitpack_core::fitpack_quicksort (list, ilist, down)
 In-place quicksort with optional index tracking.
 
elemental logical(fp_bool) function tobeswapped (a, b, orequal)
 
elemental subroutine fitpack_core::swap_data (a, b)
 Swap two real values in place.
 
elemental subroutine fitpack_core::swap_size (a, b)
 Swap two integer values in place.
 
elemental logical(fp_bool) function fitpack_core::is_before (a, b)
 Test \( a < b \) (strict less-than).
 
elemental logical(fp_bool) function fitpack_core::is_after (a, b)
 Test \( a > b \) (strict greater-than).
 
elemental logical(fp_bool) function fitpack_core::is_ge (a, b)
 Test \( a \ge b \).
 
elemental logical(fp_bool) function fitpack_core::is_le (a, b)
 Test \( a \le b \).
 
elemental logical(fp_bool) function, public fitpack_core::equal (a, b)
 Test whether two reals are equal within machine precision.
 
elemental logical(fp_bool) function fitpack_core::not_equal (a, b)
 Test whether two reals differ beyond machine precision.
 
elemental integer(fp_size) function, public fitpack_core::fp_rcomms_per_bits (nbits)
 Number of FP_COMM elements required to store nbits of data.
 
pure integer(fp_size) function fitpack_core::fp_real_comm_size_1d (array)
 Calculate storage size for 1D real(FP_REAL) allocatable array Header: 1 FP_COMM storing bounds as 2 int32 (or NOT_ALLOC marker) Data: raw transfer of array contents.
 
pure integer(fp_size) function fitpack_core::fp_real_comm_size_2d (array)
 Calculate storage size for 2D real(FP_REAL) allocatable array.
 
pure integer(fp_size) function fitpack_core::fp_real_comm_size_3d (array)
 Calculate storage size for 3D real(FP_REAL) allocatable array.
 
pure integer(fp_size) function fitpack_core::fp_size_comm_size_1d (array)
 Calculate storage size for 1D integer(FP_SIZE) allocatable array.
 
pure subroutine fitpack_core::fp_real_comm_pack_1d (array, buffer)
 Pack 1D real(FP_REAL) allocatable array into communication buffer.
 
pure subroutine fitpack_core::fp_real_comm_pack_2d (array, buffer)
 Pack 2D real(FP_REAL) allocatable array into communication buffer.
 
pure subroutine fitpack_core::fp_real_comm_pack_3d (array, buffer)
 Pack 3D real(FP_REAL) allocatable array into communication buffer.
 
pure subroutine fitpack_core::fp_size_comm_pack_1d (array, buffer)
 Pack 1D integer(FP_SIZE) allocatable array into communication buffer.
 
pure subroutine fitpack_core::fp_real_comm_expand_1d (array, buffer)
 Expand communication buffer into 1D real(FP_REAL) allocatable array.
 
pure subroutine fitpack_core::fp_real_comm_expand_2d (array, buffer)
 Expand communication buffer into 2D real(FP_REAL) allocatable array.
 
pure subroutine fitpack_core::fp_real_comm_expand_3d (array, buffer)
 Expand communication buffer into 3D real(FP_REAL) allocatable array.
 
pure subroutine fitpack_core::fp_size_comm_expand_1d (array, buffer)
 Expand communication buffer into 1D integer(FP_SIZE) allocatable array.
 
pure integer(fp_size) function fitpack_core::fp_bool_comm_size_1d (array)
 Calculate storage size for 1D logical(FP_BOOL) allocatable array.
 
pure subroutine fitpack_core::fp_bool_comm_pack_1d (array, buffer)
 Pack 1D logical(FP_BOOL) allocatable array into communication buffer.
 
pure subroutine fitpack_core::fp_bool_comm_expand_1d (array, buffer)
 Expand communication buffer into 1D logical(FP_BOOL) allocatable array.
 

Variables

integer, parameter, public fitpack_core::fp_real = c_double
 
integer, parameter, public fitpack_core::fp_size = c_int32_t
 
integer, parameter, public fitpack_core::fp_flag = c_int32_t
 
integer, parameter, public fitpack_core::fp_bool = c_bool
 
integer, parameter, public fitpack_core::fp_comm = c_double
 
integer(fp_size), parameter fitpack_core::fp_not_alloc = -99999999_FP_SIZE
 Marker for unallocated arrays in communication buffers.
 
integer(fp_flag), parameter, public fitpack_core::outside_extrapolate = 0
 
integer(fp_flag), parameter, public fitpack_core::outside_zero = 1
 
integer(fp_flag), parameter, public fitpack_core::outside_not_allowed = 2
 
integer(fp_flag), parameter, public fitpack_core::outside_nearest_bnd = 3
 
integer(fp_flag), parameter, public fitpack_core::iopt_new_leastsquares = -1
 
integer(fp_flag), parameter, public fitpack_core::iopt_new_smoothing = 0
 
integer(fp_flag), parameter, public fitpack_core::iopt_old_fit = 1
 
integer(fp_size), parameter, public fitpack_core::max_idim = 10
 
integer(fp_flag), parameter, public fitpack_core::knot_dim_none = 0
 
integer(fp_flag), parameter, public fitpack_core::knot_dim_2 = 1
 
integer(fp_flag), parameter, public fitpack_core::knot_dim_1 = -1
 
integer(fp_size), parameter, public fitpack_core::max_order = 19
 
integer(fp_size), parameter, public fitpack_core::degree_3 = 3
 
integer(fp_size), parameter, public fitpack_core::degree_4 = 4
 
integer(fp_size), parameter, public fitpack_core::degree_5 = 5
 
integer(fp_flag), parameter, public fitpack_core::fitpack_ok = 0
 
integer(fp_flag), parameter, public fitpack_core::fitpack_interpolating_ok = -1
 
integer(fp_flag), parameter, public fitpack_core::fitpack_leastsquares_ok = -2
 
integer(fp_flag), parameter, public fitpack_core::fitpack_insufficient_storage = 1
 
integer(fp_flag), parameter, public fitpack_core::fitpack_s_too_small = 2
 
integer(fp_flag), parameter, public fitpack_core::fitpack_maxit = 3
 
integer(fp_flag), parameter, public fitpack_core::fitpack_too_many_knots = 4
 
integer(fp_flag), parameter, public fitpack_core::fitpack_overlapping_knots = 5
 
integer(fp_flag), parameter, public fitpack_core::fitpack_invalid_range = 6
 
integer(fp_flag), parameter, public fitpack_core::fitpack_input_error = 10
 
integer(fp_flag), parameter, public fitpack_core::fitpack_test_error = 11
 
integer(fp_flag), parameter, public fitpack_core::fitpack_invalid_constraint = 12
 
integer(fp_flag), parameter, public fitpack_core::fitpack_insufficient_knots = 13
 
integer(fp_flag), parameter, public fitpack_core::concon_maxbin = 14
 
integer(fp_flag), parameter, public fitpack_core::concon_maxtr = 15
 
integer(fp_flag), parameter, public fitpack_core::concon_qp_fail = 16
 
logical(fp_bool), parameter, public fitpack_core::fp_true = .true._FP_BOOL
 
logical(fp_bool), parameter, public fitpack_core::fp_false = .false._FP_BOOL
 
integer(fp_size), parameter fitpack_core::izero = 0_FP_SIZE
 
integer(fp_size), parameter fitpack_core::ione = 1_FP_SIZE
 
integer(fp_size), parameter fitpack_core::itwo = 2_FP_SIZE
 
integer(fp_size), parameter fitpack_core::ithree = 3_FP_SIZE
 
integer(fp_size), parameter fitpack_core::ifour = 4_FP_SIZE
 
integer(fp_size), parameter fitpack_core::ifive = 5_FP_SIZE
 
real(fp_real), parameter, public fitpack_core::one = 1.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::zero = 0.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::half = 0.5_FP_REAL
 
real(fp_real), parameter, public fitpack_core::onep5 = 1.5_FP_REAL
 
real(fp_real), parameter, public fitpack_core::third = one/3.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::fourth = 0.25_FP_REAL
 
real(fp_real), parameter, public fitpack_core::two = 2.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::three = 3.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::four = 4.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::five = 5.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::six = 6.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::ten = 10.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::pi = atan2(zero, -one)
 
real(fp_real), parameter, public fitpack_core::pi2 = 2*pi
 
real(fp_real), parameter, public fitpack_core::pi4 = 4*pi
 
real(fp_real), parameter, public fitpack_core::pio2 = half*pi
 
real(fp_real), parameter, public fitpack_core::pio4 = fourth*pi
 
real(fp_real), parameter, public fitpack_core::pio8 = 0.125_FP_REAL*pi
 
real(fp_real), parameter, public fitpack_core::deg2rad = pi/180.0_FP_REAL
 
real(fp_real), parameter, public fitpack_core::smallnum03 = 1.0e-03_FP_REAL
 
real(fp_real), parameter, public fitpack_core::smallnum06 = 1.0e-06_FP_REAL
 
real(fp_real), parameter, public fitpack_core::smallnum08 = 1.0e-08_FP_REAL
 
real(fp_real), parameter, public fitpack_core::smallnum10 = 1.0e-10_FP_REAL
 

Function/Subroutine Documentation

◆ sort_xy()

pure subroutine fpsurf::sort_xy ( logical(fp_bool), intent(in) interchanged,
integer(fp_size), intent(in) m,
integer(fp_size), intent(in) nmax,
integer(fp_size), intent(in) nc,
integer(fp_size), intent(in) nk1x,
integer(fp_size), intent(in) nk1y,
integer(fp_size), intent(in) iopt,
integer(fp_size), intent(inout) l1,
integer(fp_size), intent(inout) l2,
real(fp_real), dimension(nc), intent(inout) c,
real(fp_real), dimension(nc), intent(inout) f,
real(fp_real), dimension(m), intent(inout) x,
real(fp_real), dimension(m), intent(inout) y,
real(fp_real), dimension(nmax), intent(inout) tx,
real(fp_real), dimension(nmax), intent(inout) ty,
integer(fp_size), intent(inout) nx,
integer(fp_size), intent(inout) ny,
integer(fp_size), intent(inout) nx0,
integer(fp_size), intent(inout) ny0 )
private

Restore original x/y ordering if axes were interchanged.

When fpsurf interchanges the \( x \)- and \( y \)-axes for efficiency (ensuring more knots in the outer loop direction), this routine swaps them back on exit so the caller sees the original orientation.

◆ tobeswapped()

elemental logical(fp_bool) function fitpack_quicksort::tobeswapped ( real(fp_real), intent(in) a,
real(fp_real), intent(in) b,
logical(fp_bool), intent(in) orequal )
private
Here is the call graph for this function: