OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
GSLSpline.h File Reference
#include "CubicSpline.h"
#include "LinearSpline.h"
Include dependency graph for GSLSpline.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using gsl_spline = AbstractSpline
 GSL-compatible spline type alias.
 
using gsl_interp_accel = AbstractSpline::Accelerator
 GSL-compatible accelerator type alias.
 

Functions

gsl_splinegsl_spline_alloc (const int type, size_t)
 Allocate a spline instance (size ignored).
 
gsl_interp_accelgsl_interp_accel_alloc ()
 Allocate an interpolation accelerator.
 
void gsl_spline_init (gsl_spline *spline, const double *x, const double *y, const size_t n)
 Initialize a spline with tabulated data.
 
double gsl_spline_eval (const gsl_spline *spline, const double x, gsl_interp_accel *accel)
 Evaluate a spline at x using an accelerator.
 
double gsl_spline_eval_integ (const gsl_spline *spline, const double xa, const double xb, gsl_interp_accel *accel)
 Evaluate the integral of a spline at x using an accelerator.
 
void gsl_spline_free (const gsl_spline *spline)
 Free a spline instance.
 
void gsl_interp_accel_free (const gsl_interp_accel *accel)
 Free an accelerator instance.
 
void gsl_interp_accel_reset (gsl_interp_accel *accel)
 Reset an accelerator to the initial state.
 

Variables

constexpr int gsl_interp_linear = 1
 GSL linear interpolation type identifiers.
 
constexpr int gsl_interp_cspline = 0
 

Typedef Documentation

◆ gsl_interp_accel

GSL-compatible accelerator type alias.

Definition at line 32 of file GSLSpline.h.

◆ gsl_spline

GSL-compatible spline type alias.

Definition at line 29 of file GSLSpline.h.

Function Documentation

◆ gsl_interp_accel_alloc()

gsl_interp_accel * gsl_interp_accel_alloc ( )
inline

Allocate an interpolation accelerator.

Returns
Output: accelerator pointer.

Definition at line 50 of file GSLSpline.h.

Referenced by RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

◆ gsl_interp_accel_free()

void gsl_interp_accel_free ( const gsl_interp_accel accel)
inline

Free an accelerator instance.

Parameters
accelInput: accelerator to release (can be null).

Definition at line 87 of file GSLSpline.h.

Referenced by RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

◆ gsl_interp_accel_reset()

void gsl_interp_accel_reset ( gsl_interp_accel accel)
inline

Reset an accelerator to the initial state.

Parameters
accelInput/Output: accelerator to reset.

Definition at line 91 of file GSLSpline.h.

References AbstractSpline::Accelerator::reset().

Referenced by TEST_F().

Here is the call graph for this function:

◆ gsl_spline_alloc()

gsl_spline * gsl_spline_alloc ( const int  type,
size_t   
)
inline

Allocate a spline instance (size ignored).

Parameters
typeInput: interpolation type
sizeInput: number of points (unused).
Returns
Output: spline pointer.

Definition at line 38 of file GSLSpline.h.

References gsl_interp_cspline, and gsl_interp_linear.

Referenced by RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

◆ gsl_spline_eval()

double gsl_spline_eval ( const gsl_spline spline,
const double  x,
gsl_interp_accel accel 
)
inline

Evaluate a spline at x using an accelerator.

Parameters
splineInput: spline to evaluate.
xInput: x-coordinate.
accelInput/Output: accelerator cache.
Returns
Output: interpolated value.

Definition at line 66 of file GSLSpline.h.

References AbstractSpline::eval().

Referenced by Fieldmap::checkMap(), RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

Here is the call graph for this function:

◆ gsl_spline_eval_integ()

double gsl_spline_eval_integ ( const gsl_spline spline,
const double  xa,
const double  xb,
gsl_interp_accel accel 
)
inline

Evaluate the integral of a spline at x using an accelerator.

Parameters
splineInput: spline to evaluate.
xaInput: lower bound x-coordinate.
xbInput: upper bound x-coordinate.
accelInput/Output: accelerator cache.
Returns
Output: integrated value.

Definition at line 76 of file GSLSpline.h.

References AbstractSpline::evalIntegral().

Referenced by TEST_F().

Here is the call graph for this function:

◆ gsl_spline_free()

void gsl_spline_free ( const gsl_spline spline)
inline

Free a spline instance.

Parameters
splineInput: spline to release (can be null).

Definition at line 83 of file GSLSpline.h.

Referenced by RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

◆ gsl_spline_init()

void gsl_spline_init ( gsl_spline spline,
const double *  x,
const double *  y,
const size_t  n 
)
inline

Initialize a spline with tabulated data.

Parameters
splineInput/Output: spline to initialize.
xInput: strictly increasing x-coordinates.
yInput: y-values corresponding to x.
nInput: number of samples.

Definition at line 57 of file GSLSpline.h.

References AbstractSpline::init().

Referenced by RFCavity::getAutoPhaseEstimate(), Astra1DDynamic::readMap(), Astra1DMagnetoStatic::readMap(), and TEST_F().

Here is the call graph for this function:

Variable Documentation

◆ gsl_interp_cspline

constexpr int gsl_interp_cspline = 0
constexpr

◆ gsl_interp_linear

constexpr int gsl_interp_linear = 1
constexpr

GSL linear interpolation type identifiers.

Definition at line 25 of file GSLSpline.h.

Referenced by gsl_spline_alloc().