SplineSurf Class ReferenceΒΆ
Splines
|
#include <Splines.hh>
Public Member Functions | |
SplineSurf (string const &name="Spline") | |
virtual | ~SplineSurf () |
void | clear () |
virtual void | write_to_stream (ostream_type &s) const =0 |
virtual char const * | type_name () const =0 |
virtual string | info () const |
void | info (ostream_type &stream) const |
void | dump_data (ostream_type &s) const |
Open/Close | |
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 |
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 |
Build Spline | |
void | build (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 (vector< real_type > const &x, vector< real_type > const &y, vector< real_type > const &z, bool fortran_storage=false, bool transposed=false) |
void | build (real_type const z[], integer ldZ, integer nx, integer ny, bool fortran_storage=false, bool transposed=false) |
void | build (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) |
Evaluate | |
virtual real_type | eval (real_type x, real_type y) const =0 |
virtual void | D (real_type x, real_type y, real_type d[3]) const =0 |
virtual real_type | Dx (real_type x, real_type y) const =0 |
virtual real_type | Dy (real_type x, real_type y) const =0 |
virtual void | DD (real_type x, real_type y, real_type dd[6]) const =0 |
virtual real_type | Dxx (real_type x, real_type y) const =0 |
virtual real_type | Dxy (real_type x, real_type y) const =0 |
virtual real_type | Dyy (real_type x, real_type y) const =0 |
real_type | operator() (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 |
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
Spline Management Class
Constructor & Destructor Documentation
◆ SplineSurf()
|
inline |
Spline constructor
◆ ~SplineSurf()
|
virtual |
Spline destructor
Member Function Documentation
◆ build() [1/5]
|
inline |
Build a spline using data in GenericContainer
◆ build() [2/5]
void Splines::SplineSurf::build | ( | 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 ) |
Build surface spline
- Parameters
-
x vector of x
-coordinatesincx access elements as x[0]
,x[incx]
,x[2*incx]
,...y vector of y
-coordinatesincy access elements as y[0]
,y[incy]
,y[2*incy]
,...z matrix of z
-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrixldZ leading dimension of z
nx number of points in x
directionny number of points in y
directionfortran_storage if true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix transposed if true matrix Z is stored transposed
Build a spline surface with data
x
the vector of x-nodes (sizenx
)y
the vector of y-nodes (sizeny
)z
the matrix of z-values, \( z_{ij} = f(x_i,y_j) \)
fortran_storage
istrue
if matrixz
is stored by columntransposed
is true means that data are stored transposed
◆ build() [3/5]
void Splines::SplineSurf::build | ( | real_type const | z[], |
integer | ldZ, | ||
integer | nx, | ||
integer | ny, | ||
bool | fortran_storage = false, | ||
bool | transposed = false ) |
Build a spline surface with data
z
the matrix of z-values, \( z_{ij} = f(x_i,y_j) \)ldZ
leading dimension of matrizz
nx
number of nodes in x-directionny
number of nodes in y-direction
nodes are equispaced in x and y directions.
fortran_storage
istrue
if matrixz
is stored by columntransposed
is true means that data are stored transposed
◆ build() [4/5]
|
inline |
Build surface spline
- Parameters
-
x vector of x-coordinates, nx = x.size() y vector of y-coordinates, ny = y.size() z matrix of z-values. Elements are stored by row Z(i,j) = z[i*ny+j] as C-matrix fortran_storage if true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix transposed if true matrix Z is stored transposed
◆ build() [5/5]
|
inline |
Build surface spline
- Parameters
-
z matrix 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. nx x-dimension ny y-dimension fortran_storage if true elements are stored by column i.e. Z(i,j) = z[i+j*nx] as Fortran-matrix transposed if true matrix Z is stored transposed
◆ clear()
void Splines::SplineSurf::clear | ( | ) |
Cancel the support points, empty the spline.
◆ D()
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) \)
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ DD()
|
pure virtual |
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) \)
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ dump_data()
void Splines::SplineSurf::dump_data | ( | ostream_type & | s | ) | const |
Print stored data x, y, and matrix z.
◆ Dx()
First derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_x(x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ Dxx()
Second derivatives respect to \( x \) at point \( (x,y) \) of the spline: \( S_{xx}(x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ Dxy()
Mixed second derivatives: \( S_{xy}(x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ Dy()
First derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_y(x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ Dyy()
Second derivatives respect to \( y \) at point \( (x,y) \) of the spline: \( S_{yy}(x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ eval()
Evaluate spline value at point \( (x,y) \).
Implemented in Splines::BiCubicSplineBase, Splines::BilinearSpline, and Splines::BiQuinticSplineBase.
◆ eval_D_1()
◆ eval_D_1_1()
Alias for Dxx(x,y)
◆ eval_D_1_2()
Alias for Dxy(x,y)
◆ eval_D_2()
◆ eval_D_2_2()
Alias for Dyy(x,y)
◆ info() [1/2]
|
virtual |
String information of the kind and order of the spline
◆ info() [2/2]
|
inline |
Print information of the kind and order of the spline
◆ is_x_bounded()
|
inline |
Return true
if the parameter x
assumed bounded. If false the spline is estrapolated for x
values outside the range.
◆ is_x_closed()
|
inline |
Return true
if the surface is assumed closed in the x
direction.
◆ is_y_bounded()
|
inline |
Return true
if the parameter y
assumed bounded. If false the spline is extrapolated for y
values outside the range.
◆ is_y_closed()
|
inline |
Return true
if the surface is assumed closed in the y
direction.
◆ make_x_bounded()
|
inline |
Make the spline surface bounded in the x
direction.
◆ make_x_closed()
|
inline |
Setup the surface as closed in the x
direction.
◆ make_x_opened()
|
inline |
Setup the surface as open in the x
direction.
◆ make_x_unbounded()
|
inline |
Make the spline surface unbounded in the x
direction.
◆ make_y_bounded()
|
inline |
Make the spline surface bounded in the x
direction.
◆ make_y_closed()
|
inline |
Setup the surface as closed in the y
direction.
◆ make_y_opened()
|
inline |
Setup the surface as open in the y
direction.
◆ make_y_unbounded()
|
inline |
Make the spline surface unbounded in the y
direction
◆ name()
|
inline |
- Returns
- string with the name of the spline
◆ num_point_x()
|
inline |
Return the number of support points of the spline along x direction.
◆ num_point_y()
|
inline |
Return the number of support points of the spline along y direction.
◆ operator()()
Evaluate spline value at point \( (x,y) \).
◆ setup()
void Splines::SplineSurf::setup | ( | GenericContainer const & | gc | ) |
Build spline using data in gc
Setup a spline surface using a GenericContainer
gc("fortran_storage")
if truezdata
is stored by column, otherwise by rowsgc("transposed")
if truezdata
is stored transposedgc("xdata")
vector of mesh point inx
directiongc("ydata")
vector of mesh point iny
directiongc("zdata")
may be- matrix of size
nx
xny
(ny
xnx
if data is transposed) - vector of size
nx
xny
stiring the data.
- matrix of size
nx
number of nodes in x-direction the size of vector inx
directionny
number of nodes in y-direction the size of vector iny
direction
nodes are equispaced in x and y directions.
fortran_storage
istrue
if matrixz
is stored by columntransposed
is true means that data are stored transposed
◆ type_name()
|
pure virtual |
Return spline type as a string pointer.
Implemented in Splines::Akima2Dspline, Splines::BiCubicSpline, Splines::BilinearSpline, and Splines::BiQuinticSpline.
◆ write_to_stream()
|
pure virtual |
Print spline coefficients.
Implemented in Splines::Akima2Dspline, Splines::BiCubicSpline, Splines::BilinearSpline, and Splines::BiQuinticSpline.
◆ x_max()
|
inline |
Return x-maximum spline value.
◆ x_min()
|
inline |
Return x-minumum spline value.
◆ x_node()
Return the i-th node of the spline (x component).
◆ y_max()
|
inline |
Return y-maximum spline value.
◆ y_min()
|
inline |
Return y-minumum spline value.
◆ y_node()
Return the i-th node of the spline (y component).
◆ z_max()
|
inline |
Return z-maximum spline value.
◆ z_min()
|
inline |
Return z-minumum spline value.
◆ z_node()
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.hh
- /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/SplinesBivariate.cc
Generated by 1.12.0