Gyselalib++
PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace > Class Template Reference

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

Classes

struct  Corner1Tag
 The tag for the first corner of the Barycentric coordinates. More...
 
struct  Corner2Tag
 The tag for the second corner of the Barycentric coordinates. More...
 
struct  Corner3Tag
 The tag for the third corner of the Barycentric coordinates. More...
 
struct  IntermediateBernsteinBasis
 

Public Types

using discrete_dimension_type = PolarBSplines
 The tag which should be used to create a Chunk whose contents are each associated with a PolarBSpline.
 
using discrete_element_type = ddc::DiscreteElement< DDim >
 The type of an index associated with a PolarBSpline.
 
using discrete_domain_type = ddc::DiscreteDomain< DDim >
 The type of a index range of PolarBSplines.
 
using discrete_vector_type = ddc::DiscreteVector< DDim >
 The type of a vector associated with a PolarBSpline.
 

Public Member Functions

template<class DiscreteMapping >
 Impl (const DiscreteMapping &curvilinear_to_cartesian)
 A constructor for the PolarBSplines. More...
 
template<class OriginMemorySpace >
 Impl (Impl< DDim, OriginMemorySpace > const &impl)
 A copy constructor for the PolarBSplines. More...
 
 Impl (Impl const &x)=default
 A copy constructor for the PolarBSplines. More...
 
 Impl (Impl &&x)=default
 A copy constructor for the PolarBSplines taking a temporary r-value. More...
 
 ~Impl ()=default
 The destructor for the PolarBSplines.
 
Imploperator= (Impl const &x)=default
 A copy operator for the PolarBSplines. More...
 
Imploperator= (Impl &&x)=default
 A copy operator for the PolarBSplines taking a temporary r-value. More...
 
tensor_product_index_type eval_basis (DSpan1D singular_values, DSpan2D values, ddc::Coordinate< DimR, DimTheta > p) const
 Evaluate the polar basis splines at the coordinate p. More...
 
tensor_product_index_type eval_deriv_r (DSpan1D singular_derivs, DSpan2D derivs, ddc::Coordinate< DimR, DimTheta > p) const
 Evaluate the radial derivative of the polar basis splines at the coordinate p. More...
 
tensor_product_index_type eval_deriv_theta (DSpan1D singular_derivs, DSpan2D derivs, ddc::Coordinate< DimR, DimTheta > p) const
 Evaluate the poloidal derivative of the polar basis splines at the coordinate p. More...
 
tensor_product_index_type eval_deriv_r_and_theta (DSpan1D singular_derivs, DSpan2D derivs, ddc::Coordinate< DimR, DimTheta > p) const
 Evaluate the second order derivative of the polar basis splines in the radial and poloidal directions, at the coordinate p. More...
 
template<class MemorySpace2 >
void integrals (PolarSplineSpan< DDim, MemorySpace2 > int_vals) const
 Calculate the integrals of each of the basis splines. More...
 
std::size_t nbasis () const noexcept
 Get the total number of basis functions. More...
 
discrete_domain_type full_domain () const noexcept
 Returns the index range containing the indices of all the polar b-splines. More...
 
discrete_domain_type tensor_bspline_idx_range () const noexcept
 Returns the ddc::DiscreteDomain containing the indices of the b-splines which don't traverse the singular point and can be expressed as a tensor-product of 1D b-splines. More...
 

Friends

template<class ExecSpace , class PBSpl , class OMemorySpace >
PolarSplineSpan< PBSpl, OMemorySpace > integrals (ExecSpace const &execution_space, PolarSplineSpan< PBSpl, OMemorySpace > int_vals)
 

Detailed Description

template<class BSplinesR, class BSplinesTheta, int C>
template<class DDim, class MemorySpace>
class PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >

The Impl class holds the implementation of the PolarBSplines.

The implementation is specific to the memory space so that the Chunks can be defined with index ranges related to instances of this class.

Template Parameters
MemorySpaceIndicates where the object is saved. This is either on the host or the device.

Class Documentation

◆ PolarBSplines::Impl::Corner1Tag

struct PolarBSplines::Impl::Corner1Tag

template<class BSplinesR, class BSplinesTheta, int C>
template<class DDim, class MemorySpace>
struct PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Corner1Tag

The tag for the first corner of the Barycentric coordinates.

◆ PolarBSplines::Impl::Corner2Tag

struct PolarBSplines::Impl::Corner2Tag

template<class BSplinesR, class BSplinesTheta, int C>
template<class DDim, class MemorySpace>
struct PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Corner2Tag

The tag for the second corner of the Barycentric coordinates.

◆ PolarBSplines::Impl::Corner3Tag

struct PolarBSplines::Impl::Corner3Tag

template<class BSplinesR, class BSplinesTheta, int C>
template<class DDim, class MemorySpace>
struct PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Corner3Tag

The tag for the third corner of the Barycentric coordinates.

Constructor & Destructor Documentation

◆ Impl() [1/4]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
template<class DiscreteMapping >
PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Impl ( const DiscreteMapping &  curvilinear_to_cartesian)
inline

A constructor for the PolarBSplines.

Parameters
curvilinear_to_cartesianA mapping from curvilinear to cartesian coordinates. This is used to find the singular point and determine the Barycentric coordinates which are used to define the new basis splines which cross the singular point.

