SpECTRE  v2024.09.29
Cce::Solutions::WorldtubeData Struct Referenceabstract

Abstract base class for analytic worldtube data for verifying the CCE system. More...

#include <WorldtubeData.hpp>

Classes

struct  IntermediateCache
 
struct  IntermediateCacheTag
 

Public Types

using creatable_classes = tmpl::list< BouncingBlackHole, GaugeWave, LinearizedBondiSachs, RobinsonTrautman, RotatingSchwarzschild, TeukolskyWave >
 
using tags = tmpl::list< Tags::CauchyCartesianCoords, Tags::Dr< Tags::CauchyCartesianCoords >, gr::Tags::SpacetimeMetric< DataVector, 3 >, ::Tags::dt< gr::Tags::SpacetimeMetric< DataVector, 3 > >, gh::Tags::Pi< DataVector, 3 >, gh::Tags::Phi< DataVector, 3 >, gr::Tags::SpatialMetric< DataVector, 3 >, ::Tags::dt< gr::Tags::SpatialMetric< DataVector, 3 > >, Tags::Dr< gr::Tags::SpatialMetric< DataVector, 3 > >, gr::Tags::Shift< DataVector, 3 >, ::Tags::dt< gr::Tags::Shift< DataVector, 3 > >, Tags::Dr< gr::Tags::Shift< DataVector, 3 > >, 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.
 

Public Member Functions

 WRAPPED_PUPable_abstract (WorldtubeData)
 
 WorldtubeData (const double extraction_radius)
 
 WorldtubeData (CkMigrateMessage *msg)
 
virtual std::unique_ptr< WorldtubeDataget_clone () const =0
 
template<typename... Tags>
tuples::TaggedTuple< Tags... > variables (const size_t output_l_max, const double time, tmpl::list< Tags... >) const
 Retrieve worldtube data represented by the analytic solution, at boundary angular resolution l_max and time time More...
 
void pup (PUP::er &p) override
 
virtual std::unique_ptr< Cce::InitializeJ::InitializeJ< false > > get_initialize_j (const double) const
 
virtual bool use_noninertial_news () const
 

Protected Types

using IntermediateCacheTuple = tuples::tagged_tuple_from_typelist< tmpl::transform< tmpl::list< Tags::CauchyCartesianCoords, Tags::Dr< Tags::CauchyCartesianCoords >, gr::Tags::SpacetimeMetric< DataVector, 3 >, gh::Tags::Pi< DataVector, 3 >, gh::Tags::Phi< DataVector, 3 >, gr::Tags::SpatialMetric< DataVector, 3 >, gr::Tags::Shift< DataVector, 3 >, gr::Tags::Lapse< DataVector >, ::Tags::dt< gr::Tags::SpacetimeMetric< DataVector, 3 > >, ::Tags::dt< gr::Tags::SpatialMetric< DataVector, 3 > >, ::Tags::dt< gr::Tags::Shift< DataVector, 3 > >, ::Tags::dt< gr::Tags::Lapse< DataVector > >, Tags::Dr< gr::Tags::SpatialMetric< DataVector, 3 > >, Tags::Dr< gr::Tags::Shift< DataVector, 3 > >, Tags::Dr< gr::Tags::Lapse< DataVector > >, Tags::News >, tmpl::bind< IntermediateCacheTag, tmpl::_1 > > >
 

Protected Member Functions

template<typename Tag >
const auto & cache_or_compute (const size_t output_l_max, const double time) const
 
virtual void prepare_solution (size_t output_l_max, double time) const =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
 
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
 
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< DataVector, 3 > >) const =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< DataVector, 3 > > >) const =0
 
virtual void variables_impl (gsl::not_null< tnsr::aa< DataVector, 3 > * > pi, size_t output_l_max, double time, tmpl::type_< gh::Tags::Pi< DataVector, 3 > >) const
 
virtual void variables_impl (gsl::not_null< tnsr::iaa< DataVector, 3 > * > d_spacetime_metric, size_t output_l_max, double time, tmpl::type_< gh::Tags::Phi< DataVector, 3 > >) const =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< DataVector, 3 > >) const
 
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< DataVector, 3 > > >) const
 
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< DataVector, 3 > > >) const
 
virtual void variables_impl (gsl::not_null< tnsr::I< DataVector, 3 > * > shift, size_t output_l_max, double time, tmpl::type_< gr::Tags::Shift< DataVector, 3 > >) const
 
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< DataVector, 3 > > >) const
 
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< DataVector, 3 > > >) const
 
virtual void variables_impl (gsl::not_null< Scalar< DataVector > * > lapse, size_t output_l_max, double time, tmpl::type_< gr::Tags::Lapse< DataVector > >) const
 
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
 
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
 
virtual void variables_impl (gsl::not_null< Scalar< SpinWeighted< ComplexDataVector, -2 > > * > news, size_t output_l_max, double time, tmpl::type_< Tags::News >) const =0
 

Protected Attributes

IntermediateCacheTuple intermediate_cache_
 
double extraction_radius_ = std::numeric_limits<double>::quiet_NaN()
 

Detailed Description

Abstract base class for analytic worldtube data for verifying the CCE system.

Details

All of the boundary data quantities are provided by the WorldtubeData::variables() function.

This class provides caching and conversion between different representations of the metric data needed for the worldtube computation and evolution. The set of pure virtual functions (required to be overriden in the derived classes) is:

  • WorldtubeData::get_clone(): should return a std::unique_ptr<WorldtubeData> with cloned state
  • WorldtubeData::variables_impl() (a protected function): should compute and return by not_null pointer the spacetime metric quantity requested in the final (metavariable) tag argument. The function overloads that are required to be overriden in the derived class are gr::Tags::SpacetimeMetric<DataVector, 3>, Tags::dt<gr::Tags::SpacetimeMetric<DataVector, 3>>, gh::Tags::Phi<DataVector, 3>, and Cce::Tags::News.
  • prepare_solution(): Any initial precomputation needed to determine all of the solutions efficiently. This function is called by the base class prior to computing or retrieving from the internal cache the requested quantities.
Warning
This class is not intended to be threadsafe! Therefore, using instances of this class placed into the const global cache results in undefined behavior. The analytic data for CCE is not easily represented as a full closed-form solution for the entire Bondi-Sachs-like metric over the domain, so this class and its descendants perform numerical calculations such as spin-weighted derivatives over the sphere. Instead, it makes best sense to compute the global solution over the extraction sphere, and cache intermediate steps to avoid repeating potentially expensive tensor calculations.

Member Function Documentation

◆ prepare_solution()

virtual void Cce::Solutions::WorldtubeData::prepare_solution ( size_t  output_l_max,
double  time 
) const
protectedpure virtual

◆ variables()

template<typename... Tags>
tuples::TaggedTuple< Tags... > Cce::Solutions::WorldtubeData::variables ( const size_t  output_l_max,
const double  time,
tmpl::list< Tags... >   
) const
inline

Retrieve worldtube data represented by the analytic solution, at boundary angular resolution l_max and time time

Details

The set of requested tags are specified by the final argument, which must be a tmpl::list of tags to be retrieved. The set of available tags is found in WorldtubeData::tags, and includes coordinate and Jacobian quantities as well as metric quantities and derivatives thereof.

◆ variables_impl() [1/3]

virtual void Cce::Solutions::WorldtubeData::variables_impl ( gsl::not_null< Scalar< SpinWeighted< ComplexDataVector, -2 > > * >  news,
size_t  output_l_max,
double  time,
tmpl::type_< Tags::News  
) const
protectedpure virtual

◆ variables_impl() [2/3]

◆ variables_impl() [3/3]


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