Spline2D Class ReferenceΒΆ

Splines: Splines::Spline2D Class Reference
Splines
Splines::Spline2D Class Reference

#include <Splines2D.hxx>

Public Member Functions

void clear ()
 
void write_to_stream (ostream_type &s) const
 
char const * type_name () const
 
string info () const
 
void info (ostream_type &stream) const
 
void dump_data (ostream_type &stream) const
 
Constructors
 Spline2D (string const &name="Spline2D")
 
virtual ~Spline2D ()
 
void build (SplineType2D tp, real_type const x[], integer incx, real_type const y[], integer incy, real_type const z[], integer ldZ, integer nx, integer ny, bool fortran_storage=false, bool transposed=false)
 
void build (SplineType2D tp, vector< real_type > const &x, vector< real_type > const &y, vector< real_type > const &z, bool fortran_storage=false, bool transposed=false)
 
void build (SplineType2D tp, real_type const z[], integer ldZ, integer nx, integer ny, bool fortran_storage=false, bool transposed=false)
 
void build (SplineType2D tp, vector< real_type > const &z, integer nx, integer ny, bool fortran_storage=false, bool transposed=false)
 
void setup (GenericContainer const &gc)
 
void build (GenericContainer const &gc)
 
Open/Close/Bound
bool is_x_closed () const
 
void make_x_closed ()
 
void make_x_opened ()
 
bool is_y_closed () const
 
void make_y_closed ()
 
void make_y_opened ()
 
bool is_x_bounded () const
 
void make_x_unbounded ()
 
void make_x_bounded ()
 
bool is_y_bounded () const
 
void make_y_unbounded ()
 
void make_y_bounded ()
 
Info
string const & name () const
 
integer num_point_x () const
 
integer num_point_y () const
 
real_type x_node (integer i) const
 
real_type y_node (integer i) const
 
real_type z_node (integer i, integer j) const
 
Get bounds
real_type x_min () const
 
real_type x_max () const
 
real_type y_min () const
 
real_type y_max () const
 
real_type z_min () const
 
real_type z_max () const
 
Evaluate
real_type operator() (real_type x, real_type y) const
 
real_type eval (real_type x, real_type y) const
 
First derivatives:
void D (real_type x, real_type y, real_type d[3]) const
 
real_type Dx (real_type x, real_type y) const
 
real_type Dy (real_type x, real_type y) const
 
real_type eval_D_1 (real_type x, real_type y) const
 
real_type eval_D_2 (real_type x, real_type y) const
 
Second derivatives:
void DD (real_type x, real_type y, real_type dd[6]) const
 
real_type Dxx (real_type x, real_type y) const
 
real_type Dxy (real_type x, real_type y) const
 
real_type Dyy (real_type x, real_type y) const
 
real_type eval_D_1_1 (real_type x, real_type y) const
 
real_type eval_D_1_2 (real_type x, real_type y) const
 
real_type eval_D_2_2 (real_type x, real_type y) const
 

Detailed Description

Bi-quintic spline base class

Constructor & Destructor Documentation

◆ Spline2D()

Splines::Spline2D::Spline2D ( string const & name = "Spline2D")
inline

Build an empty spline of Spline2D type

Parameters
namethe name of the spline

◆ ~Spline2D()

virtual Splines::Spline2D::~Spline2D ( )
inlinevirtual

Spline destructor.

Member Function Documentation

◆ build() [1/5]

void Splines::Spline2D::build ( GenericContainer const & gc)
inline

Build a spline using data in GenericContainer

◆ build() [2/5]

void Splines::Spline2D::build ( SplineType2D tp,
real_type const x[],
integer incx,
real_type const y[],
integer incy,
real_type const z[],
integer ldZ,
integer nx,
integer ny,
bool fortran_storage = false,
bool transposed = false )
inline

Build surface spline

Parameters
tpspline type
xvector of x-coordinates
incxaccess elements as x[0], x[incx], x[2*incx],...
yvector of y-coordinates
incyaccess elements as y[0], y[incx], y[2*incx],...
zmatrix of z-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrix
ldZleading dimension of z
nxnumber of points in x direction
nynumber of points in y direction
fortran_storageif true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix
transposedif true matrix Z is stored transposed

◆ build() [3/5]

void Splines::Spline2D::build ( SplineType2D tp,
real_type const z[],
integer ldZ,
integer nx,
integer ny,
bool fortran_storage = false,
bool transposed = false )
inline

Build surface spline

Parameters
tpspline type
zmatrix of z-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrix
ldZleading dimension of the matrix. Elements are stored by row Z(i,j) = z[i*ldZ+j] as C-matrix
nxx-dimension
nyy-dimension
fortran_storageif true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix
transposedif true matrix Z is stored transposed

◆ build() [4/5]

void Splines::Spline2D::build ( SplineType2D tp,
vector< real_type > const & x,
vector< real_type > const & y,
vector< real_type > const & z,
bool fortran_storage = false,
bool transposed = false )
inline

Build surface spline

Parameters
tpspline type
xvector of x-coordinates, nx = x.size()
yvector of y-coordinates, ny = y.size()
zmatrix of z-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrix
fortran_storageif true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix
transposedif true matrix Z is stored transposed

◆ build() [5/5]

void Splines::Spline2D::build ( SplineType2D tp,
vector< real_type > const & z,
integer nx,
integer ny,
bool fortran_storage = false,
bool transposed = false )
inline

Build surface spline

Parameters
tpspline type
zmatrix of z-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrix. ldZ leading dimension of the matrix is ny for C-storage and nx for Fortran storage.
nxx-dimension
nyy-dimension
fortran_storageif true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix
transposedif true matrix Z is stored transposed

◆ clear()

void Splines::Spline2D::clear ( )
inline

Cancel the support points, empty the spline.

◆ D()

void Splines::Spline2D::D ( real_type x,
real_type y,
real_type d[3] ) const
inline

Value and first derivatives at point \( (x,y) \):

  • d[0] value of the spline \( S(x,y) \)
  • d[1] derivative respect to \( x \) of the spline: \( S_x(x,y) \)
  • d[2] derivative respect to \( y \) of the spline: \( S_y(x,y) \)

◆ DD()

void Splines::Spline2D::DD ( real_type x,
real_type y,
real_type dd[6] ) const
inline

Value, first and second derivatives at point \( (x,y) \):

  • dd[0] value of the spline \( S(x,y) \)
  • dd[1] derivative respect to \( x \) of the spline: \( S_x(x,y) \)
  • dd[2] derivative respect to \( y \) of the spline: \( S_y(x,y) \)
  • dd[3] second derivative respect to \( x \) of the spline: \( S_{xx}(x,y) \)
  • dd[4] mixed second derivative: \( S_{xy}(x,y) \)
  • dd[5] second derivative respect to \( y \) of the spline: \( S_{yy}(x,y) \)

◆ dump_data()

void Splines::Spline2D::dump_data ( ostream_type & stream) const
inline

Dump spline values on the streams

◆ Dx()

real_type Splines::Spline2D::Dx ( real_type x,
real_type y ) const
inline

First derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_x(x,y) \).

◆ Dxx()

real_type Splines::Spline2D::Dxx ( real_type x,
real_type y ) const
inline

Second derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_{xx}(x,y) \).

◆ Dxy()

real_type Splines::Spline2D::Dxy ( real_type x,
real_type y ) const
inline

Mixed second derivatives: \( S_{xy}(x,y) \).

◆ Dy()

real_type Splines::Spline2D::Dy ( real_type x,
real_type y ) const
inline

First derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_x(x,y) \).

◆ Dyy()

real_type Splines::Spline2D::Dyy ( real_type x,
real_type y ) const
inline

Second derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_{xx}(x,y) \).

◆ eval()

real_type Splines::Spline2D::eval ( real_type x,
real_type y ) const
inline

Evaluate spline value at (x,y).

◆ eval_D_1()

real_type Splines::Spline2D::eval_D_1 ( real_type x,
real_type y ) const
inline

First derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_x(x,y) \).

◆ eval_D_1_1()

real_type Splines::Spline2D::eval_D_1_1 ( real_type x,
real_type y ) const
inline

Second derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_{xx}(x,y) \).

◆ eval_D_1_2()

real_type Splines::Spline2D::eval_D_1_2 ( real_type x,
real_type y ) const
inline

Mixed second derivatives: \( S_{xy}(x,y) \).

◆ eval_D_2()

real_type Splines::Spline2D::eval_D_2 ( real_type x,
real_type y ) const
inline

First derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_x(x,y) \).

◆ eval_D_2_2()

real_type Splines::Spline2D::eval_D_2_2 ( real_type x,
real_type y ) const
inline

