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

A FocallyLiftedInnerMap that maps a 3D unit right cylinder to a volume that connects a 2D annulus to a spherical surface. More...

#include <FocallyLiftedFlatSide.hpp>

Public Member Functions

 FlatSide (const std::array< double, 3 > &center, const double inner_radius, const double outer_radius)
 
 FlatSide (FlatSide &&)=default
 
 FlatSide (const FlatSide &)=default
 
FlatSideoperator= (const FlatSide &)=default
 
FlatSideoperator= (FlatSide &&)=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 FlatSide &lhs, const FlatSide &rhs)
 

Detailed Description

A FocallyLiftedInnerMap that maps a 3D unit right cylinder to a volume that connects a 2D annulus to 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 1x¯2+y¯24. The range of the map has coordinates (x,y,z).

Consider a 2D annulus in 3D space oriented normal to the z axis. The inner and outer radii of the annulus are Rin and Rout, and the (3D) center of the annulus is Ci. FlatSide provides the following functions:

forward_map()

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

(1)x00=(Rin+(RoutRin)(ρ¯1))x¯ρ¯+C0,(2)x01=(Rin+(RoutRin)(ρ¯1))y¯ρ¯+C1,(3)x02=C2,

where

(4)ρ¯=x¯2+y¯2.

sigma

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

(5)σ=z¯+12.

deriv_sigma

deriv_sigma returns

(6)σ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. ( 13) above yields

x00x¯=RoutRin+(2RinRout)y¯2ρ¯3,x00y¯=(2RinRout)x¯y¯ρ¯3,x01x¯=(2RinRout)x¯y¯ρ¯3,x01y¯=RoutRin+(2RinRout)x¯2ρ¯3,

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.

Let

(7)ρ=(x00C0)2+(x01C1)2.

Then

(8)x¯=x00C0ρρ+Rout2RinRoutRin,(9)y¯=x01C1ρρ+Rout2RinRoutRin,(10)z¯=2σ1.

Note that ρ in Eq. ( 7) can be written

(11)ρ=Rin+(RoutRin)(ρ¯1),

where ρ¯ is given by Eq. ( 4).

If z¯ is outside the range [1,1] or if x¯2+y¯2 is less than 1 or greater than 4 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

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

Since x0i must lie on the plane x03=C3,

(13)λ~=C3P3x3P3.

If λ~ is less than unity (indicating that the supplied point is outside the range of the map), then a default-constructed std::optional<double> is returned.

deriv_lambda_tilde

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

(14)λ~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

(15)x¯x00=1RoutRin+y¯2ρ¯2ρRout2RinRoutRin,(16)x¯x01=x¯y¯ρ¯2ρRout2RinRoutRin,(17)y¯x01=1RoutRin+x¯2ρ¯2ρRout2RinRoutRin,(18)y¯x00=x¯y¯ρ¯2ρRout2RinRoutRin,

where ρ is computed from Eq. ( 11).

dxbar_dsigma

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

From Eq. ( 6) we have

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


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