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

Bicubic spline fitter for data scattered over a general polar domain. More...

Inheritance diagram for fitpack_polar_domains::fitpack_polar:
Collaboration diagram for fitpack_polar_domains::fitpack_polar:

Public Member Functions

procedure destroy (this)
 Clean memory.
 
procedure new_points (this, x, y, z, boundary, w, boundary_bc)
 Set new points.
 
procedure new_fit (this, x, y, z, boundary, w, boundary_bc, smoothing)
 Generate new fit.
 
procedure fit (this, smoothing, keep_knots)
 Generate/update fitting curve, with optional smoothing.
 
procedure least_squares (this, smoothing, reset_knots)
 Fit a least-squares polar surface with fixed knots.
 
procedure interpolate (this, reset_knots)
 Fit an interpolating polar surface ( \( s = 0 \)).
 
generic eval (this, x, y, ierr)
 Evaluate polar domain at given x,y coordinates.
 
generic eval (this, x, y, ierr)
 Evaluate the polar surface at multiple Cartesian points.
 
procedure comm_size (this)
 Communication interface.
 
procedure comm_pack (this, buffer)
 Pack polar surface data into a communication buffer.
 
procedure comm_expand (this, buffer)
 Expand polar surface data from a communication buffer.
 
type(fitpack_polar) function polr_new_from_points (x, y, z, boundary, w, boundary_bc, ierr)
 Construct a polar surface from scattered 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 m = 0
 Scattered data points.
 
real(fp_real), dimension(:), allocatable x
 
real(fp_real), dimension(:), allocatable y
 
real(fp_real), dimension(:), allocatable z
 Function values at the points.
 
real(fp_real), dimension(:), allocatable u
 Coordinates of the data points in rectangular coordinates (u,v)
 
real(fp_real), dimension(:), allocatable v
 
real(fp_real), dimension(:), allocatable w
 
integer lwrk2 = 0
 
real(fp_real), dimension(:), allocatable wrk2
 
integer bc_continuity_origin = 2
 
integer bc_boundary = OUTSIDE_EXTRAPOLATE
 
integer, dimension(2) nest = 0
 
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
 

Static Public Attributes

procedure(fitpack_polar_boundary), pointer, nopass rad => null()
 Function that describes shape of the polar boundary: radius as a function of angle theta: x = rad(v)*cos(v) , y = rad(v)*sin(v), -pi <= v <= pi.
 

Private Member Functions

procedure, private polr_eval_one (this, x, y, ierr)
 Evaluate polar domain at given x,y coordinates.
 
procedure, private polr_eval_many (this, x, y, ierr)
 Evaluate the polar surface at multiple Cartesian points.
 

Detailed Description

Bicubic spline fitter for data scattered over a general polar domain.

Stores the scattered Cartesian data \( (x_i, y_i, z_i) \), the user-supplied boundary function \( r(\theta) \), optional weights, and the fitted B-spline representation. The smoothing parameter controls the trade-off between closeness of fit and smoothness, while continuity at the origin ( \( u = 0 \)) is enforced up to order \( C^0 \), \( C^1 \), or \( C^2 \).

See also
Dierckx, Ch. 11, §11.1 (pp. 255–263)

Member Function/Subroutine Documentation

◆ comm_expand()

procedure fitpack_polar_domains::fitpack_polar::comm_expand ( class(fitpack_polar), intent(inout) this,
real(fp_comm), dimension(:), intent(in) buffer )

Expand polar surface data from a communication buffer.

Here is the call graph for this function:

◆ comm_pack()

procedure fitpack_polar_domains::fitpack_polar::comm_pack ( class(fitpack_polar), intent(in) this,
real(fp_comm), dimension(:), intent(out) buffer )

Pack polar surface data into a communication buffer.

◆ comm_size()

procedure fitpack_polar_domains::fitpack_polar::comm_size ( class(fitpack_polar), intent(in) this)

Communication interface.

◆ destroy()

procedure fitpack_polar_domains::fitpack_polar::destroy ( class(fitpack_polar), intent(inout) this)

Clean memory.

◆ eval() [1/2]

generic fitpack_polar_domains::fitpack_polar::eval ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in) x,
real(fp_real), intent(in) y,
integer, intent(out), optional ierr )

Evaluate polar domain at given x,y coordinates.

Internally transforms to normalized polar coordinates before evaluation.

See also
evapol
Here is the call graph for this function:

◆ eval() [2/2]

generic fitpack_polar_domains::fitpack_polar::eval ( class(fitpack_polar), intent(inout) this,
real(fp_real), dimension(:), intent(in) x,
real(fp_real), dimension(size(x)), intent(in) y,
integer, intent(out), optional ierr )

Evaluate the polar surface at multiple Cartesian points.

See also
evapol

◆ fit()

procedure fitpack_polar_domains::fitpack_polar::fit ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in), optional smoothing,
logical, intent(in), optional keep_knots )

Generate/update fitting curve, with optional smoothing.

