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

Map from a 3D unit right cylinder to a volume that connects a flat circular disk (lying inside a sphere) to the far wall of that sphere. More...

#include <CylindricalFlatEndcapInterior.hpp>

Public Member Functions

 CylindricalFlatEndcapInterior (const std::array< double, 3 > &center_one, const std::array< double, 3 > &center_two, const std::array< double, 3 > &proj_center, double z_sphere_extent, double radius_two)
 Construct the map.
 CylindricalFlatEndcapInterior (CylindricalFlatEndcapInterior &&)=default
 CylindricalFlatEndcapInterior (const CylindricalFlatEndcapInterior &)=default
CylindricalFlatEndcapInterioroperator= (const CylindricalFlatEndcapInterior &)=default
CylindricalFlatEndcapInterioroperator= (CylindricalFlatEndcapInterior &&)=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 CylindricalFlatEndcapInterior &lhs, const CylindricalFlatEndcapInterior &rhs)

Detailed Description

Map from a 3D unit right cylinder to a volume that connects a flat circular disk (lying inside a sphere) to the far wall of that sphere.

Details

This is the "interior" counterpart to CylindricalFlatEndcap. The two maps are identical in structure — both use FocallyLiftedMap with FocallyLiftedInnerMaps::FlatEndcap — but differ in which intersection of the projecting ray with the sphere is chosen:

  • CylindricalFlatEndcap: the flat disk lies outside the sphere (the sphere is between \(P\) and the flat disk), so source_is_between_focus_and_target = false.
  • CylindricalFlatEndcapInterior: the flat disk lies inside the sphere (the flat disk is between \(P\) and the sphere's far wall), so source_is_between_focus_and_target = true.

Consider a 2D circle in 3D space normal to the \(z\) axis with (3D) center \(C_1\), a sphere with center \(C_2\) and radius \(R_2\), and a projection point \(P\).

The parameter \(z_\mathrm{extent}\) specifies the \(z\)-coordinate (in the map's frame) of the rim circle where the spherical face of the block meets the adjacent hollow-cylinder block. This single number determines the radius \(R_1\) of the flat disk:

\begin{align} t &= \frac{z_\mathrm{extent} - P_z}{C_1^z - P_z}, \\ r_\mathrm{rim} &= \sqrt{R_2^2 - (z_\mathrm{extent} - C_2^z)^2}, \\ R_1 &= \frac{r_\mathrm{rim}}{t}. \end{align}

CylindricalFlatEndcapInterior maps a 3D unit right cylinder \((\bar{x},\bar{y},\bar{z})\) with \(-1\leq\bar{z}\leq 1\) and \(\bar{x}^2+\bar{y}^2\leq 1\) so that:

  • \(\bar{z}=+1\) maps to the interior of the disk of radius \(R_1\) centred at \(C_1\).
  • \(\bar{z}=-1\) maps to the portion of the sphere on the far side of the flat disk from \(P\).
  • Curves of constant \((\bar{x},\bar{y})\) are portions of lines passing through \(P\).
  • The rim of the disk ( \(\bar{x}^2+\bar{y}^2=1\) on \(\bar{z}=-1\)) maps to the circle at \(z = z_\mathrm{extent}\) on the sphere.

Note that the \(\bar{z}\) orientation is the opposite of CylindricalFlatEndcap: here \(\bar{z}=+1\) is the flat disk and \(\bar{z}=-1\) is the sphere. This reversal is necessary to keep the Jacobian determinant positive, because the flat disk sits at a larger physical \(z\) than the far sphere wall.

CylindricalFlatEndcapInterior is intended for the Pill domain, where the filled-cylinder endcap blocks have their flat face ( \(\bar{z}=+1\)) at the end of the inner cubed-cylinder region (inside the outer domain sphere) and their spherical face ( \(\bar{z}=-1\)) on the outer domain sphere.

Requirements on map parameters

  • \(P\) is sufficiently inside the sphere: \(|P - C_2| \leq 0.95\,R_2\).
  • The flat disk lies inside the sphere, at least 5 % of \(R_2\) below \(C_2^z\) and at most 95 % of \(R_2\) below \(C_2^z\):

    \[ C_2^z - 0.95\,R_2 \;\leq\; C_1^z \;\leq\; C_2^z - 0.05\,R_2. \]

  • The flat disk is below the projection point: \(C_1^z < P^z\).
  • \(z_\mathrm{extent}\) lies strictly on the sphere: \(|z_\mathrm{extent} - C_2^z| < R_2\).
  • The focal parameter satisfies \(t > 1\) (the sphere is beyond the disk from \(P\)).
  • The ratio \(R_1/R_2\) is between 1/10 and 10.
  • The entire flat disk rim lies strictly inside the sphere:

    \[ \sqrt{\bigl(\sqrt{(C_1^x-C_2^x)^2+(C_1^y-C_2^y)^2}+R_1\bigr)^2 +(C_1^z-C_2^z)^2} < R_2. \]

    This is required for the inverse to be defined everywhere: if any rim point were outside the sphere, the corresponding ray from \(P\) would hit the sphere before reaching the disk ( \(t_\mathrm{sphere}<1\)), violating the source_is_between_focus_and_target assumption.

Constructor & Destructor Documentation

◆ CylindricalFlatEndcapInterior()

domain::CoordinateMaps::CylindricalFlatEndcapInterior::CylindricalFlatEndcapInterior ( const std::array< double, 3 > & center_one,
const std::array< double, 3 > & center_two,
const std::array< double, 3 > & proj_center,
double z_sphere_extent,
double radius_two )

Construct the map.

Parameters
center_oneCenter of the flat disk ( \(C_1\)).
center_twoCenter of the outer sphere ( \(C_2\)).
proj_centerProjection point \(P\).
z_sphere_extentz-coordinate of the rim circle where the spherical face meets the adjacent hollow-cylinder block. This determines the flat disk radius \(R_1\) via the focal projection.
radius_twoRadius of the outer sphere \(R_2\).

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