Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Cce::Solutions::SphericalMetricData Struct Referenceabstract

Abstract base class for analytic worldtube data most easily derived in spherical coordinate form. More...

#include <SphericalMetricData.hpp>

Public Member Functions

 WRAPPED_PUPable_abstract (SphericalMetricData)
 
 SphericalMetricData (const double extraction_radius) noexcept
 
void jacobian (gsl::not_null< SphericaliCartesianJ * > jacobian, size_t l_max) const noexcept
 
void inverse_jacobian (gsl::not_null< CartesianiSphericalJ * > inverse_jacobian, size_t l_max) const noexcept
 
void dr_inverse_jacobian (gsl::not_null< CartesianiSphericalJ * > dr_inverse_jacobian, size_t l_max) const noexcept
 
void pup (PUP::er &p) noexcept override
 
- Public Member Functions inherited from Cce::Solutions::WorldtubeData
 WRAPPED_PUPable_abstract (WorldtubeData)
 
 WorldtubeData (const double extraction_radius) noexcept
 
virtual std::unique_ptr< WorldtubeDataget_clone () const noexcept=0
 
template<typename... Tags>
tuples::TaggedTuple< Tags... > variables (const size_t output_l_max, const double time, tmpl::list< Tags... >) const noexcept
 Retrieve worldtube data represented by the analytic solution, at boundary angular resolution l_max and time time More...
 
void pup (PUP::er &p) noexcept override
 

Static Public Member Functions

static void dr_jacobian (gsl::not_null< SphericaliCartesianJ * > dr_jacobian, size_t l_max) noexcept
 

Protected Member Functions

void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > spacetime_metric, size_t l_max, double time, tmpl::type_< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>) const noexcept override
 Computes the Cartesian spacetime metric from the spherical solution provided by the derived classes. More...
 
void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > dt_spacetime_metric, size_t l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept override
 Computes the time derivative of the Cartesian spacetime metric from the spherical solution provided by the derived classes. More...
 
void variables_impl (gsl::not_null< tnsr::iaa< DataVector, 3 > * > d_spacetime_metric, size_t l_max, double time, tmpl::type_< GeneralizedHarmonic::Tags::Phi< 3, ::Frame::Inertial >>) const noexcept override
 Computes the spatial derivatives of the Cartesian spacetime metric from the spherical solution provided by the derived classes. More...
 
virtual void spherical_metric (gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > spherical_metric, size_t l_max, double time) const noexcept=0
 Must be overriden in the derived class; should compute the spacetime metric of the analytic solution in spherical coordinates.
 
virtual void dr_spherical_metric (gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > dr_spherical_metric, size_t l_max, double time) const noexcept=0
 Must be overriden in the derived class; should compute the first radial derivative of the spacetime metric of the analytic solution in spherical coordinates.
 
virtual void dt_spherical_metric (gsl::not_null< tnsr::aa< DataVector, 3, ::Frame::Spherical<::Frame::Inertial >> * > dt_spherical_metric, size_t l_max, double time) const noexcept=0
 Must be overriden in the derived class; should compute the first time derivative of the spacetime metric of the analytic solution in spherical coordinates.
 
virtual void variables_impl (gsl::not_null< tnsr::i< DataVector, 3 > * > cartesian_coordinates, size_t output_l_max, double time, tmpl::type_< Tags::CauchyCartesianCoords >) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::i< DataVector, 3 > * > dr_cartesian_coordinates, size_t output_l_max, double time, tmpl::type_< Tags::Dr< Tags::CauchyCartesianCoords >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > spacetime_metric, size_t output_l_max, double time, tmpl::type_< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>) const noexcept=0
 
virtual void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > dt_spacetime_metric, size_t output_l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept=0
 
virtual void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > pi, size_t output_l_max, double time, tmpl::type_< GeneralizedHarmonic::Tags::Pi< 3, ::Frame::Inertial >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::iaa< DataVector, 3 > * > d_spacetime_metric, size_t output_l_max, double time, tmpl::type_< GeneralizedHarmonic::Tags::Phi< 3, ::Frame::Inertial >>) const noexcept=0
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > spatial_metric, size_t output_l_max, double time, tmpl::type_< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > dt_spatial_metric, size_t output_l_max, double time, tmpl::type_< ::Tags::dt< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > dr_spatial_metric, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > shift, size_t output_l_max, double time, tmpl::type_< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > dt_shift, size_t output_l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > dr_shift, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > lapse, size_t output_l_max, double time, tmpl::type_< gr::Tags::Lapse< DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > dt_lapse, size_t output_l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::Lapse< DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > dr_lapse, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::Lapse< DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< SpinWeighted< ComplexDataVector, -2 >> * > news, size_t output_l_max, double time, tmpl::type_< Tags::News >) const noexcept=0
 
