SpECTRE  v2024.04.12
domain::CoordinateMaps::Affine Class Reference

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
 
Affineoperator= (const Affine &)=default
 
Affineoperator= (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::NoFramejacobian (const std::array< T, 1 > &source_coords) const
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 1, Frame::NoFrameinv_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)
 

Detailed Description

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) \]


The documentation for this class was generated from the following file: