SpECTRE
v2024.08.03
|
Affine map from \(\xi \in [A, B]\rightarrow x \in [a, b]\). More...
#include <Affine.hpp>
Public Member Functions | |
Affine (double A, double B, double a, double b) | |
Affine (const Affine &)=default | |
Affine (Affine &&)=default | |
Affine & | operator= (const Affine &)=default |
Affine & | operator= (Affine &&)=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) |
bool | is_identity () const |
Static Public Attributes | |
static constexpr size_t | dim = 1 |
Friends | |
bool | operator== (const Affine &lhs, const Affine &rhs) |
Affine map from \(\xi \in [A, B]\rightarrow x \in [a, b]\).
The formula for the mapping is...
\[ x = \frac{b}{B-A} (\xi-A) +\frac{a}{B-A}(B-\xi) \]
\[ \xi =\frac{B}{b-a} (x-a) +\frac{A}{b-a}(b-x) \]