SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
ScalarWave::Solutions::PlaneWave< Dim > Class Template Reference

A plane wave solution to the Euclidean wave equation. More...

#include <PlaneWave.hpp>

Classes

struct  Center
struct  Profile
struct  WaveVector

Public Types

using options = tmpl::list<WaveVector, Center, Profile>
using tags

Public Member Functions

 PlaneWave (std::array< double, Dim > wave_vector, std::array< double, Dim > center, std::unique_ptr< MathFunction< 1, Frame::Inertial > > profile)
 PlaneWave (const PlaneWave &)
PlaneWaveoperator= (const PlaneWave &)
 PlaneWave (PlaneWave &&)=default
PlaneWaveoperator= (PlaneWave &&)=default
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
template<typename T>
Scalar< T > psi (const tnsr::I< T, Dim > &x, double t) const
 The value of the scalar field.
template<typename T>
Scalar< T > dpsi_dt (const tnsr::I< T, Dim > &x, double t) const
 The time derivative of the scalar field.
template<typename T>
tnsr::i< T, Dim > dpsi_dx (const tnsr::I< T, Dim > &x, double t) const
 The spatial derivatives of the scalar field.
template<typename T>
Scalar< T > d2psi_dt2 (const tnsr::I< T, Dim > &x, double t) const
 The second time derivative of the scalar field.
template<typename T>
tnsr::i< T, Dim > d2psi_dtdx (const tnsr::I< T, Dim > &x, double t) const
 The second mixed derivatives of the scalar field.
template<typename T>
tnsr::ii< T, Dim > d2psi_dxdx (const tnsr::I< T, Dim > &x, double t) const
 The second spatial derivatives of the scalar field.
tuples::TaggedTuple< Tags::Psi, Tags::Pi, Tags::Phi< Dim > > variables (const tnsr::I< DataVector, Dim > &x, double t, tmpl::list< Tags::Psi, Tags::Pi, Tags::Phi< Dim > >) const
 Retrieve the evolution variables at time t and spatial coordinates x
tuples::TaggedTuple<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< Dim > > > variables (const tnsr::I< DataVector, Dim > &x, double t, tmpl::list<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< Dim > > >) const
 Retrieve the time derivative of the evolution variables at time t and spatial coordinates x
void pup (PUP::er &p) override

Static Public Attributes

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

Friends

template<size_t LocalDim>
bool operator== (const PlaneWave< LocalDim > &lhs, const PlaneWave< LocalDim > &rhs)
template<size_t LocalDim>
bool operator!= (const PlaneWave< LocalDim > &lhs, const PlaneWave< LocalDim > &rhs)

Detailed Description

template<size_t Dim>
class ScalarWave::Solutions::PlaneWave< Dim >

A plane wave solution to the Euclidean wave equation.

The solution is given by \(\Psi(\vec{x},t) = F(u(\vec{x},t))\) where the profile \(F\) of the plane wave is an arbitrary one-dimensional function of \(u = \vec{k} \cdot (\vec{x} - \vec{x_o}) - \omega t\) with the wave vector \(\vec{k}\), the frequency \(\omega = ||\vec{k}||\) and initial center of the profile \(\vec{x_o}\).

Template Parameters
Dimthe spatial dimension of the solution

Member Typedef Documentation

◆ tags

template<size_t Dim>
using ScalarWave::Solutions::PlaneWave< Dim >::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()

template<size_t Dim>
auto ScalarWave::Solutions::PlaneWave< Dim >::get_clone ( ) const -> std::unique_ptr< evolution::initial_data::InitialData >
overridevirtual

◆ variables()

template<size_t Dim>
tuples::TaggedTuple<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< Dim > > > ScalarWave::Solutions::PlaneWave< Dim >::variables ( const tnsr::I< DataVector, Dim > & x,
double t,
tmpl::list<::Tags::dt< Tags::Psi >, ::Tags::dt< Tags::Pi >, ::Tags::dt< Tags::Phi< Dim > > >  ) const

Retrieve the time derivative of the evolution variables at time t and spatial coordinates x

Note
This function's expected use case is setting the past time derivative values for Adams-Bashforth-like steppers.

Member Data Documentation

◆ help

template<size_t Dim>
Options::String ScalarWave::Solutions::PlaneWave< Dim >::help
staticconstexpr
Initial value:
= {
"A plane wave solution of the Euclidean wave equation"}

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