SpECTRE  v2025.08.19
ray_tracing::NumericData Class Reference

Numeric data from volume data files. More...

#include <NumericData.hpp>

Classes

struct  FileGlob
 
struct  ObservationStep
 
struct  SubfileName
 
struct  Verbosity
 

Public Types

using options = tmpl::list< FileGlob, SubfileName, ObservationStep, Verbosity >
 
- Public Types inherited from ray_tracing::BackgroundSpacetime
using tags = tmpl::list< gr::Tags::Lapse< DataType >, DerivLapse, gr::Tags::Shift< DataType, Dim, Frame >, DerivShift, gr::Tags::InverseSpatialMetric< DataType, Dim, Frame >, DerivInvSpatialMetric, gr::Tags::ExtrinsicCurvature< DataType, Dim, Frame > >
 These tags can be retrieved from the background spacetime. They are required to evaluate the gr::geodesic_equation.
 

Public Member Functions

 NumericData (const NumericData &)
 
NumericDataoperator= (const NumericData &)
 
 NumericData (NumericData &&)=default
 
NumericDataoperator= (NumericData &&)=default
 
 NumericData (std::string file_glob, std::string subfile_name, std::optional< int > observation_step, ::Verbosity verbosity=::Verbosity::Silent)
 
auto get_clone () const -> std::unique_ptr< BackgroundSpacetime > override
 Copies the background spacetime. Must call initialize on the clone before using it. More...
 
void initialize (std::array< double, 2 > new_time_bounds) override
 Initialize the background spacetime, e.g. by reading data from a file. More...
 
std::array< double, 2 > time_bounds () const override
 Time bounds for which the background spacetime is valid. The variables function can be called for any time in this range (inclusive). More...
 
tuples::tagged_tuple_from_typelist< tagsvariables (const tnsr::I< DataType, Dim, Frame > &x, double t, std::optional< gsl::not_null< std::vector< size_t > * > > block_order=std::nullopt) const override
 Returns all spacetime variables at a given point in space and time. More...
 
void pup (PUP::er &p) override
 
virtual auto get_clone () const -> std::unique_ptr< BackgroundSpacetime >=0
 Copies the background spacetime. Must call initialize on the clone before using it. More...
 
virtual void initialize (const std::array< double, 2 > time_bounds)
 Initialize the background spacetime, e.g. by reading data from a file. More...
 
virtual std::array< double, 2 > time_bounds () const
 Time bounds for which the background spacetime is valid. The variables function can be called for any time in this range (inclusive). More...
 
virtual tuples::tagged_tuple_from_typelist< tagsvariables (const tnsr::I< DataType, Dim, Frame > &x, double t, std::optional< gsl::not_null< std::vector< size_t > * > > block_order=std::nullopt) const =0
 Returns all spacetime variables at a given point in space and time. More...
 

Static Public Attributes

static constexpr Options::String help = "Numeric data from volume data files"
 

Friends

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

Additional Inherited Members

- Protected Types inherited from ray_tracing::BackgroundSpacetime
using DataType = double
 
using Frame = ::Frame::Inertial
 
using DerivLapse = ::Tags::deriv< gr::Tags::Lapse< DataType >, tmpl::size_t< Dim >, Frame >
 
using DerivShift = ::Tags::deriv< gr::Tags::Shift< DataType, Dim >, tmpl::size_t< Dim >, Frame >
 
using DerivInvSpatialMetric = ::Tags::deriv< gr::Tags::InverseSpatialMetric< DataType, Dim, Frame >, tmpl::size_t< Dim >, Frame >
 
using DerivSpatialMetric = ::Tags::deriv< gr::Tags::SpatialMetric< DataType, Dim, Frame >, tmpl::size_t< Dim >, Frame >
 
- Static Protected Attributes inherited from ray_tracing::BackgroundSpacetime
static constexpr size_t Dim = 3
 

Detailed Description

Numeric data from volume data files.

Member Function Documentation

◆ get_clone()

auto ray_tracing::NumericData::get_clone ( ) const -> std::unique_ptr< BackgroundSpacetime >
inlineoverridevirtual

Copies the background spacetime. Must call initialize on the clone before using it.

Implements ray_tracing::BackgroundSpacetime.

◆ initialize()

void ray_tracing::NumericData::initialize ( std::array< double, 2 >  time_bounds)
overridevirtual

Initialize the background spacetime, e.g. by reading data from a file.

This function is called before the first call to variables(). It is valid to call initialize again with new time bounds. Derived classes must guarantee that the variables function can be called from other threads while initialize is running (e.g. loading new data from files), but only with times within the overlap of the previous and the new time bounds.

Parameters
time_boundsThe time bounds for which to initialize the background spacetime. The spacetime should be valid for all times in this range.

Reimplemented from ray_tracing::BackgroundSpacetime.

◆ time_bounds()

std::array< double, 2 > ray_tracing::NumericData::time_bounds ( ) const
overridevirtual

Time bounds for which the background spacetime is valid. The variables function can be called for any time in this range (inclusive).

Reimplemented from ray_tracing::BackgroundSpacetime.

◆ variables()

tuples::tagged_tuple_from_typelist< tags > ray_tracing::NumericData::variables ( const tnsr::I< DataType, Dim, Frame > &  x,
double  t,
std::optional< gsl::not_null< std::vector< size_t > * > >  block_order = std::nullopt 
) const
overridevirtual

Returns all spacetime variables at a given point in space and time.

This function must be thread-safe.

Parameters
xSpatial coordinates
tTime
block_orderOptional priority order for processing blocks during interpolation. If specified, it will be updated to push the block in which the point was found to the front. Can be empty, in which case it will be initially set to the default order. See block_logical_coordinates for more details.

Implements ray_tracing::BackgroundSpacetime.


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