SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
domain::CoordinateMaps::FocallyLiftedInnerMaps::FlatEndcap Class Reference

A FocallyLiftedInnerMap that maps a 3D unit right cylinder to a volume that connects a portion of a plane and a spherical surface. More...

#include <FocallyLiftedFlatEndcap.hpp>

Public Member Functions

 FlatEndcap (const std::array< double, 3 > &center, double radius)
 
 FlatEndcap (FlatEndcap &&)=default
 
 FlatEndcap (const FlatEndcap &)=default
 
FlatEndcapoperator= (const FlatEndcap &)=default
 
FlatEndcapoperator= (FlatEndcap &&)=default
 
template<typename T >
void forward_map (const gsl::not_null< std::array< tt::remove_cvref_wrap_t< T >, 3 > * > target_coords, const std::array< T, 3 > &source_coords) const
 
std::optional< std::array< double, 3 > > inverse (const std::array< double, 3 > &target_coords, double sigma_in) const
 
template<typename T >
void jacobian (const gsl::not_null< tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrame > * > jacobian_out, const std::array< T, 3 > &source_coords) const
 
template<typename T >
void inv_jacobian (const gsl::not_null< tnsr::Ij< tt::remove_cvref_wrap_t< T >, 3, Frame::NoFrame > * > inv_jacobian_out, const std::array< T, 3 > &source_coords) const
 
template<typename T >
void sigma (const gsl::not_null< tt::remove_cvref_wrap_t< T > * > sigma_out, const std::array< T, 3 > &source_coords) const
 
template<typename T >
void deriv_sigma (const gsl::not_null< std::array< tt::remove_cvref_wrap_t< T >, 3 > * > deriv_sigma_out, const std::array< T, 3 > &source_coords) const
 
template<typename T >
void dxbar_dsigma (const gsl::not_null< std::array< tt::remove_cvref_wrap_t< T >, 3 > * > dxbar_dsigma_out, const std::array< T, 3 > &source_coords) const
 
std::optional< double > lambda_tilde (const std::array< double, 3 > &parent_mapped_target_coords, const std::array< double, 3 > &projection_point, bool source_is_between_focus_and_target) const
 
template<typename T >
void deriv_lambda_tilde (const gsl::not_null< std::array< tt::remove_cvref_wrap_t< T >, 3 > * > deriv_lambda_tilde_out, const std::array< T, 3 > &target_coords, const T &lambda_tilde, const std::array< double, 3 > &projection_point) const
 
void pup (PUP::er &p)
 

Static Public Member Functions

static bool is_identity ()
 

Friends

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

Detailed Description

A FocallyLiftedInnerMap that maps a 3D unit right cylinder to a volume that connects a portion of a plane and a spherical surface.

Details

The domain of the map is a 3D unit right cylinder with coordinates (x¯,y¯,z¯) such that 1z¯1 and x¯2+y¯21. The range of the map has coordinates (x,y,z).

Consider a 2D circle in 3D space that is normal to the z axis and has (3D) center Ci and radius R. FlatEndcap provides the following functions:

forward_map()

forward_map() maps (x¯,y¯,z¯=1) to the interior of the circle. The arguments to forward_map() are (x¯,y¯,z¯), but z¯ is ignored. forward_map() returns x0i, the 3D coordinates on the circle, which are given by

(1)x00=Rx¯+C0,(2)x01=Ry¯+C1,(3)x02=C2.

sigma

σ is a function that is zero on the plane xi=x0i and unity at z¯=+1 (corresponding to the upper surface of the FocallyLiftedMap). We define

(4)σ=z¯+12.

deriv_sigma

deriv_sigma returns

(5)σx¯j=(0,0,1/2).

jacobian

jacobian returns x0k/x¯j. The arguments to jacobian are (x¯,y¯,z¯), but z¯ is ignored.

Differentiating Eqs.(1–3) above yields

x00x¯=R,x01y¯=R,

and all other components are zero.

inverse

inverse takes x0i and σ as arguments, and returns (x¯,y¯,z¯), or a default-constructed std::optional<std::array<double, 3>> if x0i or σ are outside the range of the map. The formula for the inverse is straightforward:

(6)x¯=x00C0R,(7)y¯=x01C1R,(8)z¯=2σ1.

If z¯ is outside the range [1,1] or if x¯2+y¯2>1 then we return a default-constructed std::optional<std::array<double, 3>>

lambda_tilde

lambda_tilde takes as arguments a point xi and a projection point Pi, and computes λ~, the solution to

(9)x0i=Pi+(xiPi)λ~.

Since x0i must lie on the plane x03=C3,

(10)λ~=C3P3x3P3.

For FocallyLiftedInnerMaps::FlatEndcap, xi is always between Pi and x0i, so λ~1. Therefore a default-constructed std::optional<double> is returned if λ~ is less than unity (meaning that xi is outside the range of the map).

deriv_lambda_tilde

deriv_lambda_tilde takes as arguments x0i, a projection point Pi, and λ~, and returns λ~/xi. We have

(11)λ~x3=C3P3(x3P3)2=λ~2C3P3,

and other components are zero.

inv_jacobian

inv_jacobian returns x¯i/x0k, where σ is held fixed. The arguments to inv_jacobian are (x¯,y¯,z¯), but z¯ is ignored.

The nonzero components are

(12)x¯x00=1R,(13)y¯x01=1R.

dxbar_dsigma

dxbar_dsigma returns x¯i/σ, where x0i is held fixed.

From Eq. (6) we have

(14)x¯iσ=(0,0,2).


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