SpECTRE
v2024.12.16
|
Maps the radius as
#include <CubicScale.hpp>
Public Member Functions | |
CubicScale (double outer_boundary, std::string function_of_time_name_a, std::string function_of_time_name_b) | |
template<typename T > | |
std::array< tt::remove_cvref_wrap_t< T >, Dim > | operator() (const std::array< T, Dim > &source_coords, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const |
std::optional< std::array< double, Dim > > | inverse (const std::array< double, Dim > &target_coords, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const |
Returns std::nullopt if the point is outside the range of the map. 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 > | |
std::array< tt::remove_cvref_wrap_t< T >, Dim > | frame_velocity (const std::array< T, Dim > &source_coords, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const |
template<typename T > | |
tnsr::Ij< tt::remove_cvref_wrap_t< T >, Dim, Frame::NoFrame > | inv_jacobian (const std::array< T, Dim > &source_coords, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const |
template<typename T > | |
tnsr::Ij< tt::remove_cvref_wrap_t< T >, Dim, Frame::NoFrame > | jacobian (const std::array< T, Dim > &source_coords, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const |
void | pup (PUP::er &p) |
const std::unordered_set< std::string > & | function_of_time_names () const |
Static Public Member Functions | |
static bool | is_identity () |
Static Public Attributes | |
static constexpr size_t | dim = Dim |
Friends | |
template<size_t LocalDim> | |
bool | operator== (const CubicScale< LocalDim > &lhs, const CubicScale< LocalDim > &rhs) |
Maps the radius as
The map scales the radius
The mapped coordinates are given by:
where
The inverse map is computed by solving the cubic equation:
which is done by defining
The source coordinates are obtained using:
The Jacobian is given by:
The inverse Jacobian is given by:
The mesh velocity