- Protected Member Functions inherited from Cce::Solutions::WorldtubeData
template<typename Tag >
const auto & cache_or_compute (const size_t output_l_max, const double time) const noexcept
 
virtual void prepare_solution (size_t output_l_max, double time) const noexcept=0
 
virtual void variables_impl (gsl::not_null< tnsr::i< DataVector, 3 > * > cartesian_coordinates, size_t output_l_max, double time, tmpl::type_< Tags::CauchyCartesianCoords >) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::i< DataVector, 3 > * > dr_cartesian_coordinates, size_t output_l_max, double time, tmpl::type_< Tags::Dr< Tags::CauchyCartesianCoords >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > pi, size_t output_l_max, double time, tmpl::type_< GeneralizedHarmonic::Tags::Pi< 3, ::Frame::Inertial >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > spatial_metric, size_t output_l_max, double time, tmpl::type_< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > dt_spatial_metric, size_t output_l_max, double time, tmpl::type_< ::Tags::dt< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::ii< DataVector, 3 > * > dr_spatial_metric, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > shift, size_t output_l_max, double time, tmpl::type_< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > dt_shift, size_t output_l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > dr_shift, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > lapse, size_t output_l_max, double time, tmpl::type_< gr::Tags::Lapse< DataVector >>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > dt_lapse, size_t output_l_max, double time, tmpl::type_<::Tags::dt< gr::Tags::Lapse< DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > dr_lapse, size_t output_l_max, double time, tmpl::type_< Tags::Dr< gr::Tags::Lapse< DataVector >>>) const noexcept
 
virtual void variables_impl (gsl::not_null< Scalar< SpinWeighted< ComplexDataVector, -2 >> * > news, size_t output_l_max, double time, tmpl::type_< Tags::News >) const noexcept=0
 

Additional Inherited Members

- Public Types inherited from Cce::Solutions::WorldtubeData
using creatable_classes = tmpl::list< BouncingBlackHole, LinearizedBondiSachs >
 
using tags = tmpl::list< Tags::CauchyCartesianCoords, Tags::Dr< Tags::CauchyCartesianCoords >, gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >, ::Tags::dt< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector > >, GeneralizedHarmonic::Tags::Pi< 3, ::Frame::Inertial >, GeneralizedHarmonic::Tags::Phi< 3, ::Frame::Inertial >, gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >, ::Tags::dt< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector > >, Tags::Dr< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector > >, gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >, ::Tags::dt< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector > >, Tags::Dr< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector > >, gr::Tags::Lapse< DataVector >, ::Tags::dt< gr::Tags::Lapse< DataVector > >, Tags::Dr< gr::Tags::Lapse< DataVector > >, Tags::News >
 The set of available tags provided by the analytic solution.
 
- Protected Types inherited from Cce::Solutions::WorldtubeData
using IntermediateCacheTuple = tuples::tagged_tuple_from_typelist< tmpl::transform< tmpl::list< Tags::CauchyCartesianCoords, Tags::Dr< Tags::CauchyCartesianCoords >, gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >, GeneralizedHarmonic::Tags::Pi< 3, ::Frame::Inertial >, GeneralizedHarmonic::Tags::Phi< 3, ::Frame::Inertial >, gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector >, gr::Tags::Shift< 3, ::Frame::Inertial, DataVector >, gr::Tags::Lapse< DataVector >, ::Tags::dt< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector > >, ::Tags::dt< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector > >, ::Tags::dt< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector > >, ::Tags::dt< gr::Tags::Lapse< DataVector > >, Tags::Dr< gr::Tags::SpatialMetric< 3, ::Frame::Inertial, DataVector > >, Tags::Dr< gr::Tags::Shift< 3, ::Frame::Inertial, DataVector > >, Tags::Dr< gr::Tags::Lapse< DataVector > >, Tags::News >, tmpl::bind< IntermediateCacheTag, tmpl::_1 > >>
 
- Protected Attributes inherited from Cce::Solutions::WorldtubeData
IntermediateCacheTuple intermediate_cache_
 
double extraction_radius_ = std::numeric_limits<double>::quiet_NaN()
 

Detailed Description

Abstract base class for analytic worldtube data most easily derived in spherical coordinate form.

Details

This class provides the functions required by the WorldtubeData interface that convert from a spherical coordinate spacetime metric to Cartesian coordinates. Derived classes of SphericalMetricData need not implement the variables_impls for the Cartesian quantities. Instead, the derived classes must override the protected functions:

