SpECTRE
v2025.01.30
|
RotScaleTrans map which applies a combination of rotation, expansion, and translation based on which maps are supplied. More...
#include <RotScaleTrans.hpp>
Public Types | |
enum class | BlockRegion { Inner , Transition , Outer } |
Public Member Functions | |
RotScaleTrans (std::optional< std::pair< std::string, std::string > > scale_f_of_t_names, std::optional< std::string > rot_f_of_t_name, std::optional< std::string > trans_f_of_t_name, double inner_radius, double outer_radius, BlockRegion region) | |
RotScaleTrans (const RotScaleTrans< Dim > &RotScaleTrans_Map)=default | |
RotScaleTrans (RotScaleTrans &&)=default | |
RotScaleTrans & | operator= (RotScaleTrans &&)=default |
RotScaleTrans & | operator= (const RotScaleTrans &RotScaleTrans_Map)=default |
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 |
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 RotScaleTrans< LocalDim > &lhs, const RotScaleTrans< LocalDim > &rhs) |
RotScaleTrans map which applies a combination of rotation, expansion, and translation based on which maps are supplied.
This map adds a rotation, expansion and translation based on what types of maps are needed. Translation and expansion have piecewise functions that map the coordinates
The RotScaleTrans map takes the coordinates
Where
and
The inverse function maps the coordinates
If Rotation, Expansion, and Translation Maps are supplied then the inverse is given by
Where
When closer to
where
When closer to
where
If Rotation and Expansion are supplied then the inverse is given by
Where
When closer to
with
When closer to
with
If Rotation and Translation are supplied, then the inverse is given by
Where
When closer to
When closer to
If Expansion and Translation are supplied, then the inverse is given by Eq.
The Frame Velocity is found through different equations based on which maps are supplied.
If Rotation, Expansion, and Translation are supplied then the frame velocity is found through
where
The jacobian is also found through different equations based on which maps are supplied.
If Rotation, Expansion and Translation maps are supplied then the jacobian is found through
where
The inverse jacobian is computed numerically by inverting the jacobian.
|
strong |