SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
ScalarWave::Solutions::RegularSphericalWave Class Reference

A 3D spherical wave solution to the Euclidean wave equation that is regular at the origin. More...

#include <RegularSphericalWave.hpp>

Classes

struct  Profile

Public Types

using options = tmpl::list<Profile>
using tags

Public Member Functions

 RegularSphericalWave (std::unique_ptr< MathFunction< 1, Frame::Inertial > > profile)
 RegularSphericalWave (const RegularSphericalWave &other)
RegularSphericalWaveoperator= (const RegularSphericalWave &other)
 RegularSphericalWave (RegularSphericalWave &&)=default
RegularSphericalWaveoperator= (RegularSphericalWave &&)=default
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
tuples::TaggedTuple< Tags::Psi, Tags::Pi, Tags::Phi< 3 > > variables (const tnsr::I< DataVector, 3 > &x, double t, tmpl::list< Tags::Psi, Tags::Pi, Tags::Phi< 3 > >) const
tuples::TaggedTuple<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< 3 > > > variables (const tnsr::I< DataVector, 3 > &x, double t, tmpl::list<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< 3 > > >) const
void pup (PUP::er &p) override

Static Public Attributes

static constexpr size_t volume_dim = 3
static constexpr Options::String help

Friends

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

Detailed Description

A 3D spherical wave solution to the Euclidean wave equation that is regular at the origin.

The solution is given by \(\Psi(\vec{x},t) = \Psi(r,t) = \frac{F(r-t)-F(-r-t)}{r}\) describing an outgoing and an ingoing wave with profile \(F(u)\). For small \(r\) the solution is approximated by its Taylor expansion \(\Psi(r,t)=2 F^\prime(-t) + \mathcal{O}(r^2)\). The outgoing and ingoing waves meet at the origin (and cancel each other) when \(F^\prime(-t)=0\).

The expansion is employed where \(r\) lies within the cubic root of the machine epsilon. Inside this radius we expect the error due to the truncation of the Taylor expansion to be smaller than the numerical error made when evaluating the full \(\Psi(r,t)\). This is because the truncation error scales as \(r^2\) (since we keep the zeroth order, and the linear order vanishes as all odd orders do) and the numerical error scales as \(\frac{\epsilon}{r}\), so they are comparable at \(r\propto\epsilon^\frac{1}{3}\).

Requires: the profile \(F(u)\) to have a length scale of order unity so that "small" \(r\) means \(r\ll 1\). This is without loss of generality because of the scale invariance of the wave equation. The profile could be a Gausssian centered at 0 with width 1, for instance.

Member Typedef Documentation

◆ tags

using ScalarWave::Solutions::RegularSphericalWave::tags
Initial value:
tmpl::list<Tags::Psi, Tags::Pi, Tags::Phi<3>, ::Tags::dt<Tags::Psi>,
Prefix indicating a time derivative.
Definition Prefixes.hpp:28

Member Function Documentation

◆ get_clone()

auto ScalarWave::Solutions::RegularSphericalWave::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

Member Data Documentation

◆ help

Options::String ScalarWave::Solutions::RegularSphericalWave::help
staticconstexpr
Initial value:
= {
"A spherical wave solution of the Euclidean wave equation that is "
"regular at the origin"}

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