Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg Namespace Reference

This is the namespace for all functions and classes defined and used by the discontinuous Galerkin library. More...

Namespaces

namespace  blas1
 BLAS Level 1 routines.
 
namespace  blas2
 BLAS Level 2 routines.
 
namespace  create
 Contains functions used for matrix creation.
 
namespace  exblas
 
namespace  geo
 
namespace  mat
 
namespace  tensor
 Utility functions used in connection with the SparseTensor class.
 
namespace  x
 

Classes

struct  ABS
 \( f(x) = |x|\) More...
 
struct  AbsMax
 \( f(x,y) = \max(|x|,|y|)\) More...
 
struct  AbsMin
 \( f(x,y) = \min(|x|,|y|)\) More...
 
struct  aCommunicator
 Struct that performs collective scatter and gather operations across processes on distributed vectors using MPI. More...
 
struct  Adaptive
 Driver class for adaptive timestep ODE integration. More...
 
struct  AdaptiveTimeloop
 Integrate using a while loop. More...
 
struct  Advection
 Upwind discretization of advection operator \( \vec v\cdot\nabla f\) More...
 
struct  AndersonAcceleration
 Anderson Acceleration of Fixed Point/Richardson Iteration for the nonlinear equation \( f(x) = b\). More...
 
struct  AnyMatrixTag
 tensor_category base class More...
 
struct  AnyPolicyTag
 Execution Policy base class. More...
 
struct  AnyScalarTag
 Scalar Tag base class, indicates the basic Scalar Tensor concept. More...
 
struct  AnyVectorTag
 Vector Tag base class, indicates the basic Vector/container concept. More...
 
struct  ArakawaX
 Arakawa's scheme for Poisson bracket \( \{ f,g\} \). More...
 
struct  aRealGeometry2d
 This is the abstract interface class for a two-dimensional Geometry. More...
 
struct  aRealGeometry3d
 This is the abstract interface class for a three-dimensional Geometry. More...
 
struct  aRealGeometryX2d
 This is the abstract interface class for a two-dimensional RealGeometryX. More...
 
struct  aRealGeometryX3d
 This is the abstract interface class for a three-dimensional RealGeometryX. More...
 
struct  aRealMPIGeometry2d
 This is the abstract interface class for a two-dimensional Geometry. More...
 
struct  aRealMPIGeometry3d
 This is the abstract interface class for a three-dimensional MPIGeometry. More...
 
struct  aRealMPITopology2d
 2D MPI abstract grid class More...
 
struct  aRealMPITopology3d
 3D MPI Grid class More...
 
struct  aRealProductGeometry3d
 A 3d product space Geometry \( g_{2d} \otimes g_{1d}\). More...
 
struct  aRealProductMPIGeometry3d
 A 3d product space Geometry \( g_{2d} \otimes g_{1d}\). More...
 
struct  aRealRefinement1d
 Abstract base class for 1d grid refinement that increases the number of grid cells of a fixed basis grid. More...
 
struct  aRealRefinementX2d
 Abstract base class for 2d grid refinement that increases the number of grid cells of a fixed basis grid. More...
 
struct  aRealTopology2d
 An abstract base class for two-dimensional grids. More...
 
struct  aRealTopology3d
 An abstract base class for three-dimensional grids. More...
 
struct  aRealTopologyX2d
 A 2D grid class with X-point topology. More...
 
struct  aRealTopologyX3d
 A 3D grid class with X-point topology. More...
 
struct  ARKStep
 Additive Runge Kutta (semi-implicit) time-step with error estimate following The ARKode library More...
 
struct  ArrayScalarTag
 
struct  ArrayVectorTag
 
struct  aTimeloop
 Abstract timeloop independent of stepper and ODE. More...
 
struct  Average
 Topological average computations in a Cartesian topology. More...
 
struct  Average< MPI_Vector< container > >
 MPI specialized class for average computations. More...
 
struct  Axpby
 \( y\leftarrow ax+by \) More...
 
struct  Axpbypgz
 \( z\leftarrow ax+by+gz \) More...
 
struct  AxyPby
 \( y\leftarrow axy+by \) More...
 
struct  BathRZ
 \(f(R,Z) = A B \sum_\vec{k} \sqrt{E_k} \alpha_k \cos{\left(k \kappa_k + \theta_k \right)} \) More...
 
class  BICGSTABl
 Preconditioned BICGSTAB(l) method to solve \( Ax=b\). More...
 
struct  BijectiveComm
 Perform bijective gather and its transpose (scatter) operation across processes on distributed vectors using mpi. More...
 
struct  Buffer
 a manager class that invokes the copy constructor on the managed ptr when copied (deep copy) More...
 
struct  ButcherTableau
 Manage coefficients of a (extended) Butcher tableau. More...
 
struct  Cauchy
 \( f(x,y) = \begin{cases} Ae^{1 + \left(\frac{(x-x_0)^2}{\sigma_x^2} + \frac{(y-y_0)^2}{\sigma_y^2} - 1\right)^{-1}} \text{ if } \frac{(x-x_0)^2}{\sigma_x^2} + \frac{(y-y_0)^2}{\sigma_y^2} < 1\\ 0 \text{ else} \end{cases} \) More...
 
struct  CauchyX
 \( f(x,y) = \begin{cases} Ae^{1 + \left(\frac{(x-x_0)^2}{\sigma_x^2} - 1\right)^{-1}} \text{ if } \frac{(x-x_0)^2}{\sigma_x^2} < 1\\ 0 \text{ else} \end{cases} \) More...
 
class  ChebyshevIteration
 Preconditioned Chebyshev iteration for solving \( PAx=Pb\). More...
 
struct  ChebyshevPreconditioner
 Chebyshev Polynomial Preconditioner \( C( A)\). More...
 
struct  ClonePtr
 Manager class that invokes the clone() method on the managed ptr when copied. More...
 
struct  Composite
 
struct  CONSTANT
 \( f(x) = f(x,y) = f(x,y,z) = c\) More...
 
struct  ConvertsToButcherTableau
 Convert identifiers to their corresponding dg::ButcherTableau. More...
 
struct  ConvertsToMultistepTableau
 Convert identifiers to their corresponding dg::MultistepTableau. More...
 
struct  ConvertsToShuOsherTableau
 Convert identifiers to their corresponding dg::ShuOsherTableau. More...
 
struct  CooSparseBlockMat
 Coo Sparse Block Matrix format. More...
 
struct  CosXCosY
 \( f(x,y) =B+ A \cos(k_x x) \cos(k_y y) \) More...
 
struct  CosY
 \( f(x,y) =B+ A \cos(k_y y) \) More...
 
struct  CSRAverageFilter
 Average filter that computes the average of all points in the stencil More...
 
struct  CSRMedianFilter
 Compute (lower) Median of input numbers. More...
 
struct  CSRSlopeLimiter
 Generalized slope limiter for dG methods. More...
 
struct  CSRSWMFilter
 Switching median filter. More...
 
struct  CSRSymvFilter
 Test filter that computes the symv csr matrix-vector product if used. More...
 
struct  CudaTag
 CUDA implementation. More...
 
struct  CuspMatrixTag
 One of cusp's matrices, for these only the blas2 transfer and the symv( m,x,y) are implemented. More...
 
struct  CuspVectorTag
 special tag for cusp arrays More...
 
struct  DefaultSolver
 PCG Solver class for solving \( (y-\alpha\hat I(t,y)) = \rho\). More...
 
struct  DenseMatrixTag
 indicate our dense matrix format More...
 
struct  DIRKStep
 Embedded diagonally implicit Runge Kutta time-step with error estimate \( \begin{align} k_i = f\left( t^n + c_i \Delta t, u^n + \Delta t \sum_{j=1}^{i} a_{ij} k_j\right) \\ u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s b_j k_j \\ \tilde u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s \tilde b_j k_j \\ \delta^{n+1} = u^{n+1} - \tilde u^{n+1} = \Delta t\sum_{j=1}^s (b_j-\tilde b_j) k_j \end{align} \). More...
 
struct  Distance
 \( f(x,y) = \sqrt{ (x-x_0)^2 + (y-y_0)^2} \) More...
 
struct  divides
 \( y = x_1/x_2 \) More...
 
struct  divides_equals
 \( y = y/x\) More...
 
class  DLT
 Struct holding coefficients for Discrete Legendre Transformation (DLT) related operations. More...
 
struct  DPolynomialHeaviside
 \( f(x) = \begin{cases} 0 \text{ if } x < x_b-a || x > x_b+a \\ (35 (a + x - x_b)^3 (a - x + x_b)^3)/(32 a^7) \text{ if } |x-x_b| < a \end{cases}\) The derivative of PolynomialHeaviside approximates delta(x) More...
 
