SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
domain::CoordinateMaps::Rotation< 2 > Class Reference

Spatial rotation in two dimensions. More...

#include <Rotation.hpp>

Public Member Functions

 Rotation (double rotation_angle)
 Constructor. More...
 
 Rotation (const Rotation &)=default
 
Rotationoperator= (const Rotation &)=default
 
 Rotation (Rotation &&)=default
 
Rotationoperator= (Rotation &&)=default
 
template<typename T >
std::array< tt::remove_cvref_wrap_t< T >, 2 > operator() (const std::array< T, 2 > &source_coords) const
 
std::optional< std::array< double, 2 > > inverse (const std::array< double, 2 > &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 >, 2, Frame::NoFramejacobian (const std::array< T, 2 > &source_coords) const
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 2, Frame::NoFrameinv_jacobian (const std::array< T, 2 > &source_coords) const
 
void pup (PUP::er &p)
 
bool is_identity () const
 

Static Public Attributes

static constexpr size_t dim = 2
 

Friends

bool operator== (const Rotation< 2 > &lhs, const Rotation< 2 > &rhs)
 

Detailed Description

Spatial rotation in two dimensions.

Let (R,Φ) be the polar coordinates associated with (ξ,η). Let (r,ϕ) be the polar coordinates associated with (x,y). Applies the spatial rotation ϕ=Φ+α.

The formula for the mapping is:

x=ξcosαηsinαy=ξsinα+ηcosα

.

Constructor & Destructor Documentation

◆ Rotation()

domain::CoordinateMaps::Rotation< 2 >::Rotation ( double  rotation_angle)
explicit

Constructor.

Parameters
rotation_anglethe angle α (in radians).

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