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). | |
CartesianToCzarny & | operator= (CartesianToCzarny const &x)=default |
Assign a CartesianToCzarny from another CartesianToCzarny (lvalue). | |
CartesianToCzarny & | operator= (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, Theta > | operator() (ddc::Coordinate< X, Y > const &coord) const |
Convert the coordinate (x,y) to the equivalent \( (r, \theta) \) coordinate. | |
CzarnyToCartesian< R, Theta, X, Y > | get_inverse_mapping () const |
Get the inverse mapping. | |
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.
|
inline |
Instantiate a CartesianToCzarny from parameters.
[in] | epsilon | The \( \epsilon \) parameter in the definition of the mapping CartesianToCzarny. |
[in] | e | The \( e \) parameter in the definition of the mapping CartesianToCzarny. |
|
inline |
Instantiate a CartesianToCzarny from another CartesianToCzarny (lvalue).
[in] | other | CartesianToCzarny mapping used to instantiate the new one. |
|
default |
Instantiate a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).
[in] | x | CartesianToCzarny mapping used to instantiate the new one. |
|
default |
Assign a CartesianToCzarny from another CartesianToCzarny (lvalue).
[in] | x | CartesianToCzarny mapping used to assign. |
|
default |
Assign a CartesianToCzarny from another temporary CartesianToCzarny (rvalue).
[in] | x | CartesianToCzarny mapping used to assign. |
|
inline |
|
inline |
|
inline |
Convert the coordinate (x,y) to the equivalent \( (r, \theta) \) coordinate.
[in] | coord | The coordinate to be converted. |
|
inline |
Get the inverse mapping.