Derived classes are still responsible for overriding WorldtubeData::get_clone(), WorldtubeData::variables_impl() for tag Cce::Tags::News, and WorldtubeData::prepare_solution().

Member Function Documentation

◆ dr_inverse_jacobian()

void Cce::Solutions::SphericalMetricData::dr_inverse_jacobian ( gsl::not_null< CartesianiSphericalJ * >  dr_inverse_jacobian,
size_t  l_max 
) const
noexcept

Computes the first radial derivative of the Jacobian: \(\partial_r (\partial x_{\mathrm{spherical}}^j / \partial x_{\mathrm{Cartesian}}^i)\)

Details

The first radial derivative of the Jacobian (with \( \sin \theta \) scaled out of \(\phi\) components) in question is

\begin{align*} \frac{\partial}{\partial r} \frac{\partial x_{\mathrm{spherical}}^j}{\partial x_{\mathrm{Cartesian}}^i} = \left[ \begin{array}{ccc} \frac{\partial}{\partial r} \frac{\partial r}{\partial x} & \frac{\partial}{\partial r} \frac{\partial \theta}{\partial x} & \frac{\partial}{\partial r} \frac{\sin \theta \partial \phi}{\partial x} \\ \frac{\partial}{\partial r} \frac{\partial r}{\partial y} & \frac{\partial}{\partial r} \frac{\partial \theta}{\partial y} & \frac{\partial}{\partial r} \frac{\sin \theta \partial \phi}{\partial y} \\ \frac{\partial}{\partial r} \frac{\partial r}{\partial z} & \frac{\partial}{\partial r} \frac{\partial \theta}{\partial z} & \frac{\partial}{\partial r} \frac{\sin \theta \partial \phi}{\partial z} \end{array} \right] = \left[ \begin{array}{ccc} 0 & - \frac{\cos \phi \cos \theta}{r^2} & \frac{\sin \phi}{r^2} \\ 0 & - \frac{\cos \theta \sin \phi}{r^2} & -\frac{\cos \phi}{r^2} \\ 0 & \frac{\sin \theta}{r^2} & 0 \end{array} \right] \end{align*}

◆ dr_jacobian()

static void Cce::Solutions::SphericalMetricData::dr_jacobian ( gsl::not_null< SphericaliCartesianJ * >  dr_jacobian,
size_t  l_max 
)
staticnoexcept

Computes the first radial derivative of the Jacobian: \(\partial_r (\partial x_{\mathrm{Cartesian}}^j / \partial x_{\mathrm{Spherical}}^i)\)

Details

The radial derivative of the Jacobian (with \( \sin \theta \) scaled out of \(\phi\) components) in question is

\begin{align*} \frac{\partial}{\partial r} \frac{\partial x_{\mathrm{Cartesian}}^j}{\partial x_{\mathrm{spherical}}^i} = \left[ \begin{array}{ccc} \frac{\partial^2 x}{(\partial r)^2} & \frac{\partial^2 y}{(\partial r)^2} & \frac{\partial^2 z}{(\partial r)^2} \\ \frac{\partial^2 x}{\partial r \partial \theta} & \frac{\partial^2 y}{\partial r \partial \theta} & \frac{\partial^2 z}{\partial r \partial \theta} \\ \frac{\partial^2 x}{\sin \theta \partial r \partial \phi} & \frac{\partial^2 y}{\sin \theta \partial r \partial \phi} & \frac{\partial^2 y}{\sin \theta \partial r \partial \phi} \end{array} \right] = \left[ \begin{array}{ccc} 0 & 0 & 0 \\ \cos \theta \cos \phi & \cos \theta \sin \phi & - \sin \theta \\ - \sin \phi & \cos \phi & 0 \end{array} \right] \end{align*}

◆ inverse_jacobian()

void Cce::Solutions::SphericalMetricData::inverse_jacobian ( gsl::not_null< CartesianiSphericalJ * >  inverse_jacobian,
size_t  l_max 
) const
noexcept

Computes the Jacobian \(\partial x_{\mathrm{spherical}}^j / \partial x_{\mathrm{Cartesian}}^i\)

Details

The Jacobian (with \( \sin \theta \) scaled out of \(\phi\) components) in question is