The fitting uses normalized polar coordinates \( (u, v) \) with a user-supplied boundary function \( r(\theta) \). Continuity at the origin is controlled by bc_continuity_origin.

See also
polar

◆ interpolate()

procedure fitpack_polar_domains::fitpack_polar::interpolate ( class(fitpack_polar), intent(inout) this,
logical, intent(in), optional reset_knots )

Fit an interpolating polar surface ( \( s = 0 \)).

See also
polar

◆ least_squares()

procedure fitpack_polar_domains::fitpack_polar::least_squares ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in), optional smoothing,
logical, intent(in), optional reset_knots )

Fit a least-squares polar surface with fixed knots.

See also
polar

◆ new_fit()

procedure fitpack_polar_domains::fitpack_polar::new_fit ( class(fitpack_polar), intent(inout) this,
real(fp_real), dimension(:), intent(in) x,
real(fp_real), dimension(size(x)), intent(in) y,
real(fp_real), dimension(size(x)), intent(in) z,
procedure(fitpack_polar_boundary) boundary,
real(fp_real), dimension(size(x)), intent(in), optional w,
integer, intent(in), optional boundary_bc,
real(fp_real), intent(in), optional smoothing )

Generate new fit.

See also
polar

◆ new_points()

procedure fitpack_polar_domains::fitpack_polar::new_points ( class(fitpack_polar), intent(inout) this,
real(fp_real), dimension(:), intent(in) x,
real(fp_real), dimension(size(x)), intent(in) y,
real(fp_real), dimension(size(x)), intent(in) z,
procedure(fitpack_polar_boundary) boundary,
real(fp_real), dimension(size(x)), intent(in), optional w,
integer, intent(in), optional boundary_bc )

Set new points.

Parameters
[in,out]thisThe polar surface (destroyed and reinitialized).
[in]xCartesian x coordinates.
[in]yCartesian y coordinates, same size as x.
[in]zFunction values, same size as x.
[in]boundaryBoundary function \( r(\theta) \) defining the polar domain.
[in]wOptional positive weights.
[in]boundary_bcOptional boundary extrapolation flag.
See also
polar

◆ polr_eval_many()

procedure, private fitpack_polar_domains::fitpack_polar::polr_eval_many ( class(fitpack_polar), intent(inout) this,
real(fp_real), dimension(:), intent(in) x,
real(fp_real), dimension(size(x)), intent(in) y,
integer, intent(out), optional ierr )
private

Evaluate the polar surface at multiple Cartesian points.

See also
evapol

◆ polr_eval_one()

procedure, private fitpack_polar_domains::fitpack_polar::polr_eval_one ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in) x,
real(fp_real), intent(in) y,
integer, intent(out), optional ierr )
private

Evaluate polar domain at given x,y coordinates.

Internally transforms to normalized polar coordinates before evaluation.

See also
evapol

◆ polr_new_from_points()

type(fitpack_polar) function fitpack_polar_domains::fitpack_polar::polr_new_from_points ( real(fp_real), dimension(:), intent(in) x,
real(fp_real), dimension(size(x)), intent(in) y,
real(fp_real), dimension(size(x)), intent(in) z,
procedure(fitpack_polar_boundary) boundary,
real(fp_real), dimension(size(x)), intent(in), optional w,
integer, intent(in), optional boundary_bc,
integer, intent(out), optional ierr )

Construct a polar surface from scattered data and perform a default fit.

See also
polar
Here is the call graph for this function:

Member Data Documentation

◆ bc_boundary

integer fitpack_polar_domains::fitpack_polar::bc_boundary = OUTSIDE_EXTRAPOLATE

◆ bc_continuity_origin

integer fitpack_polar_domains::fitpack_polar::bc_continuity_origin = 2

◆ knots

integer, dimension(2) fitpack_polar_domains::fitpack_polar::knots = 0

◆ lwrk2

integer fitpack_polar_domains::fitpack_polar::lwrk2 = 0

◆ m

integer fitpack_polar_domains::fitpack_polar::m = 0

Scattered data points.

◆ nest

integer, dimension(2) fitpack_polar_domains::fitpack_polar::nest = 0

◆ nmax

integer fitpack_polar_domains::fitpack_polar::nmax = 0

◆ rad

procedure(fitpack_polar_boundary), pointer, nopass fitpack_polar_domains::fitpack_polar::rad => null()
static

Function that describes shape of the polar boundary: radius as a function of angle theta: x = rad(v)*cos(v) , y = rad(v)*sin(v), -pi <= v <= pi.

◆ t

real(fp_real), dimension(:,:), allocatable fitpack_polar_domains::fitpack_polar::t

◆ u

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::u

Coordinates of the data points in rectangular coordinates (u,v)

◆ v

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::v

◆ w

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::w

◆ wrk2

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::wrk2

◆ x

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::x

◆ y

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::y

◆ z

real(fp_real), dimension(:), allocatable fitpack_polar_domains::fitpack_polar::z

Function values at the points.


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