Second derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_{xx}(x,y) \).

◆ info() [1/2]

string Splines::Spline2D::info ( ) const
inline

String information of the kind and order of the spline

◆ info() [2/2]

void Splines::Spline2D::info ( ostream_type & stream) const
inline

Print information of the kind and order of the spline

◆ is_x_bounded()

bool Splines::Spline2D::is_x_bounded ( ) const
inline

Return true if the parameter x assumed bounded. If false the spline is estrapolated for x values outside the range.

◆ is_x_closed()

bool Splines::Spline2D::is_x_closed ( ) const
inline

Return true if the surface is assumed closed in the x direction

◆ is_y_bounded()

bool Splines::Spline2D::is_y_bounded ( ) const
inline

Return true if the parameter y assumed bounded. If false the spline is estrapolated for y values outside the range.

◆ is_y_closed()

bool Splines::Spline2D::is_y_closed ( ) const
inline

Return true if the surface is assumed closed in the y direction.

◆ make_x_bounded()

void Splines::Spline2D::make_x_bounded ( )
inline

Make the spline surface bounded in the x direction.

◆ make_x_closed()

void Splines::Spline2D::make_x_closed ( )
inline

Setup the surface as closed in the x direction.

◆ make_x_opened()

void Splines::Spline2D::make_x_opened ( )
inline

Setup the surface as open in the x direction.

◆ make_x_unbounded()

void Splines::Spline2D::make_x_unbounded ( )
inline

Make the spline surface unbounded in the x direction.

◆ make_y_bounded()

void Splines::Spline2D::make_y_bounded ( )
inline

Make the spline surface bounded in the y direction

◆ make_y_closed()

void Splines::Spline2D::make_y_closed ( )
inline

Setup the surface as closed in the y direction.

◆ make_y_opened()

void Splines::Spline2D::make_y_opened ( )
inline

Setup the surface as open in the y direction.

◆ make_y_unbounded()

void Splines::Spline2D::make_y_unbounded ( )
inline

Make the spline surface unbounded in the y direction

◆ name()

string const & Splines::Spline2D::name ( ) const
inline
Returns
string with the name of the spline

◆ num_point_x()

integer Splines::Spline2D::num_point_x ( ) const
inline

Return the number of support points of the spline along x direction.

◆ num_point_y()

integer Splines::Spline2D::num_point_y ( ) const
inline

Return the number of support points of the spline along y direction.

◆ operator()()

real_type Splines::Spline2D::operator() ( real_type x,
real_type y ) const
inline

Evaluate spline value at (x,y).

◆ setup()

void Splines::Spline2D::setup ( GenericContainer const & gc)

Build spline surface using gc

  • gc("spline_type")
    • "bilinear" build a bilinear spline surface
    • "bicubic" build a spline surface with cubic spline
    • "biquintic" build a spline surface with quintic spline
    • "Akima" or "akima "build a spline surface with cubic spline using Akima algorithm to avoid obscillation

◆ type_name()

char const * Splines::Spline2D::type_name ( ) const
inline

Return spline typename

◆ write_to_stream()

void Splines::Spline2D::write_to_stream ( ostream_type & s) const
inline

Print spline coefficients.

◆ x_max()

real_type Splines::Spline2D::x_max ( ) const
inline

Return x-maximum spline value.

◆ x_min()

real_type Splines::Spline2D::x_min ( ) const
inline

Return x-minumum spline value.

◆ x_node()

real_type Splines::Spline2D::x_node ( integer i) const
inline

Return the i-th node of the spline (x component).

◆ y_max()

real_type Splines::Spline2D::y_max ( ) const
inline

Return y-maximum spline value

◆ y_min()

real_type Splines::Spline2D::y_min ( ) const
inline

Return y-minumum spline value.

◆ y_node()

real_type Splines::Spline2D::y_node ( integer i) const
inline

Return the i-th node of the spline (y component).

◆ z_max()

real_type Splines::Spline2D::z_max ( ) const
inline

Return z-maximum spline value

◆ z_min()

real_type Splines::Spline2D::z_min ( ) const
inline

Return z-minumum spline value

◆ z_node()

real_type Splines::Spline2D::z_node ( integer i,
integer j ) const
inline

Return the i-th node of the spline (y component).


The documentation for this class was generated from the following files:
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines/Splines2D.hxx
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines2D.cc