SpECTRE  v2021.12.06
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,\Phi)\) be the polar coordinates associated with \((\xi,\eta)\). Let \((r,\phi)\) be the polar coordinates associated with \((x,y)\). Applies the spatial rotation \(\phi = \Phi + \alpha\).

The formula for the mapping is:

\begin{eqnarray*} x &=& \xi \cos \alpha - \eta \sin \alpha \\ y &=& \xi \sin \alpha + \eta \cos \alpha \end{eqnarray*}

.

Constructor & Destructor Documentation

◆ Rotation()

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

Constructor.

Parameters
rotation_anglethe angle \(\alpha\) (in radians).

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