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

OOP wrapper for bivariate spline fitting on scattered polar domains. More...

Data Types

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

Functions/Subroutines

integer function surface_fit_least_squares (this, smoothing, reset_knots)
 Fit a least-squares polar surface with fixed knots.
 
integer function surface_fit_interpolating (this, reset_knots)
 Fit an interpolating polar surface ( \( s = 0 \)).
 
integer function surface_fit_automatic_knots (this, smoothing, keep_knots)
 Fit a smoothing polar surface with automatic knot placement.
 
elemental subroutine polar_destroy (this)
 Destroy a polar surface object and release all allocated memory.
 
subroutine polar_new_points (this, x, y, z, boundary, w, boundary_bc)
 Load new scattered data and a boundary function for polar fitting.
 
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.
 
real(fp_real) function polr_eval_one (this, x, y, ierr)
 Evaluate the polar surface at a single Cartesian \( (x, y) \) point.
 
real(fp_real) function, dimension(size(x)) polr_eval_many (this, x, y, ierr)
 Evaluate the polar surface at multiple Cartesian points.
 
integer function polr_new_fit (this, x, y, z, boundary, w, boundary_bc, smoothing)
 Load new data and perform a fresh polar surface fit.
 
elemental integer(fp_size) function polar_comm_size (this)
 Return the communication buffer size for the polar surface.
 
pure subroutine polar_comm_pack (this, buffer)
 Pack polar surface data into a communication buffer.
 
pure subroutine polar_comm_expand (this, buffer)
 Expand polar surface data from a communication buffer.
 

Detailed Description

OOP wrapper for bivariate spline fitting on scattered polar domains.

Provides fitpack_polar, a derived type for fitting bicubic splines to data scattered over a general polar domain \( x^2 + y^2 \leq r(\theta)^2 \), where \( r(\theta) \) is a user-supplied boundary function. The Cartesian coordinates are transformed to normalized polar coordinates:

\[ x = u \, r(v) \cos v, \quad y = u \, r(v) \sin v, \quad 0 \leq u \leq 1, \ -\pi \leq v \leq \pi \]

and a bicubic spline \( s(u, v) \) is fitted with appropriate continuity constraints at the origin.

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

Function/Subroutine Documentation

◆ polar_comm_expand()

pure subroutine fitpack_polar_domains::polar_comm_expand ( class(fitpack_polar), intent(inout) this,
real(fp_comm), dimension(:), intent(in) buffer )
private

Expand polar surface data from a communication buffer.

◆ polar_comm_pack()

pure subroutine fitpack_polar_domains::polar_comm_pack ( class(fitpack_polar), intent(in) this,
real(fp_comm), dimension(:), intent(out) buffer )
private

Pack polar surface data into a communication buffer.

◆ polar_comm_size()

elemental integer(fp_size) function fitpack_polar_domains::polar_comm_size ( class(fitpack_polar), intent(in) this)
private

Return the communication buffer size for the polar surface.

Here is the call graph for this function:

◆ polar_destroy()

elemental subroutine fitpack_polar_domains::polar_destroy ( class(fitpack_polar), intent(inout) this)
private

Destroy a polar surface object and release all allocated memory.

◆ polar_new_points()

subroutine fitpack_polar_domains::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 )
private

Load new scattered data and a boundary function for polar fitting.

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()

real(fp_real) function, dimension(size(x)) fitpack_polar_domains::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
Here is the call graph for this function:

◆ polr_eval_one()

real(fp_real) function fitpack_polar_domains::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 the polar surface at a single Cartesian \( (x, y) \) point.

Internally transforms to normalized polar coordinates before evaluation.

See also
evapol

◆ polr_new_fit()

integer function fitpack_polar_domains::polr_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 )
private

Load new data and perform a fresh polar surface fit.

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

◆ polr_new_from_points()

type(fitpack_polar) function fitpack_polar_domains::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 )
private

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

See also
polar

◆ surface_fit_automatic_knots()

integer function fitpack_polar_domains::surface_fit_automatic_knots ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in), optional smoothing,
logical, intent(in), optional keep_knots )
private

Fit a smoothing polar surface with automatic knot placement.

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

Ensure we start with new knots (unless caller wants to keep them)

Here is the call graph for this function:

◆ surface_fit_interpolating()

integer function fitpack_polar_domains::surface_fit_interpolating ( class(fitpack_polar), intent(inout) this,
logical, intent(in), optional reset_knots )
private

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

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

◆ surface_fit_least_squares()

integer function fitpack_polar_domains::surface_fit_least_squares ( class(fitpack_polar), intent(inout) this,
real(fp_real), intent(in), optional smoothing,
logical, intent(in), optional reset_knots )
private

Fit a least-squares polar surface with fixed knots.

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