SpECTRE  v2022.12.02
domain::CoordinateMaps::SphericalTorus Class Reference

Torus made by removing two polar cones from a spherical shell. More...

#include <SphericalTorus.hpp>

Classes

struct  FractionOfTorus
 
struct  MinPolarAngle
 
struct  RadialRange
 

Public Types

using options = tmpl::list< RadialRange, MinPolarAngle, FractionOfTorus >
 

Public Member Functions

 SphericalTorus (const std::array< double, 2 > &radial_range, const double min_polar_angle, const double fraction_of_torus, const Options::Context &context={})
 
 SphericalTorus (double r_min, double r_max, double min_polar_angle, double fraction_of_torus=1.0, const Options::Context &context={})
 
template<typename T >
std::array< tt::remove_cvref_wrap_t< T >, 3 > operator() (const std::array< T, 3 > &source_coords) const
 
std::optional< std::array< double, 3 > > inverse (const std::array< double, 3 > &target_coords) const
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFramejacobian (const std::array< T, 3 > &source_coords) const
 
template<typename T >
tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrameinv_jacobian (const std::array< T, 3 > &source_coords) const
 
template<typename T >
tnsr::Ijj< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFramehessian (const std::array< T, 3 > &source_coords) const
 
template<typename T >
tnsr::Ijk< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFramederivative_of_inv_jacobian (const std::array< T, 3 > &source_coords) const
 
void pup (PUP::er &p)
 
bool is_identity () const
 

Static Public Attributes

static constexpr size_t dim = 3
 
static constexpr Options::String help
 

Friends

bool operator== (const SphericalTorus &lhs, const SphericalTorus &rhs)
 

Detailed Description

Torus made by removing two polar cones from a spherical shell.

Maps source coordinates \((\xi, \eta, \zeta)\) to

\begin{align} \vec{x}(\xi, \eta, \zeta) = \begin{bmatrix} r \sin\theta\cos\phi \\ r \sin\theta\sin\phi \\ r \cos\theta \end{bmatrix} \end{align}

where

\begin{align} r & = r_\mathrm{min}\frac{1-\xi}{2} + r_\mathrm{max}\frac{1+\xi}{2}, \\ \theta & = \pi/2 - (\pi/2 - \theta_\mathrm{min}) \eta, \\ \phi & = f_\mathrm{torus} \pi \zeta. \end{align}

  • \(r_\mathrm{min}\) and \(r_\mathrm{max}\) are inner and outer radius of torus.
  • \(\theta_\mathrm{min}\in(0,\pi/2)\) is the minimum polar angle (measured from +z axis) of torus, which is equal to the half of the apex angle of the removed polar cones.
  • \(f_\mathrm{torus}\in(0, 1)\) is azimuthal fraction that the torus covers.
Warning
Internal namings of code variables in SphericalTorus.cpp uses a different convention of angular variables for spherical coordinates. Therein theta denotes the azimuthal angle, and phi denotes the elevation angle measured from equator, which is equal to ( \(\pi/2\) - polar angle) with the polar angle being measured from +z axis.

Member Data Documentation

◆ help

constexpr Options::String domain::CoordinateMaps::SphericalTorus::help
staticconstexpr
Initial value:
=
"Torus made by removing polar cones from a spherical shell"

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