Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Classes | |
struct | dg::MultiMatrix< MatrixType, ContainerType > |
Struct that applies given matrices one after the other. More... | |
Functions | |
template<class real_type > | |
dg::HMatrix_t< real_type > | dg::create::fast_interpolation1d (const RealGrid1d< real_type > &t, unsigned multiplyn, unsigned multiplyNx) |
Create interpolation matrix for integer multipliers. | |
template<class real_type > | |
dg::HMatrix_t< real_type > | dg::create::fast_projection1d (const RealGrid1d< real_type > &t, unsigned dividen, unsigned divideNx) |
Create projecton matrix for integer dividers. | |
template<class real_type > | |
dg::HMatrix_t< real_type > | dg::create::fast_transform1d (const dg::SquareMatrix< real_type > &opx, const RealGrid1d< real_type > &t) |
Create a block-diagonal matrix. | |
template<class real_type , size_t Nd> | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::fast_interpolation (unsigned coord, const aRealTopology< real_type, Nd > &t, unsigned multiplyn, unsigned multiplyNx) |
Create interpolation matrix for integer multipliers. | |
template<class real_type , size_t Nd> | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::fast_projection (unsigned coord, const aRealTopology< real_type, Nd > &t, unsigned dividen, unsigned divideNx) |
Create projecton matrix for integer dividers. | |
template<class real_type , size_t Nd> | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::fast_transform (unsigned coord, const dg::SquareMatrix< real_type > &opx, const aRealTopology< real_type, Nd > &t) |
Create a block-diagonal matrix. | |
template<class real_type , size_t Nd> | |
dg::MHMatrix_t< real_type > | dg::create::fast_interpolation (unsigned coord, const aRealMPITopology< real_type, Nd > &t, unsigned multiplyn, unsigned multiplyNx) |
Create interpolation matrix for integer multipliers. | |
template<class real_type , size_t Nd> | |
dg::MHMatrix_t< real_type > | dg::create::fast_projection (unsigned coord, const aRealMPITopology< real_type, Nd > &t, unsigned dividen, unsigned divideNx) |
Create projecton matrix for integer dividers. | |
template<class real_type , size_t Nd> | |
MHMatrix_t< real_type > | dg::create::fast_transform (unsigned coord, dg::SquareMatrix< real_type > opx, const aRealMPITopology< real_type, Nd > &t) |
Create a block-diagonal matrix. | |
template<class Topology > | |
auto | dg::create::fast_interpolation (const Topology &t, unsigned multiplyn, unsigned multiplyNx, unsigned multiplyNy) |
Create interpolation matrix for integer multipliers in the first 2 grid dimensions. | |
template<class Topology > | |
auto | dg::create::fast_projection (const Topology &t, unsigned dividen, unsigned divideNx, unsigned divideNy) |
Create projection matrix for integer dividers in the first 2 grid dimensions. | |
template<class Topology > | |
auto | dg::create::fast_transform (const dg::SquareMatrix< typename Topology::value_type > &opx, const dg::SquareMatrix< typename Topology::value_type > &opy, const Topology &t) |
Create transform matrix in the first 2 grid dimensions. | |
auto dg::create::fast_interpolation | ( | const Topology & | t, |
unsigned | multiplyn, | ||
unsigned | multiplyNx, | ||
unsigned | multiplyNy ) |
Create interpolation matrix for integer multipliers in the first 2 grid dimensions.
When creating an interpolation from a given dg grid to one that has an integer multiple of cells and/or polynomial coefficients, the resulting interpolation matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose interpolation function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/coarse) grid |
multiplyn | integer multiplier, the new grid has n*multiplyn polynomial coefficients |
multiplyNx | integer multiplier, the new grid has Nx*multiplyNx points |
multiplyNy | integer multiplier, the new grid has Ny*multiplyNy points |
dg::MHMatrix_t< real_type > dg::create::fast_interpolation | ( | unsigned | coord, |
const aRealMPITopology< real_type, Nd > & | t, | ||
unsigned | multiplyn, | ||
unsigned | multiplyNx ) |
Create interpolation matrix for integer multipliers.
When creating an interpolation from a given dg grid to one that has an integer multiple of cells and/or polynomial coefficients, the resulting interpolation matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose interpolation function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/coarse) grid |
multiplyn | integer multiplier, the new grid has n*multiplyn polynomial coefficients |
multiplyNx | integer multiplier, the new grid has Nx*multiplyNx points |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::fast_interpolation | ( | unsigned | coord, |
const aRealTopology< real_type, Nd > & | t, | ||
unsigned | multiplyn, | ||
unsigned | multiplyNx ) |
Create interpolation matrix for integer multipliers.
When creating an interpolation from a given dg grid to one that has an integer multiple of cells and/or polynomial coefficients, the resulting interpolation matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose interpolation function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/coarse) grid |
multiplyn | integer multiplier, the new grid has n*multiplyn polynomial coefficients |
multiplyNx | integer multiplier, the new grid has Nx*multiplyNx points |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
dg::HMatrix_t< real_type > dg::create::fast_interpolation1d | ( | const RealGrid1d< real_type > & | t, |
unsigned | multiplyn, | ||
unsigned | multiplyNx ) |
Create interpolation matrix for integer multipliers.
When creating an interpolation from a given dg grid to one that has an integer multiple of cells and/or polynomial coefficients, the resulting interpolation matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose interpolation function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/coarse) grid |
multiplyn | integer multiplier, the new grid has n*multiplyn polynomial coefficients |
multiplyNx | integer multiplier, the new grid has Nx*multiplyNx points |
auto dg::create::fast_projection | ( | const Topology & | t, |
unsigned | dividen, | ||
unsigned | divideNx, | ||
unsigned | divideNy ) |
Create projection matrix for integer dividers in the first 2 grid dimensions.
When creating a projection from a given dg grid to one that has an integer division of cells and/or polynomial coefficients, the resulting projection matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose projection function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/fine) grid |
dividen | integer divisor, the new grid has n/multiplyn polynomial coefficients |
divideNx | integer divisor, the new grid has Nx/multiplyNx points |
divideNy | integer multiplier, the new grid has Ny/divideNy points |
dg::MHMatrix_t< real_type > dg::create::fast_projection | ( | unsigned | coord, |
const aRealMPITopology< real_type, Nd > & | t, | ||
unsigned | dividen, | ||
unsigned | divideNx ) |
Create projecton matrix for integer dividers.
When creating a projection from a given dg grid to one that has an integer division of cells and/or polynomial coefficients, the resulting projection matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose projection function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/fine) grid |
dividen | integer divisor, the new grid has n/multiplyn polynomial coefficients |
divideNx | integer divisor, the new grid has Nx/multiplyNx points |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::fast_projection | ( | unsigned | coord, |
const aRealTopology< real_type, Nd > & | t, | ||
unsigned | dividen, | ||
unsigned | divideNx ) |
Create projecton matrix for integer dividers.
When creating a projection from a given dg grid to one that has an integer division of cells and/or polynomial coefficients, the resulting projection matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose projection function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/fine) grid |
dividen | integer divisor, the new grid has n/multiplyn polynomial coefficients |
divideNx | integer divisor, the new grid has Nx/multiplyNx points |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
dg::HMatrix_t< real_type > dg::create::fast_projection1d | ( | const RealGrid1d< real_type > & | t, |
unsigned | dividen, | ||
unsigned | divideNx ) |
Create projecton matrix for integer dividers.
When creating a projection from a given dg grid to one that has an integer division of cells and/or polynomial coefficients, the resulting projection matrix fits into our dg::EllSparseBlockMat
format, which is much faster to apply than the full sparse matrix format from the general purpose projection function, especially since it requires no communication from neighboring cells
real_type | a floating point type |
t | The existing (old/fine) grid |
dividen | integer divisor, the new grid has n/multiplyn polynomial coefficients |
divideNx | integer divisor, the new grid has Nx/multiplyNx points |
auto dg::create::fast_transform | ( | const dg::SquareMatrix< typename Topology::value_type > & | opx, |
const dg::SquareMatrix< typename Topology::value_type > & | opy, | ||
const Topology & | t ) |
Create transform matrix in the first 2 grid dimensions.
Create a block-diagonal matrix.
i.e. a matrix that has an \( n \times n \) block on its diagonal
\[ M = \begin{pmatrix} B & & & & & \\ & B & & & & \\ & & B & & & \\ & & & B & & \\ & & &...& & \end{pmatrix} \]
Block diagonal matrices fit into our dg::EllSparseBlockMat
format, which is much faster to apply than a general sparse matrix, especially since it requires no communication from neighboring cells
dg::DLT::forward()
to create a forward transformation from configuration to Legendre space (or from nodal to modal values) in dg::forward_transform real_type | a floating point type |
opx | the block B |
t | The grid determines the number of rows and columns |
opy | the block B for the y transform |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::fast_transform | ( | unsigned | coord, |
const dg::SquareMatrix< real_type > & | opx, | ||
const aRealTopology< real_type, Nd > & | t ) |
Create a block-diagonal matrix.
i.e. a matrix that has an \( n \times n \) block on its diagonal
\[ M = \begin{pmatrix} B & & & & & \\ & B & & & & \\ & & B & & & \\ & & & B & & \\ & & &...& & \end{pmatrix} \]
Block diagonal matrices fit into our dg::EllSparseBlockMat
format, which is much faster to apply than a general sparse matrix, especially since it requires no communication from neighboring cells
dg::DLT::forward()
to create a forward transformation from configuration to Legendre space (or from nodal to modal values) in dg::forward_transform real_type | a floating point type |
opx | the block B |
t | The grid determines the number of rows and columns |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
MHMatrix_t< real_type > dg::create::fast_transform | ( | unsigned | coord, |
dg::SquareMatrix< real_type > | opx, | ||
const aRealMPITopology< real_type, Nd > & | t ) |
Create a block-diagonal matrix.
i.e. a matrix that has an \( n \times n \) block on its diagonal
\[ M = \begin{pmatrix} B & & & & & \\ & B & & & & \\ & & B & & & \\ & & & B & & \\ & & &...& & \end{pmatrix} \]
Block diagonal matrices fit into our dg::EllSparseBlockMat
format, which is much faster to apply than a general sparse matrix, especially since it requires no communication from neighboring cells
dg::DLT::forward()
to create a forward transformation from configuration to Legendre space (or from nodal to modal values) in dg::forward_transform real_type | a floating point type |
opx | the block B |
t | The grid determines the number of rows and columns |
coord | The direction inside the structured grid to which to apply the sparse block matrix. |
dg::HMatrix_t< real_type > dg::create::fast_transform1d | ( | const dg::SquareMatrix< real_type > & | opx, |
const RealGrid1d< real_type > & | t ) |
Create a block-diagonal matrix.
i.e. a matrix that has an \( n \times n \) block on its diagonal
\[ M = \begin{pmatrix} B & & & & & \\ & B & & & & \\ & & B & & & \\ & & & B & & \\ & & &...& & \end{pmatrix} \]
Block diagonal matrices fit into our dg::EllSparseBlockMat
format, which is much faster to apply than a general sparse matrix, especially since it requires no communication from neighboring cells
dg::DLT::forward()
to create a forward transformation from configuration to Legendre space (or from nodal to modal values) in dg::forward_transform real_type | a floating point type |
opx | the block B |
t | The grid determines the number of rows and columns |