SpECTRE  v2026.06.30
Loading...
Searching...
No Matches
SecondOrderScalarWave::Solutions::SecondOrderWrapper< SolutionType > Class Template Reference

Adapts a ScalarWave analytic solution to an analytic solution of the SecondOrderScalarWave system. More...

#include <SecondOrderWrapper.hpp>

Public Types

using options = typename SolutionType::options
using tags

Public Member Functions

 SecondOrderWrapper (const SecondOrderWrapper &)=default
SecondOrderWrapperoperator= (const SecondOrderWrapper &)=default
 SecondOrderWrapper (SecondOrderWrapper &&)=default
SecondOrderWrapperoperator= (SecondOrderWrapper &&)=default
 SecondOrderWrapper (SolutionType solution)
template<typename... Args>
requires std::is_constructible_v<SolutionType, Args&&...>
 SecondOrderWrapper (Args &&... args)
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
tuples::TaggedTuple< SecondOrderScalarWave::Tags::Psi, SecondOrderScalarWave::Tags::Pi, SecondOrderScalarWave::Tags::Phi< volume_dim > > variables (const tnsr::I< DataVector, volume_dim > &x, double t, tmpl::list< SecondOrderScalarWave::Tags::Psi, SecondOrderScalarWave::Tags::Pi, SecondOrderScalarWave::Tags::Phi< volume_dim > >) const
 Retrieve the evolved and auxiliary variables (Psi, Pi, Phi) at time t and spatial coordinates x
tuples::TaggedTuple< SecondOrderScalarWave::Tags::Psi, SecondOrderScalarWave::Tags::Pivariables (const tnsr::I< DataVector, volume_dim > &x, double t, tmpl::list< SecondOrderScalarWave::Tags::Psi, SecondOrderScalarWave::Tags::Pi >) const
 Retrieve the evolved variables (Psi, Pi)
tuples::TaggedTuple<::Tags::dt< SecondOrderScalarWave::Tags::Psi >, ::Tags::dt< SecondOrderScalarWave::Tags::Pi > > variables (const tnsr::I< DataVector, volume_dim > &x, double t, tmpl::list<::Tags::dt< SecondOrderScalarWave::Tags::Psi >, ::Tags::dt< SecondOrderScalarWave::Tags::Pi > >) const
 Retrieve the time derivatives of the evolved variables (dt(Psi), dt(Pi)) at time t and spatial coordinates x
void pup (PUP::er &p) override

Static Public Member Functions

static std::string name ()

Static Public Attributes

static constexpr size_t volume_dim = SolutionType::volume_dim
static Options::String help = help_storage().c_str()

Friends

bool operator== (const SecondOrderWrapper &lhs, const SecondOrderWrapper &rhs)
bool operator!= (const SecondOrderWrapper &lhs, const SecondOrderWrapper &rhs)

Detailed Description

template<typename SolutionType>
class SecondOrderScalarWave::Solutions::SecondOrderWrapper< SolutionType >

Adapts a ScalarWave analytic solution to an analytic solution of the SecondOrderScalarWave system.

The wrapped SolutionType supplies the mathematics of the solution together with its variables and their time derivatives in the ScalarWave tag namespace. This adapter re-exposes those quantities through the SecondOrderScalarWave tags, adding the three variables interfaces the second-order-in-space system requires: the evolved and auxiliary variables \(\{\Psi, \Pi, \Phi_i\}\), the evolved variables \(\{\Psi, \Pi\}\), and the time derivatives of the evolved variables \(\{\partial_t\Psi, \partial_t\Pi\}\). In the second-order-in-space system only \(\Psi\) and \(\Pi\) are evolved; \(\Phi_i\) is auxiliary and is not evolved, so \(\partial_t\Phi_i\) from the wrapped solution is discarded.

The wrapped solution is held by composition, so only the second-order interface below is public; the ScalarWave interface of SolutionType is not exposed.

Template Parameters
SolutionTypea ScalarWave analytic solution to adapt

Member Typedef Documentation

◆ tags

template<typename SolutionType>
using SecondOrderScalarWave::Solutions::SecondOrderWrapper< SolutionType >::tags
Initial value:
Auxiliary variable, the spatial derivative of the scalar field.
Definition Tags.hpp:41
The negative time derivative of the scalar field.
Definition Tags.hpp:31
The scalar field.
Definition Tags.hpp:22
Prefix indicating a time derivative.
Definition Prefixes.hpp:29

Member Function Documentation

◆ get_clone()

template<typename SolutionType>
auto SecondOrderScalarWave::Solutions::SecondOrderWrapper< SolutionType >::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/AnalyticSolutions/WaveEquation/SecondOrderWrapper.hpp