SpECTRE  2021.08.02
domain::CoordinateMaps::EquatorialCompression Class Reference

Redistributes gridpoints on the sphere. More...

#include <EquatorialCompression.hpp>

Public Member Functions

 EquatorialCompression (double aspect_ratio) noexcept
 
 EquatorialCompression (EquatorialCompression &&)=default
 
 EquatorialCompression (const EquatorialCompression &)=default
 
EquatorialCompressionoperator= (const EquatorialCompression &)=default
 
EquatorialCompressionoperator= (EquatorialCompression &&)=default
 
template<typename T >
std::array< tt::remove_cvref_wrap_t< T >, 3 > operator() (const std::array< T, 3 > &source_coords) const noexcept
 
std::optional< std::array< double, 3 > > inverse (const std::array< double, 3 > &target_coords) const noexcept
 The inverse function is only callable with doubles because the inverse might fail if called for a point out of range, and it is unclear what should happen if the inverse were to succeed for some points in a DataVector but fail for other points.
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFramejacobian (const std::array< T, 3 > &source_coords) const noexcept
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrameinv_jacobian (const std::array< T, 3 > &source_coords) const noexcept
 
void pup (PUP::er &p) noexcept
 
bool is_identity () const noexcept
 

Static Public Attributes

static constexpr size_t dim = 3
 

Friends

bool operator== (const EquatorialCompression &lhs, const EquatorialCompression &rhs) noexcept
 

Detailed Description

Redistributes gridpoints on the sphere.

A sphere with an `aspect_ratio` of 3.

Details

A mapping from the sphere to itself which depends on a single parameter, the aspect_ratio \(\alpha\), which is the ratio of the horizontal length to the vertical height for a given point. This parameter name was chosen because points with \(\tan \theta = 1\) get mapped to points with \(\tan \theta' = \alpha\). In general, gridpoints located at an angle \(\theta\) from the pole are mapped to a new angle \(\theta'\) satisfying \(\tan \theta' = \alpha \tan \theta\).

For an aspect_ratio greater than one, the gridpoints are mapped towards the equator, leading to an equatorially compressed grid. For an aspect_ratio less than one, the gridpoints are mapped towards the poles. Note that the aspect ratio must be positive.

We define the auxiliary variables \( r := \sqrt{x^2 + y^2 +z^2}\) and \( \rho := \sqrt{x^2 + y^2 + \alpha^{-2} z^2}\).

The map corresponding to this transformation in cartesian coordinates is then given by:

\[\vec{x}'(x,y,z) = \frac{r}{\rho}\begin{bmatrix} x\\ y\\ \alpha^{-1} z\\ \end{bmatrix}\]