Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::CSRSlopeLimiter< real_type > Struct Template Reference

Generalized slope limiter for dG methods. More...

Public Member Functions

 CSRSlopeLimiter (real_type mod=(real_type) 0)
 
DG_DEVICE void operator() (unsigned i, const int *row_offsets, const int *column_indices, const real_type *values, const real_type *x, real_type *y)
 

Detailed Description

template<class real_type>
struct dg::CSRSlopeLimiter< real_type >

Generalized slope limiter for dG methods.

Consider the one-dimensional case. The first step is to transform the given values to compute modal coefficients. The linear part is given by \( u_h^1(x) = u_{n0}p_{n0}(x) + u_{n1}p_{n1}(x)\) with \(p_{n0}(x) = 1\) and \( p_{n1}(x) = 2(x-x_n)/h\). Then the limiter is defined via

\[ \Lambda\Pi ( u_h^1)|_n = u_{n0} + \textrm{minmod}\left( u_{n1}, ( u_{(n+1)0} - u_{n0}), (u_{(n)0} - u_{(n-1)0})\right)p_{n1}(x) \]

If the result of the minmod function is \( u_{n1}\), then \( \Lambda\Pi( u_h)|_n = u_h|_n\), else \( \Lambda\Pi(u_h)|_n = \Lambda\Pi(u_h^1)|_n\) Must be applied in combination with limiter_stencil

Note
This limiter in a dG advection scheme has mixed success, generally maybe because we use it as a Kronecker product of two 1d filters?
See also
dg::blas2::stencil dg::create::limiter_stencil

Constructor & Destructor Documentation

◆ CSRSlopeLimiter()

template<class real_type >
dg::CSRSlopeLimiter< real_type >::CSRSlopeLimiter ( real_type  mod = (real_type)0)
inline

Member Function Documentation

◆ operator()()

template<class real_type >
DG_DEVICE void dg::CSRSlopeLimiter< real_type >::operator() ( unsigned  i,
const int *  row_offsets,
const int *  column_indices,
const real_type *  values,
const real_type *  x,
real_type *  y 
)
inline

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