SpECTRE  v2026.09.05
Loading...
Searching...
No Matches
ScalarAdvection::Solutions::Krivodonova Class Reference

Initial data for the 1D scalar advection problem adopted from [129] and its analytic solution. More...

#include <Krivodonova.hpp>

Public Types

using options = tmpl::list<>

Public Member Functions

 Krivodonova (const Krivodonova &)=default
Krivodonova & operator= (const Krivodonova &)=default
 Krivodonova (Krivodonova &&)=default
Krivodonova & operator= (Krivodonova &&)=default
auto get_clone () const -> std::unique_ptr< evolution::initial_data::InitialData > override
template<typename DataType>
tuples::TaggedTuple< ScalarAdvection::Tags::U > variables (const tnsr::I< DataType, 1 > &x, double t, tmpl::list< ScalarAdvection::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

Detailed Description

Initial data for the 1D scalar advection problem adopted from [129] and its analytic solution.

The initial profile consists of a combination of Gaussians, a square pulse, a sharp triangle, and a combination of half-ellipses.

\begin{align*}u(x,t=0) = \left\{\begin{array}{lcl} (G(x,\beta,z-\delta) + G(x,\beta,z+\delta) + 4G(x,\beta,z))/6 & \text{if} & -0.8 \leq x \leq -0.6 \\ 1 & \text{if} & -0.4 \leq x \leq -0.2 \\ 1 - |10(x-0.1)| & \text{if} & 0 \leq x \leq 0.2 \\ (F(x,\alpha,a-\delta) + F(x,\alpha,a+\delta) + 4F(x,\alpha,a))/6 & \text{if} & 0.4 \leq x \leq 0.6 \\ 0 & \text{otherwise} & \\ \end{array}\right\}, \end{align*}

where

\begin{align*}G(x,\beta, z) & = e^{-\beta(x-z)^2} \\ F(x,\alpha, a) & = \sqrt{\max(1-\alpha^2(x-a)^2, 0)} \end{align*}

with \(a=0.5, z=-0.7, \delta=0.005, \alpha=10, \text{and }\beta = \log2/(36\delta^2)\).

The system is evolved over the 1D domain \([-1, 1]\) with the constant advection velocity field \(v(x) = 1.0\) and with the periodic boundary condition. The initial profile is simply advected (translated) to +x direction, going over cycles in the domain every 2.0 time unit.

Member Function Documentation

◆ get_clone()

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

Member Data Documentation

◆ help

Options::String ScalarAdvection::Solutions::Krivodonova::help
staticconstexpr
Initial value:
{
"An advecting 1D profile adopted from Krivodonova2007 paper, periodic "
"over the interval [-1, 1]"}

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