SpECTRE  v2024.04.12
Poisson::Solutions::Moustache< Dim > Class Template Reference

A solution to the Poisson equation with a discontinuous first derivative. More...

#include <Moustache.hpp>

Public Types

using options = tmpl::list<>
 

Public Member Functions

 Moustache (const Moustache &)=default
 
Moustacheoperator= (const Moustache &)=default
 
 Moustache (Moustache &&)=default
 
Moustacheoperator= (Moustache &&)=default
 
std::unique_ptr< elliptic::analytic_data::AnalyticSolutionget_clone () const override
 
template<typename DataType , typename... RequestedTags>
tuples::TaggedTuple< RequestedTags... > variables (const tnsr::I< DataType, Dim > &x, tmpl::list< RequestedTags... >) const
 
virtual std::unique_ptr< AnalyticSolutionget_clone () const =0
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim>
class Poisson::Solutions::Moustache< Dim >

A solution to the Poisson equation with a discontinuous first derivative.

Details

This implements the solution \(u(x,y)=x\left(1-x\right) y\left(1-y\right)\left(\left(x-\frac{1}{2}\right)^2+\left(y- \frac{1}{2}\right)^2\right)^\frac{3}{2}\) to the Poisson equation in two dimensions, and \(u(x)=x\left(1-x\right)\left|x-\frac{1}{2}\right|^3\) in one dimension. Their boundary conditions vanish on the square \([0,1]^2\) or interval \([0,1]\), respectively.

The corresponding source \(f=-\Delta u\) has a discontinuous first derivative at \(\frac{1}{2}\). This accomplishes two things:

  • It makes it useful to test the convergence behaviour of our elliptic DG solver.
  • It makes it look like a moustache (at least in 1D).

This solution is taken from [170].

Member Function Documentation

◆ get_clone()

template<size_t Dim>
std::unique_ptr< elliptic::analytic_data::AnalyticSolution > Poisson::Solutions::Moustache< Dim >::get_clone ( ) const
inlineoverridevirtual

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String Poisson::Solutions::Moustache< Dim >::help
staticconstexpr
Initial value:
{
"A solution with a discontinuous first derivative of its source at 1/2 "
"that also happens to look like a moustache. It vanishes at zero and one "
"in each dimension"}

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