SpECTRE
v2024.12.16
|
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 = implementation defined |
using | gh_vars = implementation defined |
using | all_vars = implementation defined |
using | options = implementation defined |
Public Member Functions | |
NumericInitialData (const NumericInitialData &rhs)=default | |
NumericInitialData & | operator= (const NumericInitialData &rhs)=default |
NumericInitialData (NumericInitialData &&)=default | |
NumericInitialData & | operator= (NumericInitialData &&)=default |
std::unique_ptr< evolution::initial_data::InitialData > | get_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::ImporterOptions & | importer_options () const |
const std::variant< AdmVars, GhVars > & | selected_variables () const |
size_t | volume_data_id () const |
Unique identifier for loading this volume data. More... | |
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. More... | |
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. More... | |
void | pup (PUP::er &p) override |
virtual auto | get_clone () const -> std::unique_ptr< InitialData >=0 |
Static Public Attributes | |
static constexpr Options::String | help |
Friends | |
bool | operator== (const NumericInitialData &lhs, const NumericInitialData &rhs) |
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).
|
inlineoverridevirtual |
Implements evolution::initial_data::InitialData.
|
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.
|
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.
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.
|
staticconstexpr |