SpECTRE
v2025.03.17
|
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 |
auto | get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override |
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) override |
virtual auto | get_clone () const -> std::unique_ptr< InitialData >=0 |
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 [90]
\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\pi-x,t)\). The transcendental equation \((\ref{eq:transcendental burgers periodic})\) can be solved with a Newton-Raphson 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.
|
overridevirtual |
Implements evolution::initial_data::InitialData.
|
staticconstexpr |