class  Elliptic1d
 A 1d negative elliptic differential operator \( -\partial_x ( \chi \partial_x ) \). More...
 
class  Elliptic2d
 A 2d negative elliptic differential operator \( -\nabla \cdot ( \mathbf{\chi}\cdot \nabla ) \). More...
 
class  Elliptic3d
 A 3d negative elliptic differential operator \( -\nabla \cdot ( \mathbf{\chi}\cdot \nabla ) \). More...
 
struct  EllSparseBlockMat
 Ell Sparse Block Matrix format. More...
 
struct  EmbeddedPairSum
 \( y = \sum_i a_i x_i + b y,\quad \tilde y = \sum_i \tilde a_i x_i + \tilde b y \) More...
 
struct  EntireDomain
 The domain that contains all points. More...
 
struct  equals
 \( y=x\) More...
 
struct  ERKStep
 Embedded Runge Kutta explicit time-step with error estimate \( \begin{align} k_i = f\left( t^n + c_i \Delta t, u^n + \Delta t \sum_{j=1}^{i-1} a_{ij} k_j\right) \\ u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s b_j k_j \\ \tilde u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s \tilde b_j k_j \\ \delta^{n+1} = u^{n+1} - \tilde u^{n+1} = \Delta t\sum_{j=1}^s (b_j - \tilde b_j) k_j \end{align} \). More...
 
class  Error
 class intended for the use in throw statements More...
 
struct  Evaluate
 \( f( y, g(x_0, ..., x_s)) \) More...
 
class  EVE
 The Eigen-Value-Estimator (EVE) finds largest Eigenvalue of \( M^{-1}Ax = \lambda_\max x\). More...
 
struct  EXP
 \( f(x) = \exp( x)\) More...
 
struct  ExplicitMultistep
 General explicit linear multistep ODE integrator \( \begin{align} v^{n+1} = \sum_{j=0}^{s-1} a_j v^{n-j} + \Delta t\left(\sum_{j=0}^{s-1}b_j \hat f\left(t^{n}-j\Delta t, v^{n-j}\right)\right) \end{align} \). More...
 
struct  ExponentialFilter
 \( f(i) = \begin{cases} 1 \text{ if } \eta < \eta_c \\ \exp\left( -\alpha \left(\frac{\eta-\eta_c}{1-\eta_c} \right)^{2s}\right) \text { if } \eta \geq \eta_c \\ 0 \text{ else} \\ \eta=\frac{i}{1-n} \end{cases}\) More...
 
struct  ExpProfX
 \( f(x) = f(x,y) = f(x,y,z) = A\exp(-x/L_n) + B \) More...
 
struct  Extrapolation
 Extrapolate a polynomial passing through up to three points. More...
 
struct  Fail
 Indicate failure to converge. More...
 
struct  FilteredERKStep
 EXPERIMENTAL: Filtered Embedded Runge Kutta explicit time-step with error estimate \( \begin{align} k_i = f\left( t^n + c_i \Delta t, \Lambda\Pi \left[u^n + \Delta t \sum_{j=1}^{i-1} a_{ij} k_j\right]\right) \\ u^{n+1} = \Lambda\Pi\left[u^{n} + \Delta t\sum_{j=1}^s b_j k_j\right] \\ \delta^{n+1} = \Delta t\sum_{j=1}^s (\tilde b_j - b_j) k_j \end{align} \). More...
 
struct  FilteredExplicitMultistep
 EXPERIMENTAL: General explicit linear multistep ODE integrator with Limiter / Filter \( \begin{align} \tilde v &= \sum_{j=0}^{s-1} a_j v^{n-j} + \Delta t\left(\sum_{j=0}^{s-1}b_j \hat f\left(t^{n}-j\Delta t, v^{n-j}\right)\right) \\ v^{n+1} &= \Lambda\Pi \left( \tilde v\right) \end{align} \). More...
 
struct  Gaussian
 \( f(x,y) = Ae^{-\left(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2}\right)} \) More...
 
struct  Gaussian3d
 \( f(x,y,z) = Ae^{-\left(\frac{(x-x_0)^2}{2\sigma_x^2} + \frac{(y-y_0)^2}{2\sigma_y^2} + \frac{(z-z_0)^2}{2\sigma_z^2}\right)} \) More...
 
struct  GaussianDamping
 \( f(\psi) = \begin{cases} 1 \text{ if } \psi < \psi_{\max}\\ 0 \text{ if } \psi > (\psi_{\max} + 4\alpha) \\ \exp\left( - \frac{(\psi - \psi_{\max})^2}{2\alpha^2}\right), \text{ else} \end{cases} \) More...
 
struct  GaussianX
 \( f(x,y) = Ae^{-\frac{(x-x_0)^2}{2\sigma_x^2} } \) More...
 
struct  GaussianY
 \( f(x,y) = Ae^{-\frac{(y-y_0)^2}{2\sigma_y^2}} \) More...
 
struct  GaussianZ
 \( f(x,y,z) = Ae^{-\frac{(z-z_0)^2}{2\sigma_z^2}} \) More...
 
struct  GeneralComm
 Perform general gather and its transpose (scatter) operation across processes on distributed vectors using mpi. More...
 
struct  GeneralHelmholtz
 A general Helmholtz-type operator \( (\chi-\alpha F) \). More...
 
struct  Heaviside
 \( f(x) = \begin{cases} 0 \text{ if } x < x_b \\ 1 \text{ else} \end{cases}\) More...
 
struct  Helmholtz2
 DEPRECATED, Matrix class that represents a more general Helmholtz-type operator. More...
 
struct  Histogram
 Compute a histogram on a 1D grid. More...
 
struct  Histogram2D
 Compute a histogram on a 2D grid. More...
 
struct  Horner2d
 \( f(x,y) = \sum_{i=0}^{M-1} \sum_{j=0}^{N-1} c_{iN+j} x^i y^j \) More...
 
struct  IDENTITY
 \( f(x) = x\) More...
 
struct  IdentityFilter
 A filter that does nothing. More...
 
struct  ImExMultistep
 Semi-implicit multistep ODE integrator \( \begin{align} v^{n+1} = \sum_{q=0}^{s-1} a_q v^{n-q} + \Delta t\left[\left(\sum_{q=0}^{s-1}b_q \hat E(t^{n}-q\Delta t, v^{n-q}) + \sum_{q=1}^{s} c_q \hat I( t^n - q\Delta t, v^{n-q})\right) + c_0\hat I(t^{n}+\Delta t, v^{n+1})\right] \end{align} \). More...
 
struct  ImplicitMultistep
 Implicit multistep ODE integrator \( \begin{align} v^{n+1} &= \sum_{i=0}^{s-1} a_i v^{n-i} + \Delta t \sum_{i=1}^{s} c_i\hat I(t^{n+1-i}, v^{n+1-i}) + \Delta t c_{0} \hat I (t + \Delta t, v^{n+1}) \\ \end{align} \). More...
 
struct  InvCoshXsq
 \( f(x,y) =A/\cosh^2(k_x x) \) More...
 
struct  InverseKroneckerTriDiagonal2d
 Fast inverse tridiagonal sparse matrix in 2d \( T_y^{-1}\otimes T_x^{-1}\). More...
 
struct  InverseTensorMultiply2d
 \( y_i \leftarrow \lambda T^{-1}_{ij} x_i + \mu y_i\) More...
 
struct  InverseTensorMultiply3d
 \( y_i \leftarrow \lambda T^{-1}_{ij} x_i + \mu y_i\) More...
 
struct  InverseTriDiagonal
 Fast inverse tridiagonal sparse matrix. More...
 
struct  INVERT
 \( f(x) = 1/x \) More...
 
struct  InvSqrt
 \( f(x) = \frac{1}{\sqrt{x}}\) More...
 
