|
fitpack
Modern Fortran library for curve and surface fitting with splines
|
Bicubic parametric surface fitter in \( \mathbb{R}^d \). More...


Public Member Functions | |
| procedure | destroy (this) |
| Clean memory. | |
| procedure | new_points (this, u, v, z, periodic_bc) |
| Set new points. | |
| procedure | new_fit (this, u, v, z, smoothing, periodic_bc) |
| Generate new fit. | |
| procedure | fit (this, smoothing, periodic, keep_knots) |
| Generate/update fitting curve, with optional smoothing. | |
| procedure | interpolate (this, reset_knots) |
| Fit an interpolating parametric surface ( \( s = 0 \)). | |
| procedure | least_squares (this, u_knots, v_knots, smoothing, reset_knots) |
| Fit a least-squares parametric surface with current or user-supplied knots. | |
| generic | eval (this, u, v, ierr) |
| Evaluate curve at given coordinates. | |
| generic | eval (this, u, v, ierr) |
| Evaluate the parametric surface on a rectangular parameter grid. | |
| procedure | comm_size (this) |
| Parallel communication interface. | |
| procedure | comm_pack (this, buffer) |
| Pack parametric surface data into a communication buffer. | |
| procedure | comm_expand (this, buffer) |
| Expand parametric surface data from a communication buffer. | |
| type(fitpack_parametric_surface) function | new_from_points (u, v, z, periodic_bc, ierr) |
| Construct a parametric surface from gridded data and perform a default fit. | |
Public Member Functions inherited from fitpack_fitters::fitpack_fitter | |
| procedure, non_overridable | mse (this) |
| MSE accessor (shared by all types) | |
| procedure, non_overridable | core_comm_size (this) |
| Base field helpers for comm (non-overridable, called by subtypes) | |
| procedure, non_overridable | core_comm_pack (this, buffer) |
| Pack base fields into communication buffer. | |
| procedure, non_overridable | core_comm_expand (this, buffer) |
| Expand base fields from communication buffer. | |
| procedure, non_overridable | destroy_base (this) |
| Base field reset (called by subtype destroy methods) | |
| procedure(comm_size_if), deferred | comm_size (this) |
| Deferred communication interface. | |
| procedure(comm_pack_if), deferred | comm_pack (this, buffer) |
| procedure(comm_expand_if), deferred | comm_expand (this, buffer) |
Public Attributes | |
| integer | idim = 0 |
| Number of dimensions. | |
| real(fp_real), dimension(:), allocatable | u |
| Parameter grid values. | |
| real(fp_real), dimension(:), allocatable | v |
| real(fp_real), dimension(:,:,:), allocatable | z |
| idim-dimensional function values [size(v),size(u),idim] | |
| logical, dimension(2) | periodic_dim = .false. |
| Flags to determine whether dimensions u,v are periodic. | |
| integer, dimension(2) | nest = 0 |
| Estimated and actual number of knots and their allocations. | |
| integer | nmax = 0 |
| integer, dimension(2) | knots = 0 |
| real(fp_real), dimension(:,:), allocatable | t |
Public Attributes inherited from fitpack_fitters::fitpack_fitter | |
| integer(fp_flag) | iopt = IOPT_NEW_SMOOTHING |
| Fitting state flag. | |
| real(fp_real) | smoothing = 1000.0_FP_REAL |
| Smoothing parameter. | |
| real(fp_real) | fp = zero |
| Weighted sum of squared residuals. | |
| real(fp_real), dimension(:), allocatable | c |
| B-spline coefficients. | |
| integer(fp_size) | lwrk = 0 |
| Real workspace and its size. | |
| real(fp_real), dimension(:), allocatable | wrk |
| integer(fp_size) | liwrk = 0 |
| Integer workspace and its size. | |
| integer(fp_size), dimension(:), allocatable | iwrk |
Private Member Functions | |
| procedure, private | surf_eval_one (this, u, v, ierr) |
| Evaluate curve at given coordinates. | |
| procedure, private | surf_eval_grid (this, u, v, ierr) |
| Evaluate the parametric surface on a rectangular parameter grid. | |
Bicubic parametric surface fitter in \( \mathbb{R}^d \).
Fits a tensor-product bicubic spline surface \( \mathbf{s}(u, v) = (s_1(u,v), \ldots, s_d(u,v)) \) through data points \( \mathbf{z}(j, i) \in \mathbb{R}^d \) given on a rectangular parameter grid \( (u_i, v_j) \). Each dimension \( u \) and \( v \) may be flagged as periodic. Uses the parsur core routine.
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::comm_expand | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_comm), dimension(:), intent(in) | buffer ) |
Expand parametric surface data from a communication buffer.

| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::comm_pack | ( | class(fitpack_parametric_surface), intent(in) | this, |
| real(fp_comm), dimension(:), intent(out) | buffer ) |
Pack parametric surface data into a communication buffer.
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::comm_size | ( | class(fitpack_parametric_surface), intent(in) | this | ) |
Parallel communication interface.
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::destroy | ( | class(fitpack_parametric_surface), intent(inout) | this | ) |
Clean memory.
| generic fitpack_parametric_surfaces::fitpack_parametric_surface::eval | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), intent(in) | u, | ||
| real(fp_real), intent(in) | v, | ||
| integer, intent(out), optional | ierr ) |
Evaluate curve at given coordinates.

| generic fitpack_parametric_surfaces::fitpack_parametric_surface::eval | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), dimension(:), intent(in) | u, | ||
| real(fp_real), dimension(:), intent(in) | v, | ||
| integer, intent(out), optional | ierr ) |
Evaluate the parametric surface on a rectangular parameter grid.
Returns f(j,i,l) = \( s_l(u_i, v_j) \).
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::fit | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), intent(in), optional | smoothing, | ||
| logical, dimension(2), intent(in), optional | periodic, | ||
| logical, intent(in), optional | keep_knots ) |
Generate/update fitting curve, with optional smoothing.
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::interpolate | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| logical, intent(in), optional | reset_knots ) |
Fit an interpolating parametric surface ( \( s = 0 \)).
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::least_squares | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), dimension(:), intent(in), optional | u_knots, | ||
| real(fp_real), dimension(:), intent(in), optional | v_knots, | ||
| real(fp_real), intent(in), optional | smoothing, | ||
| logical, intent(in), optional | reset_knots ) |
Fit a least-squares parametric surface with current or user-supplied knots.
Optional u_knots and v_knots set interior knots directly. If omitted, the current knot vectors are used.
| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::new_fit | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), dimension(:), intent(in) | u, | ||
| real(fp_real), dimension(:), intent(in) | v, | ||
| real(fp_real), dimension(:,:,:), intent(in) | z, | ||
| real(fp_real), intent(in), optional | smoothing, | ||
| logical, dimension(2), intent(in), optional | periodic_bc ) |
Generate new fit.
| type(fitpack_parametric_surface) function fitpack_parametric_surfaces::fitpack_parametric_surface::new_from_points | ( | real(fp_real), dimension(:), intent(in) | u, |
| real(fp_real), dimension(:), intent(in) | v, | ||
| real(fp_real), dimension(:,:,:), intent(in) | z, | ||
| logical, dimension(2), intent(in), optional | periodic_bc, | ||
| integer, intent(out), optional | ierr ) |
Construct a parametric surface from gridded data and perform a default fit.
| [in] | u | Parameter grid in the u direction. |
| [in] | v | Parameter grid in the v direction. |
| [in] | z | Data values z(j,i,l) for component l at (u(i),v(j)). |
| [in] | periodic_BC | Optional periodicity flags [u_periodic, v_periodic]. |
| [out] | ierr | Optional error flag. |

| procedure fitpack_parametric_surfaces::fitpack_parametric_surface::new_points | ( | class(fitpack_parametric_surface), intent(inout) | this, |
| real(fp_real), dimension(:), intent(in) | u, | ||
| real(fp_real), dimension(:), intent(in) | v, | ||
| real(fp_real), dimension(:,:,:), intent(in) | z, | ||
| logical, dimension(2), intent(in), optional | periodic_bc ) |
Set new points.
|
private |
Evaluate the parametric surface on a rectangular parameter grid.
Returns f(j,i,l) = \( s_l(u_i, v_j) \).
|
private |
Evaluate curve at given coordinates.
| integer fitpack_parametric_surfaces::fitpack_parametric_surface::idim = 0 |
Number of dimensions.
| integer, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::knots = 0 |
| integer, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::nest = 0 |
Estimated and actual number of knots and their allocations.
| integer fitpack_parametric_surfaces::fitpack_parametric_surface::nmax = 0 |
| logical, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::periodic_dim = .false. |
Flags to determine whether dimensions u,v are periodic.
| real(fp_real), dimension(:,:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::t |
| real(fp_real), dimension(:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::u |
Parameter grid values.
| real(fp_real), dimension(:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::v |
| real(fp_real), dimension(:,:,:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::z |
idim-dimensional function values [size(v),size(u),idim]