SpECTRE  v2026.09.05
Loading...
Searching...
No Matches
Burgers::Solutions::Step Class Reference

A propagating shock between two constant states. More...

#include <Step.hpp>

Classes

struct  InitialPosition
struct  LeftValue
struct  RightValue

Public Types

using options = tmpl::list<LeftValue, RightValue, InitialPosition>

Public Member Functions

 Step (double left_value, double right_value, double initial_shock_position, const Options::Context &context={})
 Step (const Step &)=default
Step & operator= (const Step &)=default
 Step (Step &&)=default
Step & operator= (Step &&)=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, double t) const
template<typename T>
Scalar< T > du_dt (const tnsr::I< T, 1 > &x, double t) const
tuples::TaggedTuple< Tags::U > variables (const tnsr::I< DataVector, 1 > &x, double t, tmpl::list< Tags::U >) const
tuples::TaggedTuple<::Tags::dt< Tags::U > > variables (const tnsr::I< DataVector, 1 > &x, double t, tmpl::list<::Tags::dt< Tags::U > >) const
void pup (PUP::er &p) override
Public Member Functions inherited from evolution::initial_data::InitialData
virtual const InitialData & unwrap () const
 Unwrap wrapper types (e.g. WithNoise, which wraps analytic initial data and adds random noise) to reach the underlying analytic solution or data.

Static Public Attributes

static constexpr Options::String help {"A propagating shock solution"}

Detailed Description

A propagating shock between two constant states.

The shock propagates left-to-right, with profile \(U(x, t) = U_R + (U_L - U_R) H(-(x - x_0 - v t))\). Here \(U_L\) and \(U_R\) are the left and right constant states, satisfying \(U_L > U_R\); \(H\) is the Heaviside function; \(x_0\) is the initial (i.e., \(t=0\)) position of the shock; and \(v = 0.5 (U_L + U_R)\) is the speed of the shock.

Note
At the shock, where \(x = x_0 + vt\), we have \(U(x, t) = U_L\). (This is inherited from the Heaviside implementation step_function.) Additionally, the time derivative \(\partial_t u0\) is zero, rather than the correct delta function.

Member Function Documentation

◆ get_clone()

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

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