\begin{align*} \frac{\partial x_{\mathrm{spherical}}^j}{\partial x_{\mathrm{Cartesian}}^i} = \left[ \begin{array}{ccc} \frac{\partial r}{\partial x} & \frac{\partial \theta}{\partial x} & \frac{\sin \theta \partial \phi}{\partial x} \\ \frac{\partial r}{\partial y} & \frac{\partial \theta}{\partial y} & \frac{\sin \theta \partial \phi}{\partial y} \\ \frac{\partial r}{\partial z} & \frac{\partial \theta}{\partial z} & \frac{\sin \theta \partial \phi}{\partial z} \end{array} \right] = \left[ \begin{array}{ccc} \cos \phi \sin \theta & \frac{\cos \phi \cos \theta}{r} & - \frac{\sin \phi}{r} \\ \sin \phi \sin \theta & \frac{\cos \theta \sin \phi}{r} & \frac{\cos \phi}{r} \\ \cos \theta & -\frac{\sin \theta}{r} & 0 \end{array} \right] \end{align*}

◆ jacobian()

void Cce::Solutions::SphericalMetricData::jacobian ( gsl::not_null< SphericaliCartesianJ * >  jacobian,
size_t  l_max 
) const
noexcept

Computes the Jacobian \(\partial x_{\mathrm{Cartesian}}^j / \partial x_{\mathrm{spherical}}^i\)

Details

The Jacobian (with \( \sin \theta \) scaled out of \(\phi\) components) in question is

\begin{align*} \frac{\partial x_{\mathrm{Cartesian}}^j}{\partial x_{\mathrm{spherical}}^i} = \left[ \begin{array}{ccc} \frac{\partial x}{\partial r} & \frac{\partial y}{\partial r} & \frac{\partial z}{\partial r} \\ \frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta} & \frac{\partial z}{\partial \theta} \\ \frac{\partial x}{\sin \theta \partial \phi} & \frac{\partial y}{\sin \theta \partial \phi} & \frac{\partial y}{\sin \theta \partial \phi} \end{array} \right] = \left[ \begin{array}{ccc} \sin \theta \cos \phi & \sin \theta \sin \phi & \cos \theta \\ r \cos \theta \cos \phi & r \cos \theta \sin \phi & -r \sin \theta \\ -r \sin \phi & r \cos \phi & 0 \end{array} \right] \end{align*}

◆ variables_impl() [1/3]

void Cce::Solutions::SphericalMetricData::variables_impl ( gsl::not_null< tnsr::aa< DataVector, 3 > * >  dt_spacetime_metric,
size_t  l_max,
double  time,
tmpl::type_<::Tags::dt< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>>   
) const
overrideprotectedvirtualnoexcept

Computes the time derivative of the Cartesian spacetime metric from the spherical solution provided by the derived classes.

Details

The derived classes provide the time derivative of the spherical metric data via the virtual function SphericalMetricData::dt_spherical_metric() at a resolution determined by the l_max argument. This function performs the coordinate transformation using the Jacobian computed from SphericalMetricData::inverse_jacobian().

Implements Cce::Solutions::WorldtubeData.

◆ variables_impl() [2/3]

void Cce::Solutions::SphericalMetricData::variables_impl ( gsl::not_null< tnsr::aa< DataVector, 3 > * >  spacetime_metric,
size_t  l_max,
double  time,
tmpl::type_< gr::Tags::SpacetimeMetric< 3, ::Frame::Inertial, DataVector >>   
) const
overrideprotectedvirtualnoexcept

Computes the Cartesian spacetime metric from the spherical solution provided by the derived classes.

Details

The derived classes provide spherical metric data via the virtual function SphericalMetricData::spherical_metric() at a resolution determined by the l_max argument. This function performs the coordinate transformation using the Jacobian computed from SphericalMetricData::inverse_jacobian().

Implements Cce::Solutions::WorldtubeData.

◆ variables_impl() [3/3]

void Cce::Solutions::SphericalMetricData::variables_impl ( gsl::not_null< tnsr::iaa< DataVector, 3 > * >  d_spacetime_metric,
size_t  l_max,
double  time,
tmpl::type_< GeneralizedHarmonic::Tags::Phi< 3, ::Frame::Inertial >>   
) const
overrideprotectedvirtualnoexcept

Computes the spatial derivatives of the Cartesian spacetime metric from the spherical solution provided by the derived classes.

Details

The derived classes provide the radial derivative of the spherical metric data via the virtual function SphericalMetricData::dr_spherical_metric() at a resolution determined by the l_max_ argument. This function performs the additional angular derivatives necessary to assemble the full spatial derivative and performs the coordinate transformation to Cartesian coordinates via the Jacobians computed in SphericalMetricData::inverse_jacobian() and SphericalMetricData::inverse_jacobian().

Implements Cce::Solutions::WorldtubeData.


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