◆ Impl() [2/4]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
template<class OriginMemorySpace >
PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Impl ( Impl< DDim, OriginMemorySpace > const &  impl)
inlineexplicit

A copy constructor for the PolarBSplines.

Parameters
implThe PolarBSplines being copied.

◆ Impl() [3/4]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Impl ( Impl< DDim, MemorySpace > const &  x)
default

A copy constructor for the PolarBSplines.

Parameters
xThe PolarBSplines being copied.

◆ Impl() [4/4]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::Impl ( Impl< DDim, MemorySpace > &&  x)
default

A copy constructor for the PolarBSplines taking a temporary r-value.

Parameters
xThe PolarBSplines being copied.

Member Function Documentation

◆ operator=() [1/2]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
Impl& PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::operator= ( Impl< DDim, MemorySpace > const &  x)
default

A copy operator for the PolarBSplines.

Parameters
xThe PolarBSplines being copied.
Returns
A reference to this PolarBSpline.

◆ operator=() [2/2]

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
Impl& PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::operator= ( Impl< DDim, MemorySpace > &&  x)
default

A copy operator for the PolarBSplines taking a temporary r-value.

Parameters
xThe PolarBSplines being copied.
Returns
A reference to this PolarBSpline.

◆ eval_basis()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
ddc::DiscreteElement< BSplinesR, BSplinesTheta > PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::eval_basis ( DSpan1D  singular_values,
DSpan2D  values,
ddc::Coordinate< DimR, DimTheta p 
) const

Evaluate the polar basis splines at the coordinate p.

Evaluate all the b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, as well as the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.

Parameters
[out]singular_valuesThe value of the b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, evaluated at the coordinate p.
[out]valuesThe value of the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.
[in]pThe coordinate where the basis functions are evaluated.
Returns
The 2D tensor product index of the first b-spline element in the values array.

◆ eval_deriv_r()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
ddc::DiscreteElement< BSplinesR, BSplinesTheta > PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::eval_deriv_r ( DSpan1D  singular_derivs,
DSpan2D  derivs,
ddc::Coordinate< DimR, DimTheta p 
) const

Evaluate the radial derivative of the polar basis splines at the coordinate p.

Evaluate the radial derivative of all the b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, as well as the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.

Parameters
[out]singular_derivsThe value of the radial derivative b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, evaluated at the coordinate p.
[out]derivsThe value of the radial derivative of the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.
[in]pThe coordinate where the basis functions are evaluated.
Returns
The 2D tensor product index of the first b-spline element in the values array.

◆ eval_deriv_theta()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
ddc::DiscreteElement< BSplinesR, BSplinesTheta > PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::eval_deriv_theta ( DSpan1D  singular_derivs,
DSpan2D  derivs,
ddc::Coordinate< DimR, DimTheta p 
) const

Evaluate the poloidal derivative of the polar basis splines at the coordinate p.

Evaluate the poloidal derivative of all the b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, as well as the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.

Parameters
[out]singular_derivsThe value of the poloidal derivative b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, evaluated at the coordinate p.
[out]derivsThe value of the poloidal derivative of the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.
[in]pThe coordinate where the basis functions are evaluated.
Returns
The 2D tensor product index of the first b-spline element in the values array.

◆ eval_deriv_r_and_theta()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
ddc::DiscreteElement< BSplinesR, BSplinesTheta > PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::eval_deriv_r_and_theta ( DSpan1D  singular_derivs,
DSpan2D  derivs,
ddc::Coordinate< DimR, DimTheta p 
) const

Evaluate the second order derivative of the polar basis splines in the radial and poloidal directions, at the coordinate p.

Evaluate the 2nd order derivative of all the b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, as well as the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.

Parameters
[out]singular_derivsThe value of the 2nd order derivative b-spline elements near the singular point which cannot be expressed as a tensor product of 1D bsplines, evaluated at the coordinate p.
[out]derivsThe value of the 2nd order derivative of the non-zero b-spline elements which can be expressed as a tensor product of 1D bsplines.
[in]pThe coordinate where the basis functions are evaluated.
Returns
The 2D tensor product index of the first b-spline element in the values array.

◆ integrals()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
template<class MemorySpace2 >
void PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::integrals ( PolarSplineSpan< DDim, MemorySpace2 >  int_vals) const

Calculate the integrals of each of the basis splines.

Parameters
[out]int_valsThe integrals of the basis splines.

◆ nbasis()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
std::size_t PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::nbasis ( ) const
inlinenoexcept

Get the total number of basis functions.

Returns
The number of basis functions.

◆ full_domain()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
discrete_domain_type PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::full_domain ( ) const
inlinenoexcept

Returns the index range containing the indices of all the polar b-splines.

Returns
The index range containing the indices of all the polar b-splines.

◆ tensor_bspline_idx_range()

template<class BSplinesR , class BSplinesTheta , int C>
template<class DDim , class MemorySpace >
discrete_domain_type PolarBSplines< BSplinesR, BSplinesTheta, C >::Impl< DDim, MemorySpace >::tensor_bspline_idx_range ( ) const
inlinenoexcept

Returns the ddc::DiscreteDomain containing the indices of the b-splines which don't traverse the singular point and can be expressed as a tensor-product of 1D b-splines.

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

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