Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
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 >
 

Public Member Functions

 RegularSphericalWave (std::unique_ptr< MathFunction< 1 >> profile) noexcept
 
 RegularSphericalWave (const RegularSphericalWave &) noexcept=delete
 
RegularSphericalWaveoperator= (const RegularSphericalWave &) noexcept=delete
 
 RegularSphericalWave (RegularSphericalWave &&) noexcept=default
 
RegularSphericalWaveoperator= (RegularSphericalWave &&) noexcept=default
 
tuples::TaggedTuple< ScalarWave::Pi, ScalarWave::Phi< 3 >, ScalarWave::Psivariables (const tnsr::I< DataVector, 3 > &x, double t, tmpl::list< ScalarWave::Pi, ScalarWave::Phi< 3 >, ScalarWave::Psi >) const noexcept
 
tuples::TaggedTuple< Tags::dt< ScalarWave::Pi >, Tags::dt< ScalarWave::Phi< 3 > >, Tags::dt< ScalarWave::Psi > > variables (const tnsr::I< DataVector, 3 > &x, double t, tmpl::list< Tags::dt< ScalarWave::Pi >, Tags::dt< ScalarWave::Phi< 3 >>, Tags::dt< ScalarWave::Psi >>) const noexcept
 
void pup (PUP::er &p) noexcept
 

Static Public Attributes

static constexpr OptionString help
 

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 Data Documentation

◆ help

constexpr OptionString ScalarWave::Solutions::RegularSphericalWave::help
static
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 files: