fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fitpack_parametric_surfaces::fitpack_parametric_surface Interface Reference

Bicubic parametric surface fitter in \( \mathbb{R}^d \). More...

Inheritance diagram for fitpack_parametric_surfaces::fitpack_parametric_surface:
Collaboration diagram for fitpack_parametric_surfaces::fitpack_parametric_surface:

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_flagiopt = IOPT_NEW_SMOOTHING
 Fitting state flag.
 
real(fp_realsmoothing = 1000.0_FP_REAL
 Smoothing parameter.
 
real(fp_realfp = zero
 Weighted sum of squared residuals.
 
real(fp_real), dimension(:), allocatable c
 B-spline coefficients.
 
integer(fp_sizelwrk = 0
 Real workspace and its size.
 
real(fp_real), dimension(:), allocatable wrk
 
integer(fp_sizeliwrk = 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.
 

Detailed Description

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.

See also
Dierckx, Ch. 10, §10.2 (pp. 241–254)

Member Function/Subroutine Documentation

◆ comm_expand()

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.

Here is the call graph for this function:

◆ comm_pack()

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.

◆ comm_size()

procedure fitpack_parametric_surfaces::fitpack_parametric_surface::comm_size ( class(fitpack_parametric_surface), intent(in) this)

Parallel communication interface.

◆ destroy()

procedure fitpack_parametric_surfaces::fitpack_parametric_surface::destroy ( class(fitpack_parametric_surface), intent(inout) this)

Clean memory.

◆ eval() [1/2]

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.

Returns
Point \( \mathbf{s}(u, v) \in \mathbb{R}^d \).
See also
surev
Here is the call graph for this function:

◆ eval() [2/2]

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) \).

See also
surev

◆ fit()

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.

See also
parsur

◆ interpolate()

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 \)).

See also
parsur

◆ least_squares()

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.

See also
parsur

◆ new_fit()

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.

See also
parsur

◆ new_from_points()

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.

Parameters
[in]uParameter grid in the u direction.
[in]vParameter grid in the v direction.
[in]zData values z(j,i,l) for component l at (u(i),v(j)).
[in]periodic_BCOptional periodicity flags [u_periodic, v_periodic].
[out]ierrOptional error flag.
Returns
Fitted parametric surface object.
See also
parsur
Here is the call graph for this function:

◆ new_points()

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.

See also
parsur

◆ surf_eval_grid()

procedure, private fitpack_parametric_surfaces::fitpack_parametric_surface::surf_eval_grid ( 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 )
private

Evaluate the parametric surface on a rectangular parameter grid.

Returns f(j,i,l) = \( s_l(u_i, v_j) \).

See also
surev

◆ surf_eval_one()

procedure, private fitpack_parametric_surfaces::fitpack_parametric_surface::surf_eval_one ( class(fitpack_parametric_surface), intent(inout) this,
real(fp_real), intent(in) u,
real(fp_real), intent(in) v,
integer, intent(out), optional ierr )
private

Evaluate curve at given coordinates.

Returns
Point \( \mathbf{s}(u, v) \in \mathbb{R}^d \).
See also
surev

Member Data Documentation

◆ idim

integer fitpack_parametric_surfaces::fitpack_parametric_surface::idim = 0

Number of dimensions.

◆ knots

integer, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::knots = 0

◆ nest

integer, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::nest = 0

Estimated and actual number of knots and their allocations.

◆ nmax

integer fitpack_parametric_surfaces::fitpack_parametric_surface::nmax = 0

◆ periodic_dim

logical, dimension(2) fitpack_parametric_surfaces::fitpack_parametric_surface::periodic_dim = .false.

Flags to determine whether dimensions u,v are periodic.

◆ t

real(fp_real), dimension(:,:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::t

◆ u

real(fp_real), dimension(:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::u

Parameter grid values.

◆ v

real(fp_real), dimension(:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::v

◆ z

real(fp_real), dimension(:,:,:), allocatable fitpack_parametric_surfaces::fitpack_parametric_surface::z

idim-dimensional function values [size(v),size(u),idim]


The documentation for this interface was generated from the following file: