SpECTRE
v2022.09.02

Analytic data (with an "exact" solution known) that is periodic over the interval \([0,2\pi]\). More...
#include <Sinusoid.hpp>
Public Types  
using  options = tmpl::list<> 
Public Member Functions  
Sinusoid (const Sinusoid &)=default  
Sinusoid &  operator= (const Sinusoid &)=default 
Sinusoid (Sinusoid &&)=default  
Sinusoid &  operator= (Sinusoid &&)=default 
template<typename T >  
Scalar< T >  u (const tnsr::I< T, 1 > &x) const 
tuples::TaggedTuple< Tags::U >  variables (const tnsr::I< DataVector, 1 > &x, tmpl::list< Tags::U >) const 
void  pup (PUP::er &p) 
Static Public Attributes  
static constexpr Options::String  help 
Analytic data (with an "exact" solution known) that is periodic over the interval \([0,2\pi]\).
The initial data is given by:
\begin{align} u(x, 0) = \sin(x) \end{align}
At future times the analytic solution can be found by solving the transcendental equation [63]
\begin{align} \label{eq:transcendental burgers periodic} \mathcal{F}=\sin\left(x\mathcal{F}t\right) \end{align}
on the interval \(x\in(0,\pi)\). The solution from \(x\in(\pi,2\pi)\) is given by \(\mathcal{F}(x, t)=\mathcal{F}(2\pix,t)\). The transcendental equation \((\ref{eq:transcendental burgers periodic})\) can be solved with a NewtonRaphson iterative scheme. Since this can be quite sensitive to the initial guess we implement this solution as analytic data. The python code below can be used to compute the analytic solution if desired.
At time \(1\) the solution develops a discontinuity at \(x=\pi\) followed by the amplitude of the solution decaying over time.

staticconstexpr 