SpECTRE  v2024.04.12
ScalarWave::Solutions::SemidiscretizedDg Class Reference

An exact solution to the semidiscretized DG ScalarWave system with an upwind flux. More...

#include <SemidiscretizedDg.hpp>

Classes

struct  Amplitudes
 
struct  Harmonic
 

Public Types

using tags = tmpl::list< Tags::Pi, Tags::Phi< 1 >, Tags::Psi >
 
using options = tmpl::list< Harmonic, Amplitudes >
 

Public Member Functions

 SemidiscretizedDg (int harmonic, const std::array< double, 4 > &amplitudes)
 
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
 
template<typename... Tags>
tuples::TaggedTuple< Tags... > variables (const tnsr::I< DataVector, 1 > &x, double t, tmpl::list< Tags... >) const
 Retrieve the evolution variables at time t and spatial coordinates x
 
void pup (PUP::er &p) override
 
virtual auto get_clone () const -> std::unique_ptr< InitialData >=0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

An exact solution to the semidiscretized DG ScalarWave system with an upwind flux.

This solution takes into account the spatial discretization error, and so should show convergence in time integration accuracy to roundoff at any resolution.

Warning
This is not really a pointwise function, as the solution depends on the spatial discretization. It will only work on a periodic domain of length \(2 \pi\) (or an integer multiple) with equally sized linear elements.

Member Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ help

constexpr Options::String ScalarWave::Solutions::SemidiscretizedDg::help
staticconstexpr
Initial value:
=
"A solution of the semidiscretized DG system on linear elements\n"
"with spatial period 2 pi."

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