Gyselalib++
PolarBSplines< BSplinesR, BSplinesTheta, C > Class Template Reference

A class containing all information describing polar bsplines. More...

Classes

class  Impl
 The Impl class holds the implementation of the PolarBSplines. More...
 

Public Types

using BSplinesR_tag = BSplinesR
 The radial bspline from which the polar bsplines are constructed.
 
using BSplinesTheta_tag = BSplinesTheta
 The poloidal bspline from which the polar bsplines are constructed.
 
using DimR = typename BSplinesR::continuous_dimension_type
 The tag for the radial direction of the bsplines.
 
using DimTheta = typename BSplinesTheta::continuous_dimension_type
 The tag for the poloidal direction of the bsplines.
 
using discrete_dimension_type = PolarBSplines
 The tag denoting the discrete dimension described by this class. More...
 
using tensor_product_index_type = ddc::DiscreteElement< BSplinesR, BSplinesTheta >
 The type of a 2D index for the subset of the polar bsplines which can be expressed as a tensor product of 1D bsplines.
 
using tensor_product_idx_range_type = ddc::DiscreteDomain< BSplinesR, BSplinesTheta >
 The type of the 2D idx_range for the subset of the polar bsplines which can be expressed as a tensor product of 1D bsplines.
 
using tensor_product_idx_step_type = ddc::DiscreteVector< BSplinesR, BSplinesTheta >
 The type of a 2D vector for the subset of the polar bsplines which can be expressed as a tensor product of 1D bsplines.
 

Static Public Member Functions

static constexpr std::size_t n_singular_basis ()
 Get the number of singular bsplines i.e. More...
 
template<class DDim >
static constexpr ddc::DiscreteDomain< DDim > singular_idx_range ()
 Get the ddc::DiscreteDomain containing the indices of the b-splines which traverse the singular point. More...
 
template<class DDim >
static KOKKOS_FUNCTION ddc::DiscreteElement< DDim > get_polar_index (tensor_product_index_type const &idx)
 Get the index of the polar bspline which, when evaluated at the same point, returns the same values as the 2D tensor product bspline indicated by the index passed as an argument. More...
 
template<class DDim >
static KOKKOS_FUNCTION tensor_product_index_type get_2d_index (ddc::DiscreteElement< DDim > const &idx)
 Get the 2D index of the tensor product bspline which, when evaluated at the same point, returns the same values as the polar bspline indicated by the index passed as an argument. More...
 

Static Public Attributes

static constexpr int continuity = C
 The continuity enforced by the bsplines at the singular point.
 

Detailed Description

template<class BSplinesR, class BSplinesTheta, int C>
class PolarBSplines< BSplinesR, BSplinesTheta, C >

A class containing all information describing polar bsplines.

Polar bsplines are 2D bsplines with a special treatment for the central singular point of a polar index range. At this singular point new bsplines are created which traverse the singular point and ensure the desired continuity condition.

Template Parameters
BSplinesRThe basis of radial bsplines from which the polar bsplines are constructed.
BSplinesThetaThe poloidal bspline from which the polar bsplines are constructed.
CThe continuity condition. The resulting splines will be continuously differentiable C times. If C == -1 then the resulting spline representation will be discontinuous at the singular point.

Member Typedef Documentation

◆ discrete_dimension_type

template<class BSplinesR , class BSplinesTheta , int C>
using PolarBSplines< BSplinesR, BSplinesTheta, C >::discrete_dimension_type = PolarBSplines

The tag denoting the discrete dimension described by this class.

This is the tag which should be used to create a Chunk whose contents are each associated with a PolarBSpline. In other words a spline defined on this basis would have the type: ddc::Chunk<double, ddc::DiscreteDomain<PolarBSplines>;

Member Function Documentation

◆ n_singular_basis()

template<class BSplinesR , class BSplinesTheta , int C>
static constexpr std::size_t PolarBSplines< BSplinesR, BSplinesTheta, C >::n_singular_basis ( )
inlinestaticconstexpr

Get the number of singular bsplines i.e.

bsplines which traverse the singular point.

Returns
The number of bsplines which traverse the singular point.

◆ singular_idx_range()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim >
static constexpr ddc::DiscreteDomain<DDim> PolarBSplines< BSplinesR, BSplinesTheta, C >::singular_idx_range ( )
inlinestaticconstexpr

Get the ddc::DiscreteDomain containing the indices of the b-splines which traverse the singular point.

Returns
The ddc::DiscreteDomain containing the indices of the b-splines which traverse the singular point.

◆ get_polar_index()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim >
static KOKKOS_FUNCTION ddc::DiscreteElement<DDim> PolarBSplines< BSplinesR, BSplinesTheta, C >::get_polar_index ( tensor_product_index_type const &  idx)
inlinestatic

Get the index of the polar bspline which, when evaluated at the same point, returns the same values as the 2D tensor product bspline indicated by the index passed as an argument.

Parameters
idxThe index of a 2D BSpline which is expressed as a tensor product of 1D BSplines.
Returns
The index of the basis spline in the PolarBSpline index range.

◆ get_2d_index()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim >
static KOKKOS_FUNCTION tensor_product_index_type PolarBSplines< BSplinesR, BSplinesTheta, C >::get_2d_index ( ddc::DiscreteElement< DDim > const &  idx)
inlinestatic

Get the 2D index of the tensor product bspline which, when evaluated at the same point, returns the same values as the polar bspline indicated by the index passed as an argument.

Parameters
idxThe index of the basis spline in the PolarBSpline index range.
Returns
The index of the equivalent 2D BSpline expressed as a 2D tensor product of 1D BSplines.

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