Gyselalib++
 
Loading...
Searching...
No Matches
CartesianToCzarny< X, Y, R, Theta > Class Template Reference

A class for describing the Czarny 2D mapping. More...

Public Types

using cartesian_tag_x = X
 Indicate the first physical coordinate.
 
using cartesian_tag_y = Y
 Indicate the second physical coordinate.
 
using curvilinear_tag_r = R
 Indicate the first logical coordinate.
 
using curvilinear_tag_theta = Theta
 Indicate the second logical coordinate.
 
using CoordArg = ddc::Coordinate< X, Y >
 The type of the argument of the function described by this mapping.
 
using CoordResult = ddc::Coordinate< R, Theta >
 The type of the result of the function described by this mapping.
 

Public Member Functions

 CartesianToCzarny (double epsilon, double e)
 Instantiate a CartesianToCzarny from parameters.
 
KOKKOS_FUNCTION CartesianToCzarny (CartesianToCzarny const &other)
 Instantiate a CartesianToCzarny from another CartesianToCzarny (lvalue).
 
 CartesianToCzarny (CartesianToCzarny &&x)=default
 Instantiate a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).
 
CartesianToCzarnyoperator= (CartesianToCzarny const &x)=default
 Assign a CartesianToCzarny from another CartesianToCzarny (lvalue).
 
CartesianToCzarnyoperator= (CartesianToCzarny &&x)=default
 Assign a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).
 
KOKKOS_FUNCTION double epsilon () const
 Return the \( \epsilon \) parameter.
 
KOKKOS_FUNCTION double e () const
 Return the \( e \) parameter.
 
KOKKOS_FUNCTION ddc::Coordinate< R, Thetaoperator() (ddc::Coordinate< X, Y > const &coord) const
 Convert the coordinate (x,y) to the equivalent \( (r, \theta) \) coordinate.
 
CzarnyToCartesian< R, Theta, X, Yget_inverse_mapping () const
 Get the inverse mapping.
 

Detailed Description

template<class X, class Y, class R, class Theta>
class CartesianToCzarny< X, Y, R, Theta >

A class for describing the Czarny 2D mapping.

The mapping \( (x,y) \mapsto (r,\theta)\) is defined by

\( r(x,y) = \sqrt{\frac{y^2 (1+\epsilon x)^2}{e^2\xi^2+0.25(\epsilon x^2-2x-\epsilon)^2}},\)

\( \theta (x,y)) = atan2(2. y (1+\epsilon x), (e \xi (\epsilon x^2 - 2x-\epsilon))), \)

with \( \xi = 1/\sqrt{1 - \epsilon^2 /4} \) and \( e \) and \( \epsilon \) given as parameters.

Constructor & Destructor Documentation

◆ CartesianToCzarny() [1/3]

template<class X , class Y , class R , class Theta >
CartesianToCzarny< X, Y, R, Theta >::CartesianToCzarny ( double  epsilon,
double  e 
)
inline

Instantiate a CartesianToCzarny from parameters.

Parameters
[in]epsilonThe \( \epsilon \) parameter in the definition of the mapping CartesianToCzarny.
[in]eThe \( e \) parameter in the definition of the mapping CartesianToCzarny.
See also
CartesianToCzarny

◆ CartesianToCzarny() [2/3]

template<class X , class Y , class R , class Theta >
KOKKOS_FUNCTION CartesianToCzarny< X, Y, R, Theta >::CartesianToCzarny ( CartesianToCzarny< X, Y, R, Theta > const &  other)
inline

Instantiate a CartesianToCzarny from another CartesianToCzarny (lvalue).

Parameters
[in]otherCartesianToCzarny mapping used to instantiate the new one.

◆ CartesianToCzarny() [3/3]

template<class X , class Y , class R , class Theta >
CartesianToCzarny< X, Y, R, Theta >::CartesianToCzarny ( CartesianToCzarny< X, Y, R, Theta > &&  x)
default

Instantiate a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).

Parameters
[in]xCartesianToCzarny mapping used to instantiate the new one.

Member Function Documentation

◆ operator=() [1/2]

template<class X , class Y , class R , class Theta >
CartesianToCzarny & CartesianToCzarny< X, Y, R, Theta >::operator= ( CartesianToCzarny< X, Y, R, Theta > const &  x)
default

Assign a CartesianToCzarny from another CartesianToCzarny (lvalue).

Parameters
[in]xCartesianToCzarny mapping used to assign.
Returns
The CartesianToCzarny assigned.

◆ operator=() [2/2]

template<class X , class Y , class R , class Theta >
CartesianToCzarny & CartesianToCzarny< X, Y, R, Theta >::operator= ( CartesianToCzarny< X, Y, R, Theta > &&  x)
default

Assign a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).

Parameters
[in]xCartesianToCzarny mapping used to assign.
Returns
The CartesianToCzarny assigned.

◆ epsilon()

template<class X , class Y , class R , class Theta >
KOKKOS_FUNCTION double CartesianToCzarny< X, Y, R, Theta >::epsilon ( ) const
inline

Return the \( \epsilon \) parameter.

Returns
The value of \( \epsilon \).
See also
CartesianToCzarny

◆ e()

template<class X , class Y , class R , class Theta >
KOKKOS_FUNCTION double CartesianToCzarny< X, Y, R, Theta >::e ( ) const
inline

Return the \( e \) parameter.

Returns
The value of \( e \).
See also
CartesianToCzarny

◆ operator()()

template<class X , class Y , class R , class Theta >
KOKKOS_FUNCTION ddc::Coordinate< R, Theta > CartesianToCzarny< X, Y, R, Theta >::operator() ( ddc::Coordinate< X, Y > const &  coord) const
inline

Convert the coordinate (x,y) to the equivalent \( (r, \theta) \) coordinate.

Parameters
[in]coordThe coordinate to be converted.
Returns
The equivalent coordinate.

◆ get_inverse_mapping()

template<class X , class Y , class R , class Theta >
CzarnyToCartesian< R, Theta, X, Y > CartesianToCzarny< X, Y, R, Theta >::get_inverse_mapping ( ) const
inline

Get the inverse mapping.

Returns
The inverse mapping.

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