ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
Loading...
Searching...
No Matches
orb5x::spclibs::Spline1D Struct Reference

1-dimensional B-spline More...

#include "bsplines.hpp"

Collaboration diagram for orb5x::spclibs::Spline1D:

Public Member Functions

int degree () const
 Get degree (order - 1).
bool is_initialized () const
 Check if spline is initialized.
Real knot (int i) const
 Get knot at index i (handles offset from Fortran indexing) In Fortran: knots(-p:nints+p), in C++: knots(0:2*p+nints) Fortran index i maps to C++ index i + order - 1.
void set_knot (int i, Real val)
 Set knot at index i.
 Spline1D ()=default

Public Attributes

Kokkos::View< Real * > bcoefs
 Spline coefficients.
int dim = 0
 Dimension of spline space = nints + order - 1.
std::vector< int > fmap
 Fine to coarse mesh mapping (for non-equidistant).
Kokkos::View< Real ** > gausw
 Gauss weights (ngauss x nints).
Kokkos::View< Real ** > gausx
 Gauss abscissas (ngauss x nints).
Real hinv = 0.0
 Inverse of mesh size (for equidistant grids).
Kokkos::View< Real * > intspl
 Integral of each spline.
Kokkos::View< Real * > knots
 Knot sequence (-p:nints+p in Fortran, size 2*p+nints+1).
Real lperiod = 0.0
 Period length (if periodic).
GBMat mat
 Interpolation matrix (non-periodic).
PeriodicMat matp
 Interpolation matrix (periodic).
int nints = 0
 Number of knot intervals.
bool nlequid = false
 Is the grid equidistant?
bool nlppform = true
 Use PPFORM for evaluation?
int order = 0
 Spline order = degree + 1.
bool period = false
 Is the grid periodic?
Kokkos::View< Real ** > ppform
 PPFORM coefficients.
Kokkos::View< Real *** > val0
 Pre-computed spline values at left boundaries (deriv, basis, interval).
Kokkos::View< Real ** > valc
 For periodic equidistant: translational invariant values.

Detailed Description

1-dimensional B-spline

Represents a B-spline defined on a 1D grid with:

  • Arbitrary order (degree + 1)
  • Equidistant or non-equidistant knot sequence
  • Optional periodic boundary conditions
  • Pre-computed Gauss quadrature points and weights
  • Band matrix for interpolation

Constructor & Destructor Documentation

◆ Spline1D()

orb5x::spclibs::Spline1D::Spline1D ( )
default

Member Function Documentation

◆ degree()

int orb5x::spclibs::Spline1D::degree ( ) const
inline

Get degree (order - 1).

References order.

◆ is_initialized()

bool orb5x::spclibs::Spline1D::is_initialized ( ) const
inline

Check if spline is initialized.

References dim, and order.

◆ knot()

Real orb5x::spclibs::Spline1D::knot ( int i) const

Get knot at index i (handles offset from Fortran indexing) In Fortran: knots(-p:nints+p), in C++: knots(0:2*p+nints) Fortran index i maps to C++ index i + order - 1.

◆ set_knot()

void orb5x::spclibs::Spline1D::set_knot ( int i,
Real val )

Set knot at index i.

Member Data Documentation

◆ bcoefs

Kokkos::View<Real*> orb5x::spclibs::Spline1D::bcoefs

Spline coefficients.

◆ dim

int orb5x::spclibs::Spline1D::dim = 0

Dimension of spline space = nints + order - 1.

Referenced by is_initialized().

◆ fmap

std::vector<int> orb5x::spclibs::Spline1D::fmap

Fine to coarse mesh mapping (for non-equidistant).

◆ gausw

Kokkos::View<Real**> orb5x::spclibs::Spline1D::gausw

Gauss weights (ngauss x nints).

◆ gausx

Kokkos::View<Real**> orb5x::spclibs::Spline1D::gausx

Gauss abscissas (ngauss x nints).

◆ hinv

Real orb5x::spclibs::Spline1D::hinv = 0.0

Inverse of mesh size (for equidistant grids).

◆ intspl

Kokkos::View<Real*> orb5x::spclibs::Spline1D::intspl

Integral of each spline.

◆ knots

Kokkos::View<Real*> orb5x::spclibs::Spline1D::knots

Knot sequence (-p:nints+p in Fortran, size 2*p+nints+1).

◆ lperiod

Real orb5x::spclibs::Spline1D::lperiod = 0.0

Period length (if periodic).

◆ mat

GBMat orb5x::spclibs::Spline1D::mat

Interpolation matrix (non-periodic).

◆ matp

PeriodicMat orb5x::spclibs::Spline1D::matp

Interpolation matrix (periodic).

◆ nints

int orb5x::spclibs::Spline1D::nints = 0

Number of knot intervals.

◆ nlequid

bool orb5x::spclibs::Spline1D::nlequid = false

Is the grid equidistant?

◆ nlppform

bool orb5x::spclibs::Spline1D::nlppform = true

Use PPFORM for evaluation?

◆ order

int orb5x::spclibs::Spline1D::order = 0

Spline order = degree + 1.

Referenced by degree(), and is_initialized().

◆ period

bool orb5x::spclibs::Spline1D::period = false

Is the grid periodic?

◆ ppform

Kokkos::View<Real**> orb5x::spclibs::Spline1D::ppform

PPFORM coefficients.

◆ val0

Kokkos::View<Real***> orb5x::spclibs::Spline1D::val0

Pre-computed spline values at left boundaries (deriv, basis, interval).

◆ valc

Kokkos::View<Real**> orb5x::spclibs::Spline1D::valc

For periodic equidistant: translational invariant values.


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