SpECTRE
v2024.12.16
|
Pfaffian transformation from spherical to Cartesian coordinates. More...
#include <SphericalToCartesianPfaffian.hpp>
Public Member Functions | |
SphericalToCartesianPfaffian (SphericalToCartesianPfaffian &&) | |
SphericalToCartesianPfaffian (const SphericalToCartesianPfaffian &) | |
SphericalToCartesianPfaffian & | operator= (const SphericalToCartesianPfaffian &) |
SphericalToCartesianPfaffian & | operator= (SphericalToCartesianPfaffian &&) |
template<typename T > | |
std::array< tt::remove_cvref_wrap_t< T >, 3 > | operator() (const std::array< T, 3 > &source_coords) const |
std::optional< std::array< double, 3 > > | inverse (const std::array< double, 3 > &target_coords) const |
template<typename T > | |
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrame > | jacobian (const std::array< T, 3 > &source_coords) const |
template<typename T > | |
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrame > | inv_jacobian (const std::array< T, 3 > &source_coords) const |
void | pup (PUP::er &p) |
Static Public Member Functions | |
static constexpr bool | is_identity () |
Static Public Attributes | |
static constexpr size_t | dim = 3 |
Pfaffian transformation from spherical to Cartesian coordinates.
This is a Pfaffian mapping from \((r,\theta,\phi) \rightarrow (x,y,z) \).
The formula for the mapping is...
\begin{eqnarray*} x &=& r \sin\theta \cos\phi \\ y &=& r \sin\theta \sin\phi \\ z &=& r \cos\theta \end{eqnarray*}
The Pfaffian basis vectors \( (e_{\hat r}, e_{\hat \theta}, e_{\hat \phi})\) are related to the coordinate basis vectors \( (e_r, e_{\theta}, e_{\phi})\) by...
\begin{eqnarray*} e_{\hat r} &=& e_r \\ e_{\hat \theta} &=& e_{\theta} \\ e_{\hat \phi} &=& \frac{1}{\sin \theta} e_{\phi} \end{eqnarray*}