|
SpECTRE
v2026.06.30
|
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 > ¢er_one, const std::array< double, 3 > ¢er_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 | |
| CylindricalFlatEndcapInterior & | operator= (const CylindricalFlatEndcapInterior &)=default |
| CylindricalFlatEndcapInterior & | operator= (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::NoFrame > | jacobian (const std::array< T, 3 > &source_coords) const |
| template<typename T> | |
| tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrame > | inv_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) |
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.
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:
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:
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.
\[ C_2^z - 0.95\,R_2 \;\leq\; C_1^z \;\leq\; C_2^z - 0.05\,R_2. \]
\[ \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.| 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.
| center_one | Center of the flat disk ( \(C_1\)). |
| center_two | Center of the outer sphere ( \(C_2\)). |
| proj_center | Projection point \(P\). |
| z_sphere_extent | z-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_two | Radius of the outer sphere \(R_2\). |