SpECTRE  v2026.06.30
Loading...
Searching...
No Matches
domain::CoordinateMaps::CylindricalSphericalShell Class Reference

Maps a cylindrical shell block to a region bounded by an inner right cylinder and an outer spherical surface. More...

#include <CylindricalSphericalShell.hpp>

Public Member Functions

 CylindricalSphericalShell (double x_inner_lower, double x_inner_upper, double x_outer_lower, double x_outer_upper, double r_inner, double r_sphere)
 Construct the map.
 CylindricalSphericalShell (CylindricalSphericalShell &&)=default
 CylindricalSphericalShell (const CylindricalSphericalShell &)=default
CylindricalSphericalShelloperator= (const CylindricalSphericalShell &)=default
CylindricalSphericalShelloperator= (CylindricalSphericalShell &&)=default
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
void pup (PUP::er &p)

Static Public Member Functions

static bool is_identity ()

Static Public Attributes

static constexpr size_t dim = 3
static constexpr bool supports_hessian {false}

Friends

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

Detailed Description

Maps a cylindrical shell block to a region bounded by an inner right cylinder and an outer spherical surface.

The shaded region is the image.

Details

The logical coordinates are:

  • radial \(\xi \in [-1,1]\): interpolates between the inner right cylinder and the outer sphere.
  • angular \(\eta \in (-\pi, \pi]\): azimuthal angle \(\phi\) (S1 periodic direction). The inverse map returns \(\eta = \mathrm{atan2}(z, y)\), which lies in \((-\pi, \pi]\).
  • axial \(\zeta \in [-1,1]\): blends between the lower and upper ends of the shell.

The physical coordinates \((x, y, z)\) are computed as follows. Let \(\alpha = (\xi+1)/2\) and \(\beta = (\zeta+1)/2\). Define

\begin{align} x_\mathrm{inner}(\beta) &= x^\mathrm{inner}_\mathrm{lower} + \beta\,(x^\mathrm{inner}_\mathrm{upper} - x^\mathrm{inner}_\mathrm{lower}), \\ x_\mathrm{outer}(\beta) &= x^\mathrm{outer}_\mathrm{lower} + \beta\,(x^\mathrm{outer}_\mathrm{upper} - x^\mathrm{outer}_\mathrm{lower}), \\ r_\mathrm{outer}(\beta) &= \sqrt{r_\mathrm{sphere}^2 - x_\mathrm{outer}(\beta)^2}. \end{align}

Then

\begin{align} x &= (1-\alpha)\,x_\mathrm{inner}(\beta) + \alpha\,x_\mathrm{outer}(\beta), \\ r &= (1-\alpha)\,r_\mathrm{inner} + \alpha\,r_\mathrm{outer}(\beta), \\ y &= r\cos\eta, \quad z = r\sin\eta. \end{align}

The six block faces have the following geometry:

  • \(\xi = -1\) ( \(\alpha=0\)): the inner right cylinder at \(r = r_\mathrm{inner}\), extending in \(x\) from \(x^\mathrm{inner}_\mathrm{lower}\) to \(x^\mathrm{inner}_\mathrm{upper}\).
  • \(\xi = +1\) ( \(\alpha=1\)): a portion of the sphere \(r^2 + x^2 = r_\mathrm{sphere}^2\).
  • \(\zeta = \pm 1\): generically curved surfaces in Cartesian coordinates (ruled surfaces that blend linearly in \((x,r)\) between the inner cylinder edge and the outer sphere edge at the corresponding axial end).
  • \(\eta\) direction: periodic (connected by the cylindrical_shell topology).

Requirements

  • \(x^\mathrm{inner}_\mathrm{lower} < x^\mathrm{inner}_\mathrm{upper}\)
  • \(x^\mathrm{outer}_\mathrm{lower} < x^\mathrm{outer}_\mathrm{upper}\)
  • \(r_\mathrm{inner} > 0\)
  • \(|x^\mathrm{outer}_\mathrm{lower}|, |x^\mathrm{outer}_\mathrm{upper}| < r_\mathrm{sphere}\)
  • \(r_\mathrm{inner} < r_\mathrm{outer}(\beta)\) for all \(\beta \in [0,1]\) (equivalently, \(r_\mathrm{inner} < \min(r_\mathrm{outer}(0), r_\mathrm{outer}(1))\)).

Constructor & Destructor Documentation

◆ CylindricalSphericalShell()

domain::CoordinateMaps::CylindricalSphericalShell::CylindricalSphericalShell ( double x_inner_lower,
double x_inner_upper,
double x_outer_lower,
double x_outer_upper,
double r_inner,
double r_sphere )

Construct the map.

Parameters
x_inner_lowerAxial coordinate \(x\) at the lower end of the inner cylinder ( \(\xi=-1, \zeta=-1\)).
x_inner_upperAxial coordinate \(x\) at the upper end of the inner cylinder ( \(\xi=-1, \zeta=+1\)).
x_outer_lowerAxial coordinate \(x\) at the lower end of the outer spherical face ( \(\xi=+1, \zeta=-1\)).
x_outer_upperAxial coordinate \(x\) at the upper end of the outer spherical face ( \(\xi=+1, \zeta=+1\)).
r_innerRadius of the inner right cylinder.
r_sphereRadius of the outer bounding sphere (centered at the origin).

The documentation for this class was generated from the following file:
  • src/Domain/CoordinateMaps/CylindricalSphericalShell.hpp