SpECTRE  v2022.05.05
CurvedScalarWave::AnalyticData::ScalarWaveGr< ScalarFieldData, BackgroundGrData > Class Template Reference

Analytic initial data for scalar waves in curved spacetime. More...

#include <ScalarWaveGr.hpp>


struct  Background
struct  ScalarField

Public Types

using options = tmpl::list< Background, ScalarField >
template<typename DataType >
using spacetime_tags = typename BackgroundGrData::template tags< DataType >
using InitialDataPsi = tmpl::conditional_t< is_curved, CurvedScalarWave::Tags::Psi, ScalarWave::Tags::Psi >
using InitialDataPi = tmpl::conditional_t< is_curved, CurvedScalarWave::Tags::Pi, ScalarWave::Tags::Pi >
using InitialDataPhi = tmpl::conditional_t< is_curved, CurvedScalarWave::Tags::Phi< volume_dim >, ScalarWave::Tags::Phi< volume_dim > >
using evolved_field_vars_tags = tmpl::list< InitialDataPsi, InitialDataPi, InitialDataPhi >
using tags = tmpl::append< spacetime_tags< DataVector >, tmpl::list< Tags::Psi, Tags::Pi, Tags::Phi< volume_dim > > >

Public Member Functions

 ScalarWaveGr (BackgroundGrData background, ScalarFieldData scalar_field)
 ScalarWaveGr (CkMigrateMessage *)
 ScalarWaveGr (const ScalarWaveGr &)=delete
ScalarWaveGroperator= (const ScalarWaveGr &)=delete
 ScalarWaveGr (ScalarWaveGr &&)=default
ScalarWaveGroperator= (ScalarWaveGr &&)=default
template<typename DataType , typename Tag , Requires< tmpl::list_contains_v< spacetime_tags< DataType >, Tag > > = nullptr>
tuples::TaggedTuple< Tag > variables (const tnsr::I< DataType, volume_dim > &x, tmpl::list< Tag >) const
 Retrieve spacetime variables.
tuples::TaggedTuple< Tags::Psivariables (const tnsr::I< DataVector, volume_dim > &x, tmpl::list< Tags::Psi >) const
tuples::TaggedTuple< Tags::Pivariables (const tnsr::I< DataVector, volume_dim > &x, tmpl::list< Tags::Pi >) const
 Retrieve scalar wave variables.
tuples::TaggedTuple< Tags::Phi< volume_dim > > variables (const tnsr::I< DataVector, volume_dim > &x, tmpl::list< Tags::Phi< volume_dim > >) const
template<typename DataType , typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataType, volume_dim > &x, tmpl::list< Tags... >) const
void pup (PUP::er &p)

Static Public Member Functions

static std::string name ()

Static Public Attributes

static constexpr size_t volume_dim = ScalarFieldData::volume_dim
static constexpr bool is_curved
static constexpr Options::String help


template<typename LocalScalarFieldData , typename LocalBackgroundData >
bool operator== (const ScalarWaveGr< LocalScalarFieldData, LocalBackgroundData > &lhs, const ScalarWaveGr< LocalScalarFieldData, LocalBackgroundData > &rhs)

Detailed Description

template<typename ScalarFieldData, typename BackgroundGrData>
class CurvedScalarWave::AnalyticData::ScalarWaveGr< ScalarFieldData, BackgroundGrData >

Analytic initial data for scalar waves in curved spacetime.


When evolving a scalar field propagating through curved spacetime, this class provides a method to initialize the scalar field and spacetime variables using

  1. analytic solution(s) or data of the flat or curved scalar wave equation for the evolution variables
  2. solutions of the Einstein equations for the spacetime background.

If the scalar field initial data returns CurvedScalarWave tags, \(\Psi\), \(\Pi\) and \(\Phi_i\) will simply be forwarded from the initial data class. Alternatively, the scalar field initial data can be provided using any member class of ScalarWave::Solutions which return ScalarWave tags. In this case, \(\Phi_i\) and \(\Psi\) will also be forwarded but \(\Pi\) will be adjusted to account for the curved background. Its definition comes from requiring it to be the future-directed time derivative of the scalar field in curved spacetime:

\begin{align} \Pi :=& -n^a \partial_a \Psi \\ =& \frac{1}{\alpha}\left(\beta^k \Phi_k - {\partial_t\Psi}\right),\\ =& \frac{1}{\alpha}\left(\beta^k \Phi_k + {\Pi}_{\mathrm{flat}}\right), \end{align}

where \(n^a\) is the unit normal to spatial slices of the spacetime foliation, and \({\Pi}_{\mathrm{flat}}\) comes from the flat spacetime solution.

Member Data Documentation

◆ help

template<typename ScalarFieldData , typename BackgroundGrData >
constexpr Options::String CurvedScalarWave::AnalyticData::ScalarWaveGr< ScalarFieldData, BackgroundGrData >::help
Initial value:
"A scalar field in curved background spacetime\n\n"}

◆ is_curved

template<typename ScalarFieldData , typename BackgroundGrData >
constexpr bool CurvedScalarWave::AnalyticData::ScalarWaveGr< ScalarFieldData, BackgroundGrData >::is_curved
Initial value:
tmpl::list_contains_v<typename ScalarFieldData::tags,
The scalar field.
Definition: Tags.hpp:27

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