SpECTRE  2021.08.02
domain::CoordinateMaps::Equiangular Class Reference

Non-linear map from \(\xi \in [A, B]\rightarrow x \in [a, b]\). More...

#include <Equiangular.hpp>

Public Member Functions

 Equiangular (double A, double B, double a, double b) noexcept
 
 Equiangular (const Equiangular &)=default
 
 Equiangular (Equiangular &&) noexcept=default
 
Equiangular & operator= (const Equiangular &)=default
 
Equiangular & operator= (Equiangular &&)=default
 
template<typename T >
std::array< tt::remove_cvref_wrap_t< T >, 1 > operator() (const std::array< T, 1 > &source_coords) const noexcept
 
std::optional< std::array< double, 1 > > inverse (const std::array< double, 1 > &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 >, 1, Frame::NoFrame > jacobian (const std::array< T, 1 > &source_coords) const noexcept
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 1, Frame::NoFrame > inv_jacobian (const std::array< T, 1 > &source_coords) const noexcept
 
void pup (PUP::er &p) noexcept
 

Static Public Member Functions

static bool is_identity () noexcept
 

Static Public Attributes

static constexpr size_t dim = 1
 

Friends

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

Detailed Description

Non-linear map from \(\xi \in [A, B]\rightarrow x \in [a, b]\).

The formula for the mapping is:

\begin{align} x &= \frac{a}{2} \left(1-\mathrm{tan}\left( \frac{\pi(2\xi-B-A)}{4(B-A)}\right)\right) + \frac{b}{2} \left(1+\mathrm{tan}\left( \frac{\pi(2\xi-B-A)}{4(B-A)}\right)\right)\\ \xi &= \frac{A}{2} \left(1-\frac{4}{\pi}\mathrm{arctan}\left( \frac{2x-a-b}{b-a}\right)\right)+ \frac{B}{2} \left(1+\frac{4}{\pi}\mathrm{arctan}\left( \frac{2x-a-b}{b-a}\right)\right) \end{align}

Note
The intermediate step in which a tangent map is applied can be more clearly understood if we define the coordinates:

\begin{align} \xi_{logical} &:= \frac{2\xi-B-A}{B-A} \in [-1, 1]\\ \Xi &:= \mathrm{tan}\left(\frac{\pi\xi_{logical}}{4}\right) \in [-1, 1] \end{align}

This map is intended to be used with the Wedge map when equiangular coordinates are chosen for those maps. For more information on this choice of coordinates, see the documentation for Wedge.