struct  IPolynomialHeaviside
 \( f(x) = \begin{cases} x_b \text{ if } x < x_b-a \\ x_b + ((35 a^3 - 47 a^2 (x - x_b) + 25 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^5)/(256 a^7) \text{ if } |x-x_b| < a \\ x \text{ if } x > x_b + a \end{cases}\) The integral of PolynomialHeaviside approximates xH(x) More...
 
struct  Iris
 \( f(\psi) = \begin{cases} 1 \text{ if } \psi_{\min} < \psi < \psi_{\max}\\ 0 \text{ else} \end{cases}\) More...
 
struct  IslandXY
 \( f(x,y) = \lambda \ln{(\cosh{(x/\lambda) } +\epsilon \cos(y/\lambda)) } \) More...
 
struct  ISNFINITE
 \( f(x) = \mathrm{!std::isfinite(x)}\) More...
 
struct  ISNSANE
 \( f(x) =\begin{cases} \mathrm{true\ if}\ |x| > 10^{100}\\ \mathrm{false\ else} \end{cases}\) More...
 
struct  KroneckerTriDiagonal2d
 Fast tridiagonal sparse matrix in 2d \( T_y\otimes T_x\). More...
 
struct  Lamb
 \( f(x,y) = \begin{cases} 2\lambda U J_1(\lambda r) / J_0(\gamma)\cos(\theta) \text{ for } r<R \\ 0 \text{ else} \end{cases} \) More...
 
struct  LeastSquaresExtrapolation
 Evaluate a least squares fit More...
 
struct  LeastSquaresPreconditioner
 Least Squares Polynomial Preconditioner \( M^{-1} s( AM^{-1})\). More...
 
class  LGMRES
 Functor class for the right preconditioned LGMRES method to solve \( Ax=b\). More...
 
struct  Line
 \( f(x) = y_1\frac{x-x_0}{x_1-x_0} + y_0\frac{x-x_1}{x_0-x_1}\) More...
 
struct  LinearX
 \( f(x) = f(x,y) = f(x,y,z) = ax+b \) More...
 
struct  LinearY
 \( f(x,y) = f(x,y,z) = ay+b \) More...
 
struct  LinearZ
 \( f(x,y,z) = az+b \) More...
 
struct  LN
 \( f(x) = \ln(x)\) More...
 
class  Message
 small class holding a stringstream More...
 
struct  MinMod
 \( f(x_1, x_2, ...) = \begin{cases} \min(x_1, x_2, ...) &\text{ for } x_1, x_2, ... >0 \\ \max(x_1, x_2, ...) &\text{ for } x_1, x_2, ... <0 \\ 0 &\text{ else} \end{cases} \) More...
 
struct  minus_equals
 \( y=y-x\) More...
 
struct  MOD
 \( f(x) = \) x mod m > 0 ? x mod m : x mod m + m More...
 
struct  ModifiedChebyshevPreconditioner
 Approximate inverse Chebyshev Polynomial Preconditioner \( A^{-1} = \frac{c_0}{2} I + \sum_{k=1}^{r}c_kT_k( Z)\). More...
 
struct  MPI_Vector
 mpi Vector class More...
 
struct  MPIDistMat
 Distributed memory matrix class. More...
 
struct  MPIMatrixTag
 indicate one of our mpi matrices More...
 
struct  MPITag
 distributed memory system More...
 
struct  MPIVectorTag
 A distributed vector contains a data container and a MPI communicator. More...
 
struct  MultigridCG2d
 Solve. More...
 
struct  MultiMatrix
 Struct that applies given matrices one after the other. More...
 
struct  MultistepTableau
 Manage coefficients of Multistep methods. More...
 
struct  MultistepTimeloop
 Integrate using a for loop and a fixed non-changeable time-step. More...
 
struct  NearestNeighborComm
 Communicator for asynchronous nearest neighbor communication. More...
 
struct  NestedGrids
 Hold nested grids and provide dg fast interpolation and projection matrices. More...
 
struct  NoPolicyTag
 Indicate that a type does not have an execution policy. More...
 
class  NoRoot1d
 Exception class, that stores boundaries for 1D root finding. More...
 
struct  NotATensorTag
 Indicate that a type is not a tensor. More...
 
struct  OmpTag
 OpenMP parallel execution. More...
 
struct  ONE
 \( f(x) = f(x,y) = f(x,y,z) = 1\) More...
 
struct  OneDimensionalTag
 1d More...
 
class  Operator
 A square nxn matrix. More...
 
struct  PairSum
 \( y = \sum_i a_i x_i \) More...
 
class  PCG
 Preconditioned conjugate gradient method to solve \( Ax=b\). More...
 
struct  Plus
 \( y\leftarrow y+a \) More...
 
struct  PLUS
 \( f(x) = x + c\) More...
 
struct  plus_equals
 \( y=y+x\) More...
 
struct  PointwiseDivide
 \( z\leftarrow ax/y + bz \) More...
 
struct  PointwiseDot
 \( z\leftarrow ax_1y_1+bx_2y_2+gz \) More...
 
struct  Poisson
 Direct discretization of Poisson bracket \( \{ f,g\} \). More...
 
struct  PolynomialHeaviside
 \( f(x) = \begin{cases} 0 \text{ if } x < x_b-a \\ ((16 a^3 - 29 a^2 (x - x_b) + 20 a (x - x_b)^2 - 5 (x - x_b)^3) (a + x - x_b)^4)/(32 a^7) \text{ if } |x-x_b| < a \\ 1 \text{ if } x > x_b + a \end{cases}\) More...
 
struct  PolynomialRectangle
 \( f(x) = \begin{cases} 0 \text{ if } x < x_l-a_l \\ ((16 a_l^3 - 29 a_l^2 (x - x_l) + 20 a_l (x - x_l)^2 - 5 (x - x_l)^3) (a_l + x - x_l)^4)/(32 a_l^7) \text{ if } |x-x_l| < a_l \\ 1 \text{ if } x_l + a_l < x < x_r-a_r \\ ((16 a_r^3 - 29 a_r^2 (x - x_r) + 20 a_r (x - x_r)^2 - 5 (x - x_r)^3) (a_r + x - x_l)^4)/(32 a_r^7) \text{ if } |x-x_r| < a_r \\ 0 \text{ if } x > x_r + a_r \end{cases}\) More...
 
struct  POSVALUE
 \( f(x) = \begin{cases} x \text{ for } x>0 \\ 0 \text{ else} \end{cases} \) More...
 
struct  PsiPupil
 \( f(\psi) = \begin{cases} \psi_{\max} \text{ if } \psi > \psi_{\max} \\ \psi \text{ else} \end{cases}\) More...
 
struct  Pupil
 \( f(\psi) = \begin{cases} 0 \text{ if } \psi > \psi_{\max} \\ 1 \text{ else} \end{cases}\) More...
 
struct  RealCartesianGrid2d
 two-dimensional Grid with Cartesian metric More...
 
struct  RealCartesianGrid3d
 three-dimensional Grid with Cartesian metric More...
 
struct  RealCartesianGridX2d
 two-dimensional GridX with RealCartesian metric More...
 
struct  RealCartesianGridX3d
 three-dimensional GridX with RealCartesian metric More...
 
struct  RealCartesianMPIGrid2d
 The mpi version of RealCartesianGrid2d. More...
 
struct  RealCartesianMPIGrid3d
 The mpi version of RealCartesianGrid3d. More...
 
struct  RealCartesianRefinedGrid2d
 Refined RealCartesian grid. More...
 
struct  RealCartesianRefinedGrid3d
 Refined RealCartesian grid. More...
 
struct  RealCartesianRefinedGridX2d
 Refined X-point grid. More...
 
struct  RealCartesianRefinedGridX3d
 Refined X-point grid. More...
 
struct  RealCylindricalGrid3d
 three-dimensional Grid with Cylindrical metric More...
 
struct  RealCylindricalMPIGrid3d
 the mpi version of RealCylindricalGrid3d More...
 
struct  RealEquidistRefinement
 Cell refinement around a given node. More...
 
struct  RealEquidistXRefinement
 RealEquidistant cell refinement around the X-point. More...
 
struct  RealExponentialRefinement
 The exponential refinement around a node. More...
 
struct  RealExponentialXRefinement
 The exponential refinement around the X-point. More...
 
struct  RealFemRefinement
 Insert equidistant points in between dG nodes. More...
 
struct  RealGrid1d
 1D grid More...
 
struct  RealGrid2d
 The simplest implementation of aRealTopology2d. More...
 
struct  RealGrid3d
 The simplest implementation of aRealTopology3d. More...
 
struct  RealGridX1d
 1D grid for X-point topology More...
 
struct  RealGridX2d
 The simplest implementation of aRealTopologyX2d. More...
 
struct  RealGridX3d
 The simplest implementation of aRealTopologyX3d. More...
 
struct  RealIdentityRefinement
 No refinement. More...
 
struct  RealIdentityXRefinement
 No refinement. More...
 
struct  RealLinearRefinement
 Multiply every cell in the grid by a factor. More...
 
struct  RealMPIGrid2d
 The simplest implementation of aRealMPITopology2d. More...
 
struct  RealMPIGrid3d
 The simplest implementation of aRealMPITopology3d. More...
 
struct  RecursiveVectorTag
 This tag indicates composition/recursion. More...
 
class  RefinedElliptic
 The refined version of Elliptic. More...
 
struct  RowColDistMat
 Distributed memory matrix class, asynchronous communication. More...
 
struct  Scal
 \( y\leftarrow ay \) More...
 
struct  ScalarTag
 
struct  SelfMadeMatrixTag
 Indicates that the type has a member function with the same name and interface (up to the matrix itself of course) as the corresponding blas2 member function, for example void symv( const ContainerType1&, ContainerType2& ); More...
 
struct  SerialTag
 Indicate sequential execution. More...
 
struct  SharedTag
 shared memory system More...
 
struct  SharedVectorTag
 Indicate a contiguous chunk of shared memory. More...
 
struct  ShuOsher
 Shu-Osher fixed-step explicit ODE integrator with Slope Limiter / Filter \( \begin{align} u_0 &= u_n \\ u_i &= \Lambda\Pi \left(\sum_{j=0}^{i-1}\left[ \alpha_{ij} u_j + \Delta t \beta_{ij} f( t_j, u_j)\right]\right)\\ u^{n+1} &= u_s \end{align} \). More...
 
struct  ShuOsherTableau
 Manage coefficients in Shu-Osher form. More...
 
struct  Sign
 \( f(x) = \text{sgn}(x) = \begin{cases} -1 \text{ for } x < 0 \\ 0 \text{ for } x = 0 \\ +1 \text{ for } x > 0 \end{cases}\) More...
 
struct  Simpsons
 Time integration based on Simpson's rule. More...
 
struct  SinglestepTimeloop
 Integrate using a for loop and a fixed time-step. More...
 
struct  SinProfX
 \( f(x) = f(x,y) = f(x,y,z) = B + A(1 - \sin(k_xx )) \) More...
 
struct  SinX
 \( f(x) = f(x,y) = f(x,y,z) =B+ A \sin(k_x x) \) More...
 
struct  SinXCosY
 \( f(x,y) =B+ A \sin(k_x x) \cos(k_y y) \) More...
 
struct  SinXSinY
 \( f(x,y) =B+ A \sin(k_x x) \sin(k_y y) \) More...
 
struct  SinY
 \( f(x,y) =B+ A \sin(k_y y) \) More...
 
struct  SlopeLimiter
 \( \text{up}(v, g_m, g_0, g_p, h_m, h_p ) = \begin{cases} +h_m \Lambda( g_0, g_m) &\text{ if } v \geq 0 \\ -h_p \Lambda( g_p, g_0) &\text{ else} \end{cases} \) More...
 
struct  SlopeLimiterProduct
 \( \text{up}(v, g_m, g_0, g_p, h_m, h_p ) = v \begin{cases} +h_m \Lambda( g_0, g_m) &\text{ if } v \geq 0 \\ -h_p \Lambda( g_p, g_0) &\text{ else} \end{cases} \) More...
 
struct  SparseBlockMatrixTag
 indicate our sparse block matrix format More...
 
struct  SparseTensor
 Class for 2x2 and 3x3 matrices sharing elements. More...
 
struct  SQRT
 \( f(x) = \sqrt{x}\) More...
 
struct  Square
 \( f(x) = x^2\) More...
 
struct  StdMapTag
 
struct  Sum
 \( y = \sum_i x_i \) More...
 
struct  SurjectiveComm
 Perform surjective gather and its transpose (scatter) operation across processes on distributed vectors using mpi. More...
 
struct  TanhProfX
 \( f(x) = B + 0.5 A(1+ \text{sign} \tanh((x-x_b)/\alpha ) ) \) More...
 
struct  TensorDeterminant2d
 \( y = t_{00} t_{11} - t_{10}t_{01} \) More...
 
struct  TensorDeterminant3d
 \( y = t_{00} t_{11}t_{22} + t_{01}t_{12}t_{20} + t_{02}t_{10}t_{21} - t_{02}t_{11}t_{20} - t_{01}t_{10}t_{22} - t_{00}t_{12}t_{21} \) More...
 
struct  TensorDot2d
 \( y = \lambda\mu v_i T_{ij} w_j \) More...
 
struct  TensorDot3d
 \( y = \lambda \mu v_i T_{ij} w_j \) More...
 
struct  TensorMultiply2d
 \( y_i \leftarrow \lambda T_{ij} x_i + \mu y_i\) More...
 
struct  TensorMultiply3d
 \( y_i \leftarrow \lambda T_{ij} x_i + \mu y_i\) More...
 
struct  TensorTraits
 The vector traits. More...
 
struct  TensorTraits< CooSparseBlockMat< T > >
 
struct  TensorTraits< cusp::coo_matrix< I, V, M > >
 
struct  TensorTraits< cusp::csr_matrix< I, V, M > >
 
struct  TensorTraits< cusp::dia_matrix< I, V, M > >
 
struct  TensorTraits< cusp::ell_matrix< I, V, M > >
 
struct  TensorTraits< cusp::hyb_matrix< I, V, M > >
 
struct  TensorTraits< EllSparseBlockMat< T > >
 
struct  TensorTraits< mat::PolChargeN< G, M, V > >
 
struct  TensorTraits< MPI_Vector< container > >
 prototypical MPI vector More...
 
struct  TensorTraits< MPIDistMat< L, C > >
 
struct  TensorTraits< RowColDistMat< LI, LO, C > >
 
struct  TensorTraits< std::array< T, N >, std::enable_if_t< !std::is_arithmetic< T >::value > >
 
struct  TensorTraits< std::array< T, N >, std::enable_if_t< std::is_arithmetic< T >::value > >
 
struct  TensorTraits< std::map< Key, T > >
 Behaves like a RecursiveVector. More...
 
struct  TensorTraits< std::vector< T >, std::enable_if_t< !std::is_arithmetic< T >::value > >
 Prototypical Recursive Vector. More...
 
struct  TensorTraits< std::vector< T >, std::enable_if_t< std::is_arithmetic< T >::value > >
 
struct  TensorTraits< T, std::enable_if_t< std::is_arithmetic< T >::value > >
 Recognize arithmetic types as scalars. More...
 
struct  TensorTraits< thrust::device_vector< T > >
 prototypical Shared Vector with Cuda or Omp Tag More...
 
struct  TensorTraits< thrust::host_vector< T > >
 prototypical Shared Vector with Serial Tag More...
 
struct  TensorTraits< View< ThrustVector > >
 A View has identical value_type and execution_policy as the underlying container. More...
 
struct  ThreeDimensionalTag
 3d More...
 
struct  ThrustVectorTag
 Indicate thrust/std - like behaviour. More...
 
struct  Timer
 Simple tool for performance measuring. More...
 
struct  times_equals
 \( y=xy\) More...
 
struct  TopologyTraits
 
struct  TriDiagonal
 Fast (shared memory) tridiagonal sparse matrix. More...
 
struct  TripletSum
 \( y = \sum_i a_i x_i y_i \) More...
 
struct  TwoDimensionalTag
 2d More...
 
struct  Upwind
 \( \text{up}(v, b, f ) = \begin{cases} b &\text{ if } v \geq 0 \\ f &\text{ else} \end{cases} \) More...
 
struct  UpwindProduct
 \( \text{up}(v, b, f ) = v \begin{cases} b &\text{ if } v \geq 0 \\ f &\text{ else} \end{cases} \) More...
 
struct  VanLeer
 \( f(x_1,x_2) = 2\begin{cases} \frac{x_1x_2}{x_1+x_2} &\text{ if } x_1x_2 > 0 \\ 0 & \text { else } \end{cases} \) More...
 
struct  View
 A vector view class, usable in dg functions. More...
 
struct  Vortex
 \(f(x,y) =\begin{cases} \frac{u_d}{1.2965125} \left( r\left(1+\frac{\beta_i^2}{g_i^2}\right) - R \frac{\beta_i^2}{g_i^2} \frac{J_1(g_ir/R)}{J_1(g_i)}\right)\cos(\theta) \text{ if } r < R \\ \frac{u_d}{1.2965125} R \frac{K_1(\beta_i {r}/{R})}{K_1(\beta)} \cos(\theta) \text{ else } \end{cases} \) More...
 
struct  WallDistance
 Shortest Distance to a collection of vertical and horizontal lines. More...
 
struct  ZERO
 \( f(x) = f(x,y) = f(x,y,z) = 0\) More...
 

Typedefs

template<class value_type >
using EllSparseBlockMatDevice = EllSparseBlockMat< value_type >
 
template<class value_type >
using CooSparseBlockMatDevice = CooSparseBlockMat< value_type >
 
template<class Vector >
using get_value_type = typename TensorTraits< std::decay_t< Vector > >::value_type
 
template<class Vector >
using get_tensor_category = typename TensorTraits< std::decay_t< Vector > >::tensor_category
 
template<class Vector >
using get_execution_policy = typename TensorTraits< std::decay_t< Vector > >::execution_policy
 
template<class T >
using HVec_t = thrust::host_vector< T >
 Host Vector. More...
 
using HVec = thrust::host_vector< double >
 Host Vector. More...
 
using iHVec = thrust::host_vector< int >
 integer Host Vector More...
 
using fHVec = thrust::host_vector< float >
 Host Vector. More...
 
using DVec = thrust::device_vector< double >
 Device Vector. The device can be an OpenMP parallelized cpu or a gpu. This depends on the value of the macro THRUST_DEVICE_SYSTEM, which can be either THRUST_DEVICE_SYSTEM_OMP for openMP or THRUST_DEVICE_SYSTEM_CUDA for a gpu or THRUST_DEVICE_SYSTEM_CPP for a cpu. More...
 
using iDVec = thrust::device_vector< int >
 integer Device Vector More...
 
using fDVec = thrust::device_vector< float >
 Device Vector. The device can be an OpenMP parallelized cpu or a gpu. This depends on the value of the macro THRUST_DEVICE_SYSTEM, which can be either THRUST_DEVICE_SYSTEM_OMP for openMP or THRUST_DEVICE_SYSTEM_CUDA for a gpu or THRUST_DEVICE_SYSTEM_CPP for a cpu. More...
 
template<class T >
using HMatrix_t = EllSparseBlockMat< T >
 
using HMatrix = EllSparseBlockMat< double >
 Host Matrix for derivatives. More...
 
using fHMatrix = EllSparseBlockMat< float >
 Host Matrix for derivatives. More...
 
using DMatrix = EllSparseBlockMatDevice< double >
 Device Matrix for derivatives. More...
 
using fDMatrix = EllSparseBlockMatDevice< float >
 Device Matrix for derivatives. More...
 
template<class real_type >
using IHMatrix_t = cusp::csr_matrix< int, real_type, cusp::host_memory >
 
template<class real_type >
using IDMatrix_t = cusp::csr_matrix< int, real_type, cusp::device_memory >
 
using IHMatrix = IHMatrix_t< double >
 
using IDMatrix = IDMatrix_t< double >
 
template<class T >
using MHVec_t = dg::MPI_Vector< dg::HVec_t< T > >
 MPI Host Vector s.a. dg::HVec_t. More...
 
using MHVec = dg::MPI_Vector< dg::HVec >
 MPI Host Vector s.a. dg::HVec. More...
 
using fMHVec = dg::MPI_Vector< dg::fHVec >
 MPI Host Vector s.a. dg::fHVec. More...
 
using MDVec = dg::MPI_Vector< dg::DVec >
 MPI Device Vector s.a. dg::DVec. More...
 
using fMDVec = dg::MPI_Vector< dg::fDVec >
 MPI Device Vector s.a. dg::fDVec. More...
 
template<class T >
using NNCH = dg::NearestNeighborComm< dg::iHVec, thrust::host_vector< const T * >, thrust::host_vector< T > >
 host Communicator for the use in an mpi matrix for derivatives More...
 
template<class T >
using NNCD = dg::NearestNeighborComm< dg::iDVec, thrust::device_vector< const T * >, thrust::device_vector< T > >
 host Communicator for the use in an mpi matrix for derivatives More...
 
using dNNCH = dg::NNCH< double >
 host Communicator for the use in an mpi matrix for derivatives More...
 
using fNNCH = dg::NNCH< float >
 host Communicator for the use in an mpi matrix for derivatives More...
 
using dNNCD = dg::NNCD< double >
 device Communicator for the use in an mpi matrix for derivatives More...
 
using fNNCD = dg::NNCD< float >
 device Communicator for the use in an mpi matrix for derivatives More...
 
template<class T >
using CooMat_t = dg::CooSparseBlockMat< T >
 
using CooMat = dg::CooSparseBlockMat< double >
 
using fCooMat = dg::CooSparseBlockMat< float >
 
using DCooMat = dg::CooSparseBlockMatDevice< double >
 
using fDCooMat = dg::CooSparseBlockMatDevice< float >
 
template<class T >
using MHMatrix_t = dg::RowColDistMat< dg::HMatrix_t< T >, dg::CooMat_t< T >, dg::NNCH< T > >
 MPI Host Matrix for derivatives. More...
 
using MHMatrix = dg::RowColDistMat< dg::HMatrix, dg::CooMat, dg::dNNCH >
 MPI Host Matrix for derivatives. More...
 
using fMHMatrix = dg::RowColDistMat< dg::fHMatrix, dg::fCooMat, dg::fNNCH >
 MPI Host Matrix for derivatives. More...
 
using MDMatrix = dg::RowColDistMat< dg::DMatrix, dg::DCooMat, dg::dNNCD >
 MPI Device Matrix for derivatives. More...
 
using fMDMatrix = dg::RowColDistMat< dg::fDMatrix, dg::fDCooMat, dg::fNNCD >
 MPI Device Matrix for derivatives. More...
 
template<class real_type >
using MIHMatrix_t = MPIDistMat< IHMatrix_t< real_type >, GeneralComm< dg::iHVec, thrust::host_vector< real_type > > >
 
template<class real_type >
using MIDMatrix_t = MPIDistMat< IDMatrix_t< real_type >, GeneralComm< dg::iDVec, thrust::device_vector< real_type > > >
 
using MIHMatrix = MIHMatrix_t< double >
 
using MIDMatrix = MIDMatrix_t< double >
 
using aGeometry2d = dg::aRealGeometry2d< double >
 
using aGeometry3d = dg::aRealGeometry3d< double >
 
using aProductGeometry3d = dg::aRealProductGeometry3d< double >
 
using CartesianGrid2d = dg::RealCartesianGrid2d< double >
 
using CartesianGrid3d = dg::RealCartesianGrid3d< double >
 
using CylindricalGrid3d = dg::RealCylindricalGrid3d< double >
 
using CartesianGridX2d = dg::RealCartesianGridX2d< double >
 
using CartesianGridX3d = dg::RealCartesianGridX3d< double >
 
using aGeometryX2d = dg::aRealGeometryX2d< double >
 
using aGeometryX3d = dg::aRealGeometryX3d< double >
 
using Grid1d = dg::RealGrid1d< double >
 
using Grid2d = dg::RealGrid2d< double >
 
using Grid3d = dg::RealGrid3d< double >
 
using aTopology2d = dg::aRealTopology2d< double >
 
using aTopology3d = dg::aRealTopology3d< double >
 
using GridX1d = dg::RealGridX1d< double >
 
using GridX2d = dg::RealGridX2d< double >
 
using GridX3d = dg::RealGridX3d< double >
 
using aTopologyX2d = dg::aRealTopologyX2d< double >
 
using aTopologyX3d = dg::aRealTopologyX3d< double >
 
using aMPIGeometry2d = dg::aRealMPIGeometry2d< double >
 
using aMPIGeometry3d = dg::aRealMPIGeometry3d< double >
 
using aProductMPIGeometry3d = dg::aRealProductMPIGeometry3d< double >
 
using CartesianMPIGrid2d = dg::RealCartesianMPIGrid2d< double >
 
using CartesianMPIGrid3d = dg::RealCartesianMPIGrid3d< double >
 
using CylindricalMPIGrid3d = dg::RealCylindricalMPIGrid3d< double >
 
using MPIGrid2d = dg::RealMPIGrid2d< double >
 
using MPIGrid3d = dg::RealMPIGrid3d< double >
 
using aMPITopology2d = dg::aRealMPITopology2d< double >
 
using aMPITopology3d = dg::aRealMPITopology3d< double >
 
using aRefinement1d = dg::aRealRefinement1d< double >
 
using IdentityRefinement = dg::RealIdentityRefinement< double >
 
using FemRefinement = dg::RealFemRefinement< double >
 
using LinearRefinement = dg::RealLinearRefinement< double >
 
using EquidistRefinement = dg::RealEquidistRefinement< double >
 
using ExponentialRefinement = dg::RealExponentialRefinement< double >
 
using CartesianRefinedGrid2d = dg::RealCartesianRefinedGrid2d< double >
 
using CartesianRefinedGrid3d = dg::RealCartesianRefinedGrid3d< double >
 
using aRefinementX2d = dg::aRealRefinementX2d< double >
 
using IdentityXRefinement = dg::RealIdentityXRefinement< double >
 
using EquidistXRefinement = dg::RealEquidistXRefinement< double >
 
using ExponentialXRefinement = dg::RealExponentialXRefinement< double >
 
using CartesianRefinedGridX2d = dg::RealCartesianRefinedGridX2d< double >
 
using CartesianRefinedGridX3d = dg::RealCartesianRefinedGridX3d< double >
 
template<class MPIContainer >
using get_mpi_view_type = std::conditional_t< std::is_const< MPIContainer >::value, MPI_Vector< View< const typename MPIContainer::container_type > >, MPI_Vector< View< typename MPIContainer::container_type > > >
 
template<class ContainerType >
using FixedPointIteration = AndersonAcceleration< ContainerType >
 If you are looking for fixed point iteration: it is a special case of Anderson Acceleration. More...
 
template<class Geometry , class Matrix , class Container >
using Elliptic = Elliptic2d< Geometry, Matrix, Container >
 A 2d negative elliptic differential operator \( -\nabla \cdot ( \mathbf{\chi}\cdot \nabla ) \). More...
 
template<class Geometry , class Matrix , class Container >
using Helmholtz = GeneralHelmholtz< dg::Elliptic2d< Geometry, Matrix, Container >, Container >
 a 2d Helmholtz opereator \( (\chi - \alpha F)\) with \( F = -\Delta\) More...
 
template<class Geometry , class Matrix , class Container >
using Helmholtz1d = GeneralHelmholtz< dg::Elliptic1d< Geometry, Matrix, Container >, Container >
 a 1d Helmholtz opereator \( (\chi - \alpha F)\) with \( F = -\partial_x^2\) More...
 
template<class Geometry , class Matrix , class Container >
using Helmholtz2d = GeneralHelmholtz< dg::Elliptic2d< Geometry, Matrix, Container >, Container >
 a 2d Helmholtz opereator \( (\chi - \alpha F)\) with \( F = -\Delta\) More...
 
template<class Geometry , class Matrix , class Container >
using Helmholtz3d = GeneralHelmholtz< dg::Elliptic3d< Geometry, Matrix, Container >, Container >
 a 3d Helmholtz opereator \( (\chi - \alpha F)\) with \( F = -\Delta\) More...
 
template<class ContainerType >
using RungeKutta = ERKStep< ContainerType >
 Runge-Kutta fixed-step explicit ODE integrator \( \begin{align} k_i = f\left( t^n + c_i \Delta t, u^n + \Delta t \sum_{j=1}^{i-1} a_{ij} k_j\right) \\ u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s b_j k_j \end{align} \). More...
 
template<class ContainerType >
using FilteredRungeKutta = FilteredERKStep< ContainerType >
 Filtered Runge-Kutta fixed-step explicit ODE integrator \( \begin{align} k_i = f\left( t^n + c_i \Delta t, \Lambda\Pi \left[u^n + \Delta t \sum_{j=1}^{i-1} a_{ij} k_j\right]\right) \\ u^{n+1} = \Lambda\Pi\left[u^{n} + \Delta t\sum_{j=1}^s b_j k_j\right] \end{align} \). More...
 
template<class ContainerType >
using ImplicitRungeKutta = DIRKStep< ContainerType >
 Runge-Kutta fixed-step implicit ODE integrator \( \begin{align} k_i = f\left( t^n + c_i \Delta t, u^n + \Delta t \sum_{j=1}^{s} a_{ij} k_j\right) \\ u^{n+1} = u^{n} + \Delta t\sum_{j=1}^s b_j k_j \end{align} \). More...
 

Enumerations

enum  dist_type { row_dist =0 , col_dist =1 }
 Type of distribution of MPI distributed matrices. More...
 
enum  bc {
  PER = 0 , DIR = 1 , DIR_NEU = 2 , NEU_DIR = 3 ,
  NEU = 4
}
 Switch between boundary conditions. More...
 
enum  direction { forward , backward , centered }
 Direction of a discrete derivative. More...
 
enum  space { lspace , xspace }
 Space of DG coefficients. More...
 
enum class  coo2d : char { coo2d::x = 'x' , coo2d::y = 'y' }
 2d coordinates More...
 
enum class  coo3d : char {
  coo3d::x = 'x' , coo3d::y = 'y' , coo3d::z = 'z' , coo3d::xy = 'a' ,
  coo3d::yz = 'b' , coo3d::xz = 'c'
}
 3d contra- and covariant coordinates More...
 
enum  multistep_identifier {
  IMEX_EULER_1_1 , IMEX_ADAMS_2_2 , IMEX_ADAMS_3_3 , IMEX_KOTO_2_2 ,
  IMEX_BDF_2_2 , IMEX_BDF_3_3 , IMEX_BDF_4_4 , IMEX_BDF_5_5 ,
  IMEX_BDF_6_6 , IMEX_TVB_3_3 , IMEX_TVB_4_4 , IMEX_TVB_5_5 ,
  AB_1_1 , AB_2_2 , AB_3_3 , AB_4_4 ,
  AB_5_5 , eBDF_1_1 , eBDF_2_2 , eBDF_3_3 ,
  eBDF_4_4 , eBDF_5_5 , eBDF_6_6 , TVB_1_1 ,
  TVB_2_2 , TVB_3_3 , TVB_4_4 , TVB_5_5 ,
  TVB_6_6 , SSP_1_1 , SSP_2_2 , SSP_3_2 ,
  SSP_4_2 , SSP_5_3 , SSP_6_3 , BDF_1_1 ,
  BDF_2_2 , BDF_3_3 , BDF_4_4 , BDF_5_5 ,
  BDF_6_6
}
 Identifiers for Multistep Tableaus. More...
 
enum class  to { to::exact , to::at_least }
 Switch for the Timeloop integrate function. More...
 
enum  tableau_identifier {
  EXPLICIT_EULER_1_1 , MIDPOINT_2_2 , KUTTA_3_3 , CLASSIC_4_4 ,
  HEUN_EULER_2_1_2 , CAVAGLIERI_3_1_2 , FEHLBERG_3_2_3 , FEHLBERG_4_2_3 ,
  BOGACKI_SHAMPINE_4_2_3 , CAVAGLIERI_4_2_3 , ARK324L2SA_ERK_4_2_3 , ZONNEVELD_5_3_4 ,
  ARK436L2SA_ERK_6_3_4 , SAYFY_ABURUB_6_3_4 , CASH_KARP_6_4_5 , FEHLBERG_6_4_5 ,
  DORMAND_PRINCE_7_4_5 , TSITOURAS09_7_4_5 , TSITOURAS11_7_4_5 , ARK548L2SA_ERK_8_4_5 ,
  VERNER_9_5_6 , VERNER_10_6_7 , FEHLBERG_13_7_8 , DORMAND_PRINCE_13_7_8 ,
  FEAGIN_17_8_10 , IMPLICIT_EULER_1_1 , IMPLICIT_MIDPOINT_1_2 , TRAPEZOIDAL_2_2 ,
  SDIRK_2_1_2 , CAVAGLIERI_IMPLICIT_3_1_2 , BILLINGTON_3_3_2 , TRBDF2_3_3_2 ,
  SANCHEZ_3_3 , KVAERNO_4_2_3 , SDIRK_4_2_3 , CAVAGLIERI_IMPLICIT_4_2_3 ,
  ARK324L2SA_DIRK_4_2_3 , SANCHEZ_3_4 , CASH_5_2_4 , CASH_5_3_4 ,
  SDIRK_5_3_4 , KVAERNO_5_3_4 , ARK436L2SA_DIRK_6_3_4 , KVAERNO_7_4_5 ,
  SANCHEZ_6_5 , ARK548L2SA_DIRK_8_4_5 , SANCHEZ_7_6 , SSPRK_2_2 ,
  SSPRK_3_2 , SSPRK_3_3 , SSPRK_5_3 , SSPRK_5_4
}
 Identifiers for Butcher Tableaus. More...
 

Functions

template<class ContainerType >
void transpose (unsigned nx, unsigned ny, const ContainerType &in, ContainerType &out)
 Transpose vector. More...
 
template<class ContainerType >
void extend_line (unsigned nx, unsigned ny, const ContainerType &in, ContainerType &out)
 Copy a line into rows of output vector. More...
 
template<class ContainerType >
void extend_column (unsigned nx, unsigned ny, const ContainerType &in, ContainerType &out)
 Copy a line into columns of output vector. More...
 
template<class ContainerType >
auto asDenseMatrix (const std::vector< const ContainerType * > &in)
 Lightweight DenseMatrix for dg::blas2::gemv. More...
 
template<class ContainerType >
auto asDenseMatrix (const std::vector< const ContainerType * > &in, unsigned size)
 Lightweight DenseMatrix for dg::blas2::gemv. More...
 
template<class ContainerType >
std::vector< const ContainerType * > asPointers (const std::vector< ContainerType > &in)
 Convert a vector of vectors to a vector of pointers. More...
 
static void abort_program (int code=-1)
 Abort program (both MPI and non-MPI) More...
 
static void mpi_init (int argc, char *argv[])
 Convencience shortcut: Calls MPI_Init or MPI_Init_thread. More...
 
static void mpi_init2d (dg::bc bcx, dg::bc bcy, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processses and create Cartesian MPI communicator. More...
 
static void mpi_init2d (unsigned &n, unsigned &Nx, unsigned &Ny, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processes and broadcast to process group. More...
 
static void mpi_init2d (dg::bc bcx, dg::bc bcy, unsigned &n, unsigned &Nx, unsigned &Ny, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processses and grid size and create Cartesian MPI communicator. More...
 
static void mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processses and create Cartesian MPI communicator. More...
 
static void mpi_init3d (unsigned &n, unsigned &Nx, unsigned &Ny, unsigned &Nz, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processes and broadcast to process group. More...
 
static void mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, unsigned &n, unsigned &Nx, unsigned &Ny, unsigned &Nz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 Read in number of processses and grid size and create Cartesian MPI communicator. More...
 
template<class Matrix >
Matrix transpose (const Matrix &src)
 Generic matrix transpose method. More...
 
template<class Functor , class real_type >
thrust::host_vector< real_type > pullback (const Functor &f, const aRealGeometryX2d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
 
template<class Functor , class real_type >
thrust::host_vector< real_type > pullback (const Functor &f, const aRealGeometryX3d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
 
template<class UnaryOp , class real_type >
thrust::host_vector< real_type > evaluate (UnaryOp f, const RealGrid1d< real_type > &g)
 Evaluate a 1d function on grid coordinates. More...
 
template<class BinaryOp , class real_type >
thrust::host_vector< real_type > evaluate (const BinaryOp &f, const aRealTopology2d< real_type > &g)
 Evaluate a 2d function on grid coordinates. More...
 
template<class TernaryOp , class real_type >
thrust::host_vector< real_type > evaluate (const TernaryOp &f, const aRealTopology3d< real_type > &g)
 Evaluate a 3d function on grid coordinates. More...
 
template<class real_type >
thrust::host_vector< real_type > integrate (const thrust::host_vector< real_type > &in, const RealGrid1d< real_type > &g, dg::direction dir=dg::forward)
 Indefinite integral of a function on a grid. More...
 
template<class UnaryOp , class real_type >
thrust::host_vector< real_type > integrate (UnaryOp f, const RealGrid1d< real_type > &g, dg::direction dir=dg::forward)
 Indefinite integral of a function on a grid. More...
 
template<class UnaryOp , class real_type >
thrust::host_vector< real_type > evaluate (UnaryOp f, const RealGridX1d< real_type > &g)
 Evaluate a 1d function on grid coordinates. More...
 
template<class BinaryOp , class real_type >
thrust::host_vector< real_type > evaluate (const BinaryOp &f, const aRealTopologyX2d< real_type > &g)
 Evaluate a 2d function on grid coordinates. More...
 
template<class TernaryOp , class real_type >
thrust::host_vector< real_type > evaluate (const TernaryOp &f, const aRealTopologyX3d< real_type > &g)
 Evaluate a 3d function on grid coordinates. More...
 
template<class real_type >
thrust::host_vector< real_type > forward_transform (const thrust::host_vector< real_type > &in, const aRealTopology2d< real_type > &g)
 Transform a vector from dg::xspace (nodal values) to dg::lspace (modal values) More...
 
static DG_DEVICE double one (double x)
 \( f(x) = 1\) More...
 
static DG_DEVICE double one (double x, double y)
 \( f(x,y) = 1\) More...
 
static DG_DEVICE double one (double x, double y, double z)
 \( f(x,y,z) = 1\) More...
 
static DG_DEVICE double zero (double x)
 \( f(x) = 0\) More...
 
static DG_DEVICE double zero (double x, double y)
 \( f(x,y) = 0\) More...
 
static DG_DEVICE double zero (double x, double y, double z)
 \( f(x,y,z) = 0\) More...
 
static DG_DEVICE double cooX1d (double x)
 \( f(x) = x\) More...
 
static DG_DEVICE double cooX2d (double x, double y)
 \( f(x,y) = x\) More...
 
static DG_DEVICE double cooX3d (double x, double y, double z)
 \( f(x,y,z) = x\) More...
 
static DG_DEVICE double cooY2d (double x, double y)
 \( f(x,y) = y\) More...
 
static DG_DEVICE double cooY3d (double x, double y, double z)
 \( f(x,y,z) = y\) More...
 
static DG_DEVICE double cooZ3d (double x, double y, double z)
 \( f(x,y,z) = z\) More...
 
static DG_DEVICE double cooRZP2X (double R, double Z, double P)
 \( x = R\sin(\varphi)\) More...
 
static DG_DEVICE double cooRZP2Y (double R, double Z, double P)
 \( y = R\cos(\varphi)\) More...
 
static DG_DEVICE double cooRZP2Z (double R, double Z, double P)
 \( z = Z\) More...
 
static DG_DEVICE float one (float x)
 \( f(x) = 1\) More...
 
static DG_DEVICE float one (float x, float y)
 \( f(x,y) = 1\) More...
 
static DG_DEVICE float one (float x, float y, float z)
 \( f(x,y,z) = 1\) More...
 
static DG_DEVICE float zero (float x)
 \( f(x) = 0\) More...
 
static DG_DEVICE float zero (float x, float y)
 \( f(x,y) = 0\) More...
 
static DG_DEVICE float zero (float x, float y, float z)
 \( f(x,y,z) = 0\) More...
 
template<class real_type >
real_type interpolate (dg::space sp, const thrust::host_vector< real_type > &v, real_type x, const RealGrid1d< real_type > &g, dg::bc bcx=dg::NEU)
 Interpolate a vector on a single point on a 1d Grid. More...
 
template<class real_type >
real_type interpolate (dg::space sp, const thrust::host_vector< real_type > &v, real_type x, real_type y, const aRealTopology2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU)
 Interpolate a vector on a single point on a 2d Grid. More...
 
template<class real_type >
real_type interpolate (dg::space sp, const thrust::host_vector< real_type > &v, real_type x, real_type y, const aRealTopologyX2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU)
 Interpolate a vector on a single point on a 2d Grid. More...
 
template<class BinaryOp , class real_type >
MPI_Vector< thrust::host_vector< real_type > > evaluate (const BinaryOp &f, const aRealMPITopology2d< real_type > &g)
 Evaluate a 2d function on mpi distributed grid coordinates. More...
 
template<class TernaryOp , class real_type >
MPI_Vector< thrust::host_vector< real_type > > evaluate (const TernaryOp &f, const aRealMPITopology3d< real_type > &g)
 Evaluate a 3d function on mpi distributed grid coordinates. More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > global2local (const thrust::host_vector< real_type > &global, const aRealMPITopology3d< real_type > &g)
 Take the relevant local part of a global vector. More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > global2local (const thrust::host_vector< real_type > &global, const aRealMPITopology2d< real_type > &g)
 Take the relevant local part of a global vector. More...
 
template<class ConversionPolicy , class real_type >
dg::MIHMatrix_t< real_type > convert (const dg::IHMatrix_t< real_type > &global, const ConversionPolicy &policy)
 Convert a (row-distributed) matrix with local row and global column indices to a row distributed MPI matrix. More...
 
template<class ConversionPolicy , class real_type >
dg::IHMatrix_t< real_type > convertGlobal2LocalRows (const dg::IHMatrix_t< real_type > &global, const ConversionPolicy &policy)
 Convert a (column-distributed) matrix with global row and column indices to a row distributed matrix. More...
 
template<class ConversionPolicy , class real_type >
void convertLocal2GlobalCols (dg::IHMatrix_t< real_type > &local, const ConversionPolicy &policy)
 Convert a matrix with local column indices to a matrix with global column indices. More...
 
template<class T >
dg::Operator< T > invert (const dg::Operator< T > &in)
 Alias for dg::create::inverse. Compute inverse of square matrix. More...
 
template<class T >
Operator< T > tensorproduct (const Operator< T > &op1, const Operator< T > &op2)
 Form the tensor product between two operators. More...
 
template<class T >
cusp::coo_matrix< int, T, cusp::host_memory > tensorproduct (unsigned N, const Operator< T > &op)
 Tensor product between Identity matrix and an operator. More...
 
template<class T >
cusp::coo_matrix< int, T, cusp::host_memory > sandwich (const Operator< T > &left, const cusp::coo_matrix< int, T, cusp::host_memory > &m, const Operator< T > &right)
 Multiply 1d matrices by diagonal block matrices from left and right. More...
 
template<class T >
gcd (T a, T b)
 Greatest common divisor. More...
 
template<class T >
lcm (T a, T b)
 Least common multiple. More...
 
template<class SharedContainer , class real_type >
void split (SharedContainer &in, std::vector< View< SharedContainer > > &out, const aRealTopology3d< real_type > &grid)
 Split a vector into planes along the last dimension (fast version) More...
 
template<class SharedContainer , class real_type >
std::vector< View< SharedContainer > > split (SharedContainer &in, const aRealTopology3d< real_type > &grid)
 Split a vector into planes along the last dimension (construct version) More...
 
template<class Container , class real_type >
void assign3dfrom2d (const thrust::host_vector< real_type > &in2d, Container &out, const aRealTopology3d< real_type > &grid)
 Construct a 3d vector given a 2d host vector. More...
 
template<class MPIContainer , class real_type >
void split (MPIContainer &in, std::vector< get_mpi_view_type< MPIContainer > > &out, const aRealMPITopology3d< real_type > &grid)
 MPI Version of split (fast version) More...
 
template<class MPIContainer , class real_type >
std::vector< get_mpi_view_type< MPIContainer > > split (MPIContainer &in, const aRealMPITopology3d< real_type > &grid)
 MPI Version of split (construct version) More...
 
template<class LocalContainer , class real_type >
void assign3dfrom2d (const MPI_Vector< thrust::host_vector< real_type > > &in2d, MPI_Vector< LocalContainer > &out, const aRealMPITopology3d< real_type > &grid)
 MPI Version of assign3dfrom2d. More...
 
template<class Functor , class real_type >
thrust::host_vector< real_type > pullback (const Functor &f, const aRealGeometry2d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
 
template<class Functor , class real_type >
thrust::host_vector< real_type > pullback (const Functor &f, const aRealGeometry3d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
 
template<class Functor , class real_type >
MPI_Vector< thrust::host_vector< real_type > > pullback (const Functor &f, const aRealMPIGeometry2d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
 
template<class Functor , class real_type >
MPI_Vector< thrust::host_vector< real_type > > pullback (const Functor &f, const aRealMPIGeometry3d< real_type > &g)
 \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
 
template<class Functor1 , class Functor2 , class container , class Geometry >
void pushForwardPerp (const Functor1 &vR, const Functor2 &vZ, container &vx, container &vy, const Geometry &g)
 \( \bar v = J v\) More...
 
template<class Functor1 , class Functor2 , class Functor3 , class container , class Geometry >
void pushForward (const Functor1 &vR, const Functor2 &vZ, const Functor3 &vPhi, container &vx, container &vy, container &vz, const Geometry &g)
 \( {\bar v} = J v\) More...
 
template<class FunctorRR , class FunctorRZ , class FunctorZZ , class container , class Geometry >
void pushForwardPerp (const FunctorRR &chiRR, const FunctorRZ &chiRZ, const FunctorZZ &chiZZ, SparseTensor< container > &chi, const Geometry &g)
 \( \bar \chi = J \chi J^T\) More...
 
template<class T >
cusp::csr_matrix< int, T, cusp::host_memory > tensorproduct (const cusp::csr_matrix< int, T, cusp::host_memory > &lhs, const cusp::csr_matrix< int, T, cusp::host_memory > &rhs)
 \( L\otimes R\) Form the tensor (Kronecker) product between two matrices More...
 
template<class from_ContainerType , class ContainerType , class ... Params>
void assign (const from_ContainerType &from, ContainerType &to, Params &&... ps)
 Generic way to assign the contents of a from_ContainerType object to a ContainerType object optionally given additional parameters. More...
 
template<class ContainerType , class from_ContainerType , class ... Params>
ContainerType construct (const from_ContainerType &from, Params &&... ps)
 Generic way to construct an object of ContainerType given a from_ContainerType object and optional additional parameters. More...
 
template<class MatrixType , class ContainerType1 , class ContainerType2 >
void apply (get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
 \( y = \alpha M(x) + \beta y \); (alias for dg::blas2::symv) More...
 
template<class MatrixType , class ContainerType1 , class ContainerType2 >
void apply (MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
 \( y = M( x)\); (alias for dg::blas2::symv) More...
 
static std::string bc2str (bc bcx)
 write a string describing boundary condition to an output stream More...
 
static bc str2bc (std::string s)
 convert a string to a bc More...
 
static bc inverse (bc bound)
 invert boundary condition More...
 
static direction str2direction (std::string s)
 convert a string to a direction More...
 
static std::string direction2str (enum direction dir)
 convert a direciton to string More...
 
static direction inverse (direction dir)
 invert direction More...
 
template<class ContainerType0 , class ContainerType1 >
std::vector< double > least_squares (const std::vector< ContainerType0 > &bs, const ContainerType1 &b)
 Compute \( a = (B^T B)^{-1} B^T b\) for given \( B\) and \( a\). More...
 
template<class MatrixType0 , class ContainerType0 , class ContainerType1 , class MatrixType1 , class NestedGrids >
void nested_iterations (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops, NestedGrids &nested_grids)
 Full approximation nested iterations. More...
 
template<class NestedGrids , class MatrixType0 , class MatrixType1 , class MatrixType2 >
void multigrid_cycle (std::vector< MatrixType0 > &ops, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned p)
 EXPERIMENTAL Full approximation multigrid cycle. More...
 
template<class MatrixType0 , class MatrixType1 , class MatrixType2 , class NestedGrids , class ContainerType0 , class ContainerType1 >
void full_multigrid (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, unsigned gamma, unsigned mu)
 EXPERIMENTAL One Full multigrid cycle. More...
 
template<class NestedGrids , class MatrixType0 , class MatrixType1 , class MatrixType2 , class ContainerType0 , class ContainerType1 , class ContainerType2 >
void fmg_solve (std::vector< MatrixType0 > &ops, ContainerType0 &x, const ContainerType1 &b, std::vector< MatrixType1 > &inverse_ops_down, std::vector< MatrixType2 > &inverse_ops_up, NestedGrids &nested_grids, const ContainerType2 &weights, double eps, unsigned gamma)
 EXPERIMENTAL Full multigrid cycles. More...
 
template<typename UnaryOp >
int bisection1d (UnaryOp &op, double &x_min, double &x_max, const double eps)
 Find a root of a 1d function \( f(x) = 0\). More...
 
static std::string to2str (enum to mode)
 Convert integration mode to string. More...
 
bool is_same (double x, double y, double eps=1e-15)
 
bool is_same (float x, float y, float eps=1e-6)
 
bool is_divisable (double a, double b, double eps=1e-15)
 
bool is_divisable (float a, float b, float eps=1e-6)
 
template<class UnaryOp , class Functor >
auto compose (UnaryOp f, Functor g)
 Create Composition functor \( f(g(x_0,x_1,...)) \). More...
 
template<class UnaryOp , typename... Functors>
auto compose (UnaryOp f0, Functors... fs)
 Create Composition funtor of an arbitrary number of functions \( f_0(f_1(f_2( ... f_s(x_0, x_1, ...)))\). More...
 

Variables

static auto l2norm = [] ( const auto& x){ return sqrt( dg::blas1::dot(x,x));}
 Compute \( \sqrt{\sum_i x_i^2}\) using dg::blas1::dot. More...
 
static auto fast_l2norm
 Compute \( \sqrt{\sum_i x_i^2}\) using naive summation. More...
 
static auto i_control
 \( h_{n+1}= h_n \epsilon_n^{-1/p}\) More...
 
static auto pi_control
 \( h_{n+1}= h_n \epsilon_n^{-0.8/p}\epsilon_{n-1}^{0.31/p}\) More...
 
static auto pid_control
 \( h_{n+1}= h_n \epsilon_n^{-0.58/p}\epsilon_{n-1}^{0.21/p}\epsilon_{n-2}^{-0.1/p}\) More...
 
static auto ex_control
 \( h_{n+1} = h_n \epsilon_n^{-0.367/p}(\epsilon_n/\epsilon_{n-1})^{0.268/p} \) More...
 
static auto im_control
 \( h_{n+1} = h_n (h_n/h_{n-1}) \epsilon_n^{-0.98/p}(\epsilon_n/\epsilon_{n-1})^{-0.95/p} \) More...
 
static auto imex_control
 h_{n+1} = |ex_control| < |im_control| ? ex_control : im_control More...
 

Detailed Description

This is the namespace for all functions and classes defined and used by the discontinuous Galerkin library.

Typedef Documentation

◆ CooSparseBlockMatDevice

template<class value_type >
using dg::CooSparseBlockMatDevice = typedef CooSparseBlockMat<value_type>

◆ EllSparseBlockMatDevice

template<class value_type >
using dg::EllSparseBlockMatDevice = typedef EllSparseBlockMat<value_type>