SpECTRE
v2024.09.29
|
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) | |
Equiangular (const Equiangular &)=default | |
Equiangular (Equiangular &&)=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 |
std::optional< std::array< double, 1 > > | inverse (const std::array< double, 1 > &target_coords) const |
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 |
template<typename T > | |
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 1, Frame::NoFrame > | inv_jacobian (const std::array< T, 1 > &source_coords) const |
void | pup (PUP::er &p) |
Static Public Member Functions | |
static bool | is_identity () |
Static Public Attributes | |
static constexpr size_t | dim = 1 |
Friends | |
bool | operator== (const Equiangular &lhs, const Equiangular &rhs) |
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}
\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
.