Gyselalib++
DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace > Class Template Reference

A class for describing discrete 2D mappings from the logical domain to the physical domain. More...

Inheritance diagram for DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >:
CoordinateConverter< ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 >, ddc::Coordinate< X, Y > > NonAnalyticalJacobian< ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > > PseudoCartesianCompatibleMapping Curvilinear2DToCartesian< X, Y, typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > Jacobian< PositionCoordinate >

Public Types

using BSplineR = typename SplineEvaluator::bsplines_type1
 Indicate the bspline type of the first logical dimension.
 
using BSplineTheta = typename SplineEvaluator::bsplines_type2
 Indicate the bspline type of the second logical dimension.
 
using cartesian_tag_x = typename Curvilinear2DToCartesian< X, Y, R, Theta >::cartesian_tag_x
 Indicate the first physical coordinate.
 
using cartesian_tag_y = typename Curvilinear2DToCartesian< X, Y, R, Theta >::cartesian_tag_y
 Indicate the second physical coordinate.
 
using curvilinear_tag_r = typename Curvilinear2DToCartesian< X, Y, R, Theta >::curvilinear_tag_r
 Indicate the first logical coordinate.
 
using curvilinear_tag_theta = typename Curvilinear2DToCartesian< X, Y, R, Theta >::curvilinear_tag_theta
 Indicate the second logical coordinate.
 
using CoordArg = ddc::Coordinate< R, Theta >
 The type of the argument of the function described by this mapping.
 
using CoordResult = ddc::Coordinate< X, Y >
 The type of the result of the function described by this mapping.
 
- Public Types inherited from PseudoCartesianCompatibleMapping
using Matrix_2x2 = std::array< std::array< double, 2 >, 2 >
 The type of the pseudo-Cartesian Jacobian matrix and its inverse.
 
- Public Types inherited from Curvilinear2DToCartesian< X, Y, typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 >
using cartesian_tag_x = X
 Indicate the first physical coordinate.
 
using cartesian_tag_y = Y
 Indicate the second physical coordinate.
 
using curvilinear_tag_r = typename SplineEvaluator::continuous_dimension_type1
 Indicate the first logical coordinate.
 
using curvilinear_tag_theta = typename SplineEvaluator::continuous_dimension_type2
 Indicate the second logical coordinate.
 

Public Member Functions

KOKKOS_FUNCTION DiscreteToCartesian (SplineType curvilinear_to_x, SplineType curvilinear_to_y, SplineEvaluator const &evaluator, IdxRangeTheta idx_range_theta)
 Instantiate a DiscreteToCartesian from the coefficients of 2D splines approximating the mapping. More...
 
KOKKOS_FUNCTION ddc::Coordinate< X, Yoperator() (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord) const final
 Compute the physical coordinates from the logical coordinates. More...
 
KOKKOS_FUNCTION void jacobian_matrix (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord, Matrix_2x2 &matrix) const final
 Compute full Jacobian matrix. More...
 
KOKKOS_FUNCTION double jacobian_11 (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord) const final
 Compute the (1,1) coefficient of the Jacobian matrix. More...
 
KOKKOS_FUNCTION double jacobian_12 (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord) const final
 Compute the (1,2) coefficient of the Jacobian matrix. More...
 
KOKKOS_FUNCTION double jacobian_21 (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord) const final
 Compute the (2,1) coefficient of the Jacobian matrix. More...
 
KOKKOS_FUNCTION double jacobian_22 (ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &coord) const final
 Compute the (2,2) coefficient of the Jacobian matrix. More...
 
KOKKOS_FUNCTION void to_pseudo_cartesian_jacobian_center_matrix (Matrix_2x2 &matrix) const final
 Compute the full Jacobian matrix from the mapping to the pseudo-Cartesian mapping at the central point. More...
 
KOKKOS_FUNCTION double to_pseudo_cartesian_jacobian_11_center () const final
 Compute the (1,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point. More...
 
KOKKOS_FUNCTION double to_pseudo_cartesian_jacobian_12_center () const final
 Compute the (1,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point. More...
 
KOKKOS_FUNCTION double to_pseudo_cartesian_jacobian_21_center () const final
 Compute the (2,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point. More...
 
KOKKOS_FUNCTION double to_pseudo_cartesian_jacobian_22_center () const final
 Compute the (2,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point. More...
 
KOKKOS_INLINE_FUNCTION const ddc::Coordinate< X, Ycontrol_point (ddc::DiscreteElement< BSplineR, BSplineTheta > const &el) const
 Get a control point of the mapping on B-splines. More...
 
- Public Member Functions inherited from CoordinateConverter< ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 >, ddc::Coordinate< X, Y > >
virtual KOKKOS_FUNCTION ddc::Coordinate< X, Yoperator() (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const=0
 Convert the coordinate to the equivalent coordinate in a different coordinate system. More...
 
- Public Member Functions inherited from NonAnalyticalJacobian< ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > >
KOKKOS_FUNCTION double jacobian (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const final
 Compute the Jacobian, the determinant of the Jacobian matrix of the mapping. More...
 
KOKKOS_FUNCTION void inv_jacobian_matrix (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord, Matrix_2x2 &matrix) const final
 Compute full inverse Jacobian matrix. More...
 
KOKKOS_FUNCTION double inv_jacobian_11 (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const final
 Compute the (1,1) coefficient of the inverse Jacobian matrix. More...
 
KOKKOS_FUNCTION double inv_jacobian_12 (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const final
 Compute the (1,2) coefficient of the inverse Jacobian matrix. More...
 
KOKKOS_FUNCTION double inv_jacobian_21 (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const final
 Compute the (2,1) coefficient of the inverse Jacobian matrix. More...
 
KOKKOS_FUNCTION double inv_jacobian_22 (ddc::Coordinate< typename SplineEvaluator::continuous_dimension_type1, typename SplineEvaluator::continuous_dimension_type2 > const &coord) const final
 Compute the (2,2) coefficient of the inverse Jacobian matrix. More...
 
- Public Member Functions inherited from Jacobian< PositionCoordinate >
virtual KOKKOS_FUNCTION double jacobian (PositionCoordinate const &coord) const =0
 Compute the Jacobian, the determinant of the Jacobian matrix of the mapping. More...
 
virtual KOKKOS_FUNCTION void jacobian_matrix (PositionCoordinate const &coord, Matrix_2x2 &matrix) const =0
 Compute full Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double jacobian_11 (PositionCoordinate const &coord) const =0
 Compute the (1,1) coefficient of the Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double jacobian_12 (PositionCoordinate const &coord) const =0
 Compute the (1,2) coefficient of the Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double jacobian_21 (PositionCoordinate const &coord) const =0
 Compute the (2,1) coefficient of the Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double jacobian_22 (PositionCoordinate const &coord) const =0
 Compute the (2,2) coefficient of the Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION void inv_jacobian_matrix (PositionCoordinate const &coord, Matrix_2x2 &matrix) const =0
 Compute full inverse Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double inv_jacobian_11 (PositionCoordinate const &coord) const =0
 Compute the (1,1) coefficient of the inverse Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double inv_jacobian_12 (PositionCoordinate const &coord) const =0
 Compute the (1,2) coefficient of the inverse Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double inv_jacobian_21 (PositionCoordinate const &coord) const =0
 Compute the (2,1) coefficient of the inverse Jacobian matrix. More...
 
virtual KOKKOS_FUNCTION double inv_jacobian_22 (PositionCoordinate const &coord) const =0
 Compute the (2,2) coefficient of the inverse Jacobian matrix. More...
 

Detailed Description

template<class X, class Y, class SplineEvaluator, class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
class DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >

A class for describing discrete 2D mappings from the logical domain to the physical domain.

The mapping describe here is only defined on a grid. The DiscreteToCartesian class decomposes the mapping on B-splines to evaluate it on the physical domain.

\( x(r,\theta) = \sum_k c_{x,k} B_k(r,\theta),\)

\( y(r,\theta) = \sum_k c_{y,k} B_k(r,\theta).\)

This mapping could be costly to inverse.

See also
Curvilinear2DToCartesian

Constructor & Destructor Documentation

◆ DiscreteToCartesian()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::DiscreteToCartesian ( SplineType  curvilinear_to_x,
SplineType  curvilinear_to_y,
SplineEvaluator const &  evaluator,
IdxRangeTheta  idx_range_theta 
)
inline

Instantiate a DiscreteToCartesian from the coefficients of 2D splines approximating the mapping.

A discrete mapping is a mapping whose values are known only at the mesh points of the grid. To interpolate the mapping, we use B-splines. The DiscreteToCartesian mapping is initialized from the coefficients in front of the basis splines which arise when we approximate the functions \( x(r,\theta) \), and \( y(r,\theta) \) (with \( x \) and \( y \) the physical dimensions in the logical domain) with Splines (using SplineBuilder2D). Then to interpolate the mapping, we will evaluate the decomposed functions on B-splines (see DiscreteToCartesian::operator()).

Here, the evaluator is given as input.

Parameters
[in]curvilinear_to_xBsplines coefficients of the first physical dimension in the logical domain.
[in]curvilinear_to_yBsplines coefficients of the second physical dimension in the logical domain.
[in]evaluatorThe evaluator used to evaluate the mapping.
[in]idx_range_thetaThe index range describing the poloidal points which should be used to average the derivatives of the pseudo-Cartesian matrix at the central point.
See also
SplineBuilder2D
DiscreteToCartesian::operator()
SplineBoundaryValue

Member Function Documentation

◆ operator()()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION ddc::Coordinate<X, Y> DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::operator() ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord) const
inlinefinal

Compute the physical coordinates from the logical coordinates.

It evaluates the decomposed mapping on B-splines at the coordinate point with a SplineEvaluator2D.

Parameters
[in]coordThe coordinates in the logical domain.
Returns
The coordinates of the mapping in the physical domain.
See also
SplineEvaluator2D

◆ jacobian_matrix()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION void DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::jacobian_matrix ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord,
Matrix_2x2 matrix 
) const
inlinefinal

Compute full Jacobian matrix.

For some computations, we need the complete Jacobian matrix or just the coefficients. The coefficients can be given indendently with the functions jacobian_11, jacobian_12, jacobian_21 and jacobian_22.

Parameters
[in]coordThe coordinate where we evaluate the Jacobian matrix.
[out]matrixThe Jacobian matrix returned.
See also
Curvilinear2DToCartesian::jacobian_11
Curvilinear2DToCartesian::jacobian_12
Curvilinear2DToCartesian::jacobian_21
Curvilinear2DToCartesian::jacobian_22

◆ jacobian_11()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::jacobian_11 ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord) const
inlinefinal

Compute the (1,1) coefficient of the Jacobian matrix.

For a mapping given by \( \mathcal{F} : (r,\theta)\mapsto (x,y) \), the (1,1) coefficient of the Jacobian matrix is given by \( \frac{\partial x}{\partial r} \). As the mapping is decomposed on B-splines, it means it computes the derivatives of B-splines \( \frac{\partial x}{\partial r} (r,\theta)= \sum_k c_{x,k} \frac{\partial B_k}{\partial r}(r,\theta)\) (the derivatives are implemented in SplineEvaluator2D).

Parameters
[in]coordThe coordinate where we evaluate the Jacobian matrix.
Returns
A double with the value of the (1,1) coefficient of the Jacobian matrix.
See also
SplineEvaluator2D

◆ jacobian_12()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::jacobian_12 ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord) const
inlinefinal

Compute the (1,2) coefficient of the Jacobian matrix.

For a mapping given by \( \mathcal{F} : (r,\theta)\mapsto (x,y) \), the (1,2) coefficient of the Jacobian matrix is given by \( \frac{\partial x}{\partial \theta} \). As the mapping is decomposed on B-splines, it means it computes \( \frac{\partial x}{\partial \theta}(r,\theta) = \sum_k c_{x,k} \frac{\partial B_k}{\partial \theta}(r,\theta) \) (the derivatives of B-splines are implemented in SplineEvaluator2D).

Parameters
[in]coordThe coordinate where we evaluate the Jacobian matrix.
Returns
A double with the value of the (1,2) coefficient of the Jacobian matrix.
See also
SplineEvaluator2D

◆ jacobian_21()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::jacobian_21 ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord) const
inlinefinal

Compute the (2,1) coefficient of the Jacobian matrix.

For a mapping given by \( \mathcal{F} : (r,\theta)\mapsto (x,y) \), the (2,1) coefficient of the Jacobian matrix is given by \( \frac{\partial y}{\partial r} \). As the mapping is decomposed on B-splines, it means it computes \( \frac{\partial y}{\partial r}(r,\theta) = \sum_k c_{y,k} \frac{\partial B_k}{\partial r}(r,\theta)\) (the derivatives of B-splines are implemented in SplineEvaluator2D).

Parameters
[in]coordThe coordinate where we evaluate the Jacobian matrix. .
Returns
A double with the value of the (2,1) coefficient of the Jacobian matrix.
See also
SplineEvaluator2D

◆ jacobian_22()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::jacobian_22 ( ddc::Coordinate< curvilinear_tag_r, curvilinear_tag_theta > const &  coord) const
inlinefinal

Compute the (2,2) coefficient of the Jacobian matrix.

For a mapping given by \( \mathcal{F} : (r,\theta)\mapsto (x,y) \), the (2,2) coefficient of the Jacobian matrix is given by \( \frac{\partial y}{\partial \theta} \). As the mapping is decomposed on B-splines, it means it computes \( \frac{\partial y}{\partial \theta} (r,\theta) = \sum_k c_{y,k} \frac{\partial B_k}{\partial \theta}(r,\theta) \) (the derivatives of B-splines are implemented in SplineEvaluator2D).

Parameters
[in]coordThe coordinate where we evaluate the Jacobian matrix.
Returns
A double with the value of the (2,2) coefficient of the Jacobian matrix.
See also
SplineEvaluator2D

◆ to_pseudo_cartesian_jacobian_center_matrix()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION void DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::to_pseudo_cartesian_jacobian_center_matrix ( Matrix_2x2 matrix) const
inlinefinalvirtual

Compute the full Jacobian matrix from the mapping to the pseudo-Cartesian mapping at the central point.

The discrete mappings can be difficult to inverse especially at the central point. In case of non analytical invertible mapping, we can work in another domain called pseudo-Cartesian domain. In this domain, it is easier to inverse the Jacobian matrix. The idea is detailed in Edoardo Zoni's article (Solving hyperbolic-elliptic problems on singular mapped disk-like domains with the method of characteristics and spline finite elements, https://doi.org/10.1016/j.jcp.2019.108889)

The current mapping maps from the logical domain to the physical domain \( \mathcal{F}: (r,\theta) \mapsto (x, y)\). The pseudo-Cartesian domain is built with \( \mathcal{F} \) and using the circular mapping \( \mathcal{G} \):

  • \( \mathcal{G}_{11}(r, \theta) = \cos(\theta), \qquad\quad \mathcal{G}_{12}(r, \theta) = \sin(\theta) \),
  • \( \mathcal{G}_{21}(r, \theta) = -\frac{1}{r}\sin(\theta), \qquad\quad \mathcal{G}_{22}(r, \theta) = \frac{1}{r}\cos(\theta) \).

The pseudo-Cartesian domain is obtained by the composition of both mappings: \( (\mathcal{F} \circ \mathcal{G}^{-1})^{-1} \). This new mapping is invertible and its inverse at the central point is given by

  • \( (J_{\mathcal{F}}J_{\mathcal{G}}^{-1})_{11}(0, \theta) = \partial_r x (0, \theta) \cos(\theta) - \partial_{r \theta} x (0, \theta) \sin(\theta), \)
  • \( (J_{\mathcal{F}}J_{\mathcal{G}}^{-1})_{12}(0, \theta) = \partial_r x (0, \theta) \sin(\theta) + \partial_{r \theta} x (0, \theta) \cos(\theta), \)
  • \( (J_{\mathcal{F}}J_{\mathcal{G}}^{-1})_{21}(0, \theta) = \partial_r y (0, \theta) \cos(\theta) - \partial_{r \theta} y (0, \theta) \sin(\theta), \)
  • \( (J_{\mathcal{F}}J_{\mathcal{G}}^{-1})_{22}(0, \theta) = \partial_r y (0, \theta) \sin(\theta) + \partial_{r \theta} y (0, \theta) \cos(\theta). \)

So the pseudo-Cartesian Jacobian matrix at the central point, \( (J_{\mathcal{F}}J_{\mathcal{G}}^{-1})^{-1}(0, \theta) \), is obtained by inversing this matrix.

Parameters
[out]matrixThe pseudo-Cartesian matrix evaluated at the central point.
See also
Curvilinear2DToCartesian
BslAdvection
AdvectionDomain

Implements PseudoCartesianCompatibleMapping.

◆ to_pseudo_cartesian_jacobian_11_center()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::to_pseudo_cartesian_jacobian_11_center ( ) const
inlinefinalvirtual

Compute the (1,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.

Returns
A double with the (1,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.
See also
to_pseudo_cartesian_jacobian_center_matrix

Implements PseudoCartesianCompatibleMapping.

◆ to_pseudo_cartesian_jacobian_12_center()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::to_pseudo_cartesian_jacobian_12_center ( ) const
inlinefinalvirtual

Compute the (1,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.

Returns
A double with the (1,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.
See also
to_pseudo_cartesian_jacobian_center_matrix

Implements PseudoCartesianCompatibleMapping.

◆ to_pseudo_cartesian_jacobian_21_center()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::to_pseudo_cartesian_jacobian_21_center ( ) const
inlinefinalvirtual

Compute the (2,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.

Returns
A double with the (2,1) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.
See also
to_pseudo_cartesian_jacobian_center_matrix

Implements PseudoCartesianCompatibleMapping.

◆ to_pseudo_cartesian_jacobian_22_center()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_FUNCTION double DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::to_pseudo_cartesian_jacobian_22_center ( ) const
inlinefinalvirtual

Compute the (2,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.

Returns
A double with the (2,2) coefficient of the pseudo-Cartesian Jacobian matrix at the central point.
See also
to_pseudo_cartesian_jacobian_center_matrix

Implements PseudoCartesianCompatibleMapping.

◆ control_point()

template<class X , class Y , class SplineEvaluator , class R = typename SplineEvaluator::continuous_dimension_type1, class Theta = typename SplineEvaluator::continuous_dimension_type2, class MemorySpace = typename SplineEvaluator::memory_space>
KOKKOS_INLINE_FUNCTION const ddc::Coordinate<X, Y> DiscreteToCartesian< X, Y, SplineEvaluator, R, Theta, MemorySpace >::control_point ( ddc::DiscreteElement< BSplineR, BSplineTheta > const &  el) const
inline

Get a control point of the mapping on B-splines.

The mapping \( (r,\theta) \mapsto (x,y) \) decomposed on B-splines can be identified by its control points \( \{(c_{x,k}, c_{y,k})\}_{k} \) where \( c_{x,k} \) and \( c_{y,k} \) are the B-splines coefficients:

\( x(r,\theta) = \sum_{k=0}^{N_r\times N_{\theta}-1} c_{x, k} B_k{r,\theta} \),

\( y(r,\theta) = \sum_{k=0}^{N_r\times N_{\theta}-1} c_{y, k} B_k{r,\theta} \),

where \( N_r\times N_{\theta} \) is the number of B-splines.

The control points can be obtained by interpolating the mapping on interpolation points (see GrevilleInterpolationPoints or KnotsAsInterpolationPoints). We can also note that the first control points \( \{(c_{x,k}, c_{y,k})\}_{k=0}^{N_{\theta}} \) are equal to the pole \( (c_{x,k}, c_{y,k}) = (x_0,y_0) \), \( \forall k = 0, ..., N_{\theta}-1 \) where \( x(0,\theta), y(0,\theta) = (x_0,y_0) \) \( \forall \theta \).

Parameters
[in]elThe number of the control point.
Returns
The el-th control point.
See also
GrevilleInterpolationPoints
KnotsAsInterpolationPoints

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