SpECTRE
v2024.12.16
|
Map from 3D unit right cylinder to a 3D volume that connects a portion of a spherical surface with a disk. More...
#include <UniformCylindricalFlatEndcap.hpp>
Public Member Functions | |
UniformCylindricalFlatEndcap (const std::array< double, 3 > ¢er_one, const std::array< double, 3 > ¢er_two, double radius_one, double radius_two, double z_plane_one) | |
UniformCylindricalFlatEndcap (UniformCylindricalFlatEndcap &&)=default | |
UniformCylindricalFlatEndcap (const UniformCylindricalFlatEndcap &)=default | |
UniformCylindricalFlatEndcap & | operator= (const UniformCylindricalFlatEndcap &)=default |
UniformCylindricalFlatEndcap & | operator= (UniformCylindricalFlatEndcap &&)=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 |
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 >, 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 |
Friends | |
bool | operator== (const UniformCylindricalFlatEndcap &lhs, const UniformCylindricalFlatEndcap &rhs) |
Map from 3D unit right cylinder to a 3D volume that connects a portion of a spherical surface with a disk.
Consider a sphere with center
UniformCylindricalFlatEndcap maps a 3D unit right cylinder (with coordinates
UniformCylindricalFlatEndcap is intended to be composed with Wedge<2>
maps to construct a portion of a cylindrical domain for a binary system.
UniformCylindricalFlatEndcap can be used to construct a domain that is similar to, but not identical to, the one described briefly in the Appendix of [32]. UniformCylindricalFlatEndcap is used to construct the Blocks analogous to those labeled 'MA wedge' and 'MB wedge' in Figure 20 of that paper.
UniformCylindricalFlatEndcap provides the following functions:
operator()
maps
Here
where
and
where
Given
Then by eliminating
Here
We solve
Once we have determined
Then
We solve
Note that the root we care about must have
so we look for a root only between
Sometimes a root is within roundoff of
where
Note that by differentiating Eqs. (
where
For some points on the boundary of the mapped domain, the root will be within roundoff of
These cases are detected by comparing terms in the first-order power series of
It is expected that inverse()
will often be passed points inverse()
returns a std::nullopt
. To avoid the difficulty and expense of attempting to solve
Any point in the range of the map must be below the disk and it must be outside or on sphere 1, so the inverse map can immediately return a std::nullopt
for a point that does not satisfy these conditions.
Likewise, the inverse map can immediately reject any point with
Finally, consider the circle
where
Given an arbitrary point
Then the condition for the point to be inside or on the cone is
The inverse map can therefore reject any points that do not satisfy this criterion.
One can rewrite Eqs.(
where we have used Eq. (
Note that
Then differentiating Eqs. (
where
Differentiating Eq. (
Differentiating Eqs. (
The inverse Jacobian is computed by numerically inverting the Jacobian.
We demand that
We also demand that the z plane in the above figure lies above the center of the sphere and is not too close to the center or edge of the sphere; specifically, we demand that
Here 0.075 and 0.35 are safety factors. These restrictions are not strictly necessary but are made for simplicity and to ensure the accuracy of the inverse map (the inverse map becomes less accurate if the map parameters are extreme).
Consider the line segment
where 1.1 is a safety factor.
The condition on