SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
gh::NumericInitialData Class Reference

Numeric initial data loaded from volume data files. More...

#include <SetInitialData.hpp>

Classes

struct  AdmVars
struct  GhVars
struct  Variables
struct  VarName
 Name of a variable in the volume data file. More...

Public Types

using adm_vars
using gh_vars
using all_vars = tmpl::append<adm_vars, gh_vars>
using options

Public Member Functions

 NumericInitialData (const NumericInitialData &rhs)=default
NumericInitialDataoperator= (const NumericInitialData &rhs)=default
 NumericInitialData (NumericInitialData &&)=default
NumericInitialDataoperator= (NumericInitialData &&)=default
std::unique_ptr< evolution::initial_data::InitialDataget_clone () const override
 NumericInitialData (std::string file_glob, std::string subfile_name, std::variant< double, importers::ObservationSelector > observation_value, std::optional< double > observation_value_epsilon, bool enable_interpolation, std::variant< AdmVars, GhVars > selected_variables)
const importers::ImporterOptionsimporter_options () const
const std::variant< AdmVars, GhVars > & selected_variables () const
size_t volume_data_id () const
 Unique identifier for loading this volume data.
template<typename... AllTags>
void select_for_import (const gsl::not_null< tuples::TaggedTuple< AllTags... > * > fields) const
 Selects which of the fields to import based on the choices in the input-file options.
template<typename... AllTags>
void set_initial_data (const gsl::not_null< tnsr::aa< DataVector, 3 > * > spacetime_metric, const gsl::not_null< tnsr::aa< DataVector, 3 > * > pi, const gsl::not_null< tnsr::iaa< DataVector, 3 > * > phi, const gsl::not_null< tuples::TaggedTuple< AllTags... > * > numeric_data, const Mesh< 3 > &mesh, const InverseJacobian< DataVector, 3, Frame::ElementLogical, Frame::Inertial > &inv_jacobian) const
 Set GH initial data given numeric data loaded from files.
void pup (PUP::er &p) override

Static Public Attributes

static constexpr Options::String help

Friends

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

Detailed Description

Numeric initial data loaded from volume data files.

This class can be factory-created in the input file to start an evolution from numeric initial data. It selects the set of variables to load from the volume data file (ADM or GH variables).

Member Typedef Documentation

◆ adm_vars

using gh::NumericInitialData::adm_vars
Initial value:
tmpl::list<gr::Tags::SpatialMetric<DataVector, 3>,
Definition Tags.hpp:139
Definition Tags.hpp:65
Definition Tags.hpp:61

◆ gh_vars

using gh::NumericInitialData::gh_vars
Initial value:
tmpl::list<gr::Tags::SpacetimeMetric<DataVector, 3>,
Auxiliary variable which is analytically the spatial derivative of the spacetime metric.
Definition Tags.hpp:38
Conjugate momentum to the spacetime metric.
Definition Tags.hpp:27

◆ options

using gh::NumericInitialData::options
Initial value:
tmpl::push_back<importers::ImporterOptions::tags_list, Variables>

Member Function Documentation

◆ get_clone()

std::unique_ptr< evolution::initial_data::InitialData > gh::NumericInitialData::get_clone ( ) const
inlineoverridevirtual

◆ select_for_import()

template<typename... AllTags>
void gh::NumericInitialData::select_for_import ( const gsl::not_null< tuples::TaggedTuple< AllTags... > * > fields) const
inline

Selects which of the fields to import based on the choices in the input-file options.

The fields are all datasets that are available to import, represented by importers::Tags::Selected<Tag> tags. We select only those that we need by setting their dataset name.

◆ set_initial_data()

template<typename... AllTags>
void gh::NumericInitialData::set_initial_data ( const gsl::not_null< tnsr::aa< DataVector, 3 > * > spacetime_metric,
const gsl::not_null< tnsr::aa< DataVector, 3 > * > pi,
const gsl::not_null< tnsr::iaa< DataVector, 3 > * > phi,
const gsl::not_null< tuples::TaggedTuple< AllTags... > * > numeric_data,
const Mesh< 3 > & mesh,
const InverseJacobian< DataVector, 3, Frame::ElementLogical, Frame::Inertial > & inv_jacobian ) const
inline

Set GH initial data given numeric data loaded from files.

The numeric_data contains the datasets selected above (and possibly more). We either set the GH variables directly, or compute them from the ADM variables.

◆ volume_data_id()

size_t gh::NumericInitialData::volume_data_id ( ) const

Unique identifier for loading this volume data.

Involves a hash of the type name and the volume data file names.

Member Data Documentation

◆ help

Options::String gh::NumericInitialData::help
staticconstexpr
Initial value:
=
"Numeric initial data loaded from volume data files"

The documentation for this class was generated from the following file:
  • src/Evolution/Systems/GeneralizedHarmonic/Actions/SetInitialData.hpp