Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Topics | |
Timer class | |
t.tic(); t.toc(); t.diff(); | |
Functions and functors | |
MPI utility functions | |
Lowlevel helper functions and classes | |
Classes | |
class | dg::Message |
small class holding a stringstream More... | |
class | dg::Error |
class intended for the use in throw statements More... | |
struct | dg::Fail |
Indicate failure to converge. More... | |
class | dg::NoRoot1d |
Exception class, that stores boundaries for 1D root finding. More... | |
Functions | |
void | dg::abort_program (int code=-1) |
Abort program (both MPI and non-MPI) | |
template<class UnaryOp > | |
dg::SquareMatrix< std::invoke_result_t< UnaryOp, unsigned > > | dg::create::modal_filter (UnaryOp op, unsigned n) |
Create a modal filter block \( V D V^{-1}\). | |
|
inline |
Abort program (both MPI and non-MPI)
code | The abortion code that will be signalled to the caller (of the program) |
dg::SquareMatrix< std::invoke_result_t< UnaryOp, unsigned > > dg::create::modal_filter | ( | UnaryOp | op, |
unsigned | n ) |
Create a modal filter block \( V D V^{-1}\).
where \( V\) is the Vandermonde matrix (the backward transformation matrix) and \( D \) is a diagonal matrix with \( D_{ii} = \sigma(i)\)
UnaryOp | Model of Unary Function real_type sigma(unsigned) The input will be the modal number i where \( i=0,...,n-1\) and n is the number of polynomial coefficients in use. The output is the filter strength for the given mode number |
op | the unary function |
n | number of polynomial coefficients for forward and backward transformation |
dg::create::fast_transform()
to create a matrix that applies the filter to vectors. For example to create a modal filter that acts in two dimensions: