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

Contains functions used for matrix creation. More...

Functions

template<class real_type >
EllSparseBlockMat< real_type > dx (const aRealTopology2d< real_type > &g, bc bcx, direction dir=centered)
 Create 2d derivative in x-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const aRealTopology2d< real_type > &g, direction dir=centered)
 Create 2d derivative in x-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dy (const aRealTopology2d< real_type > &g, bc bcy, direction dir=centered)
 Create 2d derivative in y-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dy (const aRealTopology2d< real_type > &g, direction dir=centered)
 Create 2d derivative in y-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpX (const aRealTopology2d< real_type > &g, bc bcx)
 Matrix that contains 2d jump terms in X direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpY (const aRealTopology2d< real_type > &g, bc bcy)
 Matrix that contains 2d jump terms in Y direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpX (const aRealTopology2d< real_type > &g)
 Matrix that contains 2d jump terms in X direction taking boundary conditions from the grid. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpY (const aRealTopology2d< real_type > &g)
 Matrix that contains 2d jump terms in Y direction taking boundary conditions from the grid. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpX (const aRealTopology3d< real_type > &g, bc bcx)
 Matrix that contains jump terms in X direction in 3D. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpY (const aRealTopology3d< real_type > &g, bc bcy)
 Matrix that contains jump terms in Y direction in 3D. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpZ (const aRealTopology3d< real_type > &g, bc bcz)
 Matrix that contains jump terms in Z direction in 3D. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpX (const aRealTopology3d< real_type > &g)
 Matrix that contains 3d jump terms in X direction taking boundary conditions from the grid. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpY (const aRealTopology3d< real_type > &g)
 Matrix that contains 3d jump terms in Y direction taking boundary conditions from the grid. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jumpZ (const aRealTopology3d< real_type > &g)
 Matrix that contains 3d jump terms in Z direction taking boundary conditions from the grid. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const aRealTopology3d< real_type > &g, bc bcx, direction dir=centered)
 Create 3d derivative in x-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const aRealTopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in x-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dy (const aRealTopology3d< real_type > &g, bc bcy, direction dir=centered)
 Create 3d derivative in y-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dy (const aRealTopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in y-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dz (const aRealTopology3d< real_type > &g, bc bcz, direction dir=centered)
 Create 3d derivative in z-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dz (const aRealTopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in z-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dx (const aRealTopologyX2d< real_type > &g, bc bcx, direction dir=centered)
 Create 2d derivative in x-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dx (const aRealTopologyX2d< real_type > &g, direction dir=centered)
 Create 2d derivative in x-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dy (const aRealTopologyX2d< real_type > &g, bc bcy, direction dir=centered)
 Create 2d derivative in y-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dy (const aRealTopologyX2d< real_type > &g, direction dir=centered)
 Create 2d derivative in y-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpX (const aRealTopologyX2d< real_type > &g, bc bcx)
 Matrix that contains 2d jump terms in X direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpY (const aRealTopologyX2d< real_type > &g, bc bcy)
 Matrix that contains 2d jump terms in Y direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpX (const aRealTopologyX2d< real_type > &g)
 Matrix that contains 2d jump terms in X direction taking boundary conditions from the grid. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpY (const aRealTopologyX2d< real_type > &g)
 Matrix that contains 2d jump terms in Y direction taking boundary conditions from the grid. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpX (const aRealTopologyX3d< real_type > &g, bc bcx)
 Matrix that contains jump terms in X direction in 3D. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpY (const aRealTopologyX3d< real_type > &g, bc bcy)
 Matrix that contains jump terms in Y direction in 3D. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpZ (const aRealTopologyX3d< real_type > &g, bc bcz)
 Matrix that contains jump terms in Z direction in 3D. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpX (const aRealTopologyX3d< real_type > &g)
 Matrix that contains 3d jump terms in X direction taking boundary conditions from the grid. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpY (const aRealTopologyX3d< real_type > &g)
 Matrix that contains 3d jump terms in Y direction taking boundary conditions from the grid. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > jumpZ (const aRealTopologyX3d< real_type > &g)
 Matrix that contains 3d jump terms in Z direction taking boundary conditions from the grid. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dx (const aRealTopologyX3d< real_type > &g, bc bcx, direction dir=centered)
 Create 3d derivative in x-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dx (const aRealTopologyX3d< real_type > &g, direction dir=centered)
 Create 3d derivative in x-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dy (const aRealTopologyX3d< real_type > &g, bc bcy, direction dir=centered)
 Create 3d derivative in y-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dy (const aRealTopologyX3d< real_type > &g, direction dir=centered)
 Create 3d derivative in y-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dz (const aRealTopologyX3d< real_type > &g, bc bcz, direction dir=centered)
 Create 3d derivative in z-direction. More...
 
template<class real_type >
Composite< EllSparseBlockMat< real_type > > dz (const aRealTopologyX3d< real_type > &g, direction dir=centered)
 Create 3d derivative in z-direction. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx_symm (int n, int N, real_type h, bc bcx)
 Create and assemble a host Matrix for the centered 1d single derivative. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx_plus (int n, int N, real_type h, bc bcx)
 Create and assemble a host Matrix for the forward 1d single derivative. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx_minus (int n, int N, real_type h, bc bcx)
 Create and assemble a host Matrix for the backward 1d single derivative. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jump (int n, int N, real_type h, bc bcx)
 Create and assemble a host Matrix for the jump terms in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx_normed (int n, int N, real_type h, bc bcx, direction dir)
 Create and assemble a host Matrix for normed derivative in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const RealGrid1d< real_type > &g, bc bcx, direction dir=centered)
 Create and assemble a host Matrix for the derivative in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const RealGrid1d< real_type > &g, direction dir=centered)
 Create and assemble a host Matrix for the derivative in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jump (const RealGrid1d< real_type > &g, bc bcx)
 Create and assemble a host Matrix for the jump in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jump (const RealGrid1d< real_type > &g)
 Create and assemble a host Matrix for the jump in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const RealGridX1d< real_type > &g, bc bcx, direction dir=centered)
 Create and assemble a host Matrix for the derivative in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > dx (const RealGridX1d< real_type > &g, direction dir=centered)
 Create and assemble a host Matrix for the derivative in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jump (const RealGridX1d< real_type > &g, bc bcx)
 Create and assemble a host Matrix for the jump in 1d. More...
 
template<class real_type >
EllSparseBlockMat< real_type > jump (const RealGridX1d< real_type > &g)
 Create and assemble a host Matrix for the jump in 1d. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_interpolation (const RealGrid1d< real_type > &t, unsigned multiplyn, unsigned multiplyNx)
 Create interpolation matrix for integer multipliers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_projection (const RealGrid1d< real_type > &t, unsigned dividen, unsigned divideNx)
 Create projecton matrix for integer dividers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_transform (dg::Operator< real_type > opx, const RealGrid1d< real_type > &t)
 Create a block-diagonal matrix. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_interpolation (enum coo3d direction, const aRealTopology2d< real_type > &t, unsigned multiplyn, unsigned multiplyNx)
 Create interpolation matrix for integer multipliers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_projection (enum coo3d direction, const aRealTopology2d< real_type > &t, unsigned dividen, unsigned divideNx)
 Create projecton matrix for integer dividers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_transform (enum coo3d direction, dg::Operator< real_type > opx, const aRealTopology2d< real_type > &t)
 Create a block-diagonal matrix. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_interpolation (enum coo3d direction, const aRealTopology3d< real_type > &t, unsigned multiplyn, unsigned multiplyNx)
 Create interpolation matrix for integer multipliers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_projection (enum coo3d direction, const aRealTopology3d< real_type > &t, unsigned dividen, unsigned divideNx)
 Create projecton matrix for integer dividers. More...
 
template<class real_type >
dg::HMatrix_t< real_type > fast_transform (enum coo3d direction, dg::Operator< real_type > opx, const aRealTopology3d< real_type > &t)
 Create a block-diagonal matrix. More...
 
template<class real_type >
dg::MHMatrix_t< real_type > fast_interpolation (enum coo3d direction, const aRealMPITopology2d< real_type > &t, unsigned multiplyn, unsigned multiplyNx)
 Create interpolation matrix for integer multipliers. More...
 
template<class real_type >
dg::MHMatrix_t< real_type > fast_projection (enum coo3d direction, const aRealMPITopology2d< real_type > &t, unsigned dividen, unsigned divideNx)
 Create projecton matrix for integer dividers. More...
 
template<class real_type >
MHMatrix_t< real_type > fast_transform (enum coo3d direction, dg::Operator< real_type > opx, const aRealMPITopology2d< real_type > &t)
 Create a block-diagonal matrix. More...
 
template<class real_type >
dg::MHMatrix_t< real_type > fast_interpolation (enum coo3d direction, const aRealMPITopology3d< real_type > &t, unsigned multiplyn, unsigned multiplyNx)
 Create interpolation matrix for integer multipliers. More...
 
template<class real_type >
dg::MHMatrix_t< real_type > fast_projection (enum coo3d direction, const aRealMPITopology3d< real_type > &t, unsigned dividen, unsigned divideNx)
 Create projecton matrix for integer dividers. More...
 
template<class real_type >
MHMatrix_t< real_type > fast_transform (enum coo3d direction, dg::Operator< real_type > opx, const aRealMPITopology3d< real_type > &t)
 Create a block-diagonal matrix. More...
 
template<class Topology >
auto fast_interpolation (const Topology &t, unsigned multiplyn, unsigned multiplyNx, unsigned multiplyNy)
 Create interpolation matrix for integer multipliers. More...
 
template<class Topology >
auto fast_projection (const Topology &t, unsigned dividen, unsigned divideNx, unsigned divideNy)
 Create projecton matrix for integer dividers. More...
 
template<class Topology >
auto fast_transform (dg::Operator< typename Topology::value_type > opx, dg::Operator< typename Topology::value_type > opy, const Topology &t)
 Create a block-diagonal matrix. More...
 
template<class real_type >
dg::TriDiagonal< dg::HVec_t< real_type > > fem_mass (const RealGrid1d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int v_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::TriDiagonal< dg::HVec_t< real_type > > fem_linear2const (const RealGrid1d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int c_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::KroneckerTriDiagonal2d< dg::HVec_t< real_type > > fem_mass (const aRealTopology2d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int v_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::InverseKroneckerTriDiagonal2d< dg::HVec_t< real_type > > inv_fem_mass (const aRealTopology2d< real_type > &g)
 Inverse finite element mass matrix \( S^{-1} \). More...
 
template<class real_type >
dg::KroneckerTriDiagonal2d< dg::HVec_t< real_type > > fem_linear2const (const aRealTopology2d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int c_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::InverseKroneckerTriDiagonal2d< dg::HVec_t< real_type > > inv_fem_linear2const (const aRealTopology2d< real_type > &g)
 Inverse finite element mass matrix \( S^{-1} \). More...
 
template<class real_type >
dg::KroneckerTriDiagonal2d< dg::HVec_t< real_type > > fem_mass2d (const aRealTopology3d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int v_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::InverseKroneckerTriDiagonal2d< dg::HVec_t< real_type > > inv_fem_mass2d (const aRealTopology3d< real_type > &g)
 Inverse finite element mass matrix \( S^{-1} \). More...
 
template<class real_type >
dg::KroneckerTriDiagonal2d< dg::HVec_t< real_type > > fem_linear2const2d (const aRealTopology3d< real_type > &g)
 \( S_{ij} = \frac{1}{w_i}\int c_i(x) v_j(x) \) finite element projection matrix More...
 
template<class real_type >
dg::InverseKroneckerTriDiagonal2d< dg::HVec_t< real_type > > inv_fem_linear2const2d (const aRealTopology3d< real_type > &g)
 Inverse finite element mass matrix \( S^{-1} \). More...
 
template<class real_type >
thrust::host_vector< real_type > fem_weights (const RealGrid1d< real_type > &g)
 finite element weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > fem_inv_weights (const RealGrid1d< real_type > &g)
 inverse finite element weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > fem_weights (const aRealTopology2d< real_type > &g)
 finite element weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > fem_inv_weights (const aRealTopology2d< real_type > &g)
 inverse finite element weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > fem_weights (const aRealTopology3d< real_type > &g)
 finite element weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > fem_inv_weights (const aRealTopology3d< real_type > &g)
 inverse finite element weight coefficients More...
 
template<class UnaryOp , class real_type >
dg::Operator< real_type > modal_filter (UnaryOp op, const DLT< real_type > &dlt)
 Create a modal filter block \( V D V^{-1}\). More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const RealGrid1d< real_type > &g, dg::bc bcx=dg::NEU, std::string method="dg")
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const aRealTopology2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU, std::string method="dg")
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const thrust::host_vector< real_type > &z, const aRealTopology3d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU, dg::bc bcz=dg::PER, std::string method="dg")
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const RealGrid1d< real_type > &g_new, const RealGrid1d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const aRealTopology2d< real_type > &g_new, const aRealTopology2d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const aRealTopology3d< real_type > &g_new, const aRealTopology3d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const aRealTopology3d< real_type > &g_new, const aRealTopology2d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const RealGridX1d< real_type > &g)
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const aRealTopologyX2d< real_type > &g, dg::bc globalbcz=dg::NEU)
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const thrust::host_vector< real_type > &z, const aRealTopologyX3d< real_type > &g, dg::bc globalbcz=dg::NEU)
 Create interpolation matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const RealGridX1d< real_type > &g_new, const RealGridX1d< real_type > &g_old)
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const aRealTopologyX2d< real_type > &g_new, const aRealTopologyX2d< real_type > &g_old)
 Create interpolation between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation (const aRealTopologyX3d< real_type > &g_new, const aRealTopologyX3d< real_type > &g_old)
 Create interpolation between two grids. More...
 
template<class real_type >
thrust::host_vector< real_type > forward_transform (const thrust::host_vector< real_type > &in, const aRealTopologyX2d< real_type > &g)
 Transform a vector from XSPACE to LSPACE. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dx (const aRealMPITopology2d< real_type > &g, bc bcx, direction dir=centered)
 Create a 2d derivative in the x-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dy (const aRealMPITopology2d< real_type > &g, bc bcy, direction dir=centered)
 Create a 2d derivative in the y-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpX (const aRealMPITopology2d< real_type > &g, bc bcx)
 Create a 2d jump in the x-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpY (const aRealMPITopology2d< real_type > &g, bc bcy)
 Create a 2d jump in the y-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dx (const aRealMPITopology3d< real_type > &g, bc bcx, direction dir=centered)
 Create a 3d derivative in the x-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dy (const aRealMPITopology3d< real_type > &g, bc bcy, direction dir=centered)
 Create a 3d derivative in the y-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dz (const aRealMPITopology3d< real_type > &g, bc bcz, direction dir=centered)
 Create a 3d derivative in the z-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpX (const aRealMPITopology3d< real_type > &g, bc bcx)
 Create a 3d jump in the x-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpY (const aRealMPITopology3d< real_type > &g, bc bcy)
 Create a 3d jump in the y-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpZ (const aRealMPITopology3d< real_type > &g, bc bcz)
 Create a 3d jump in the z-direction for mpi. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dx (const aRealMPITopology2d< real_type > &g, direction dir=centered)
 Create 2d derivative in x-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dx (const aRealMPITopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in x-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpX (const aRealMPITopology2d< real_type > &g)
 Create 2d jump in x-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpX (const aRealMPITopology3d< real_type > &g)
 Create 3d jump in x-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dy (const aRealMPITopology2d< real_type > &g, direction dir=centered)
 Create 2d derivative in y-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dy (const aRealMPITopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in y-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpY (const aRealMPITopology2d< real_type > &g)
 Create 2d jump in y-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpY (const aRealMPITopology3d< real_type > &g)
 Create 3d jump in y-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > dz (const aRealMPITopology3d< real_type > &g, direction dir=centered)
 Create 3d derivative in z-direction. More...
 
template<class real_type >
RowColDistMat< EllSparseBlockMat< real_type >, CooSparseBlockMat< real_type >, NNCH< real_type > > jumpZ (const aRealMPITopology3d< real_type > &g)
 Create 3d jump in z-direction. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > interpolation (const aRealMPITopology2d< real_type > &g_new, const aRealMPITopology2d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > interpolation (const aRealMPITopology3d< real_type > &g_new, const aRealMPITopology3d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > interpolation (const aRealMPITopology3d< real_type > &g_new, const aRealMPITopology2d< real_type > &g_old, std::string method="dg")
 Create interpolation between two grids. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > projection (const aRealMPITopology2d< real_type > &g_new, const aRealMPITopology2d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > projection (const aRealMPITopology3d< real_type > &g_new, const aRealMPITopology3d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const aRealMPITopology2d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU, std::string method="dg")
 Create an MPI row distributed interpolation 2d matrix. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > interpolation (const thrust::host_vector< real_type > &x, const thrust::host_vector< real_type > &y, const thrust::host_vector< real_type > &z, const aRealMPITopology3d< real_type > &g, dg::bc bcx=dg::NEU, dg::bc bcy=dg::NEU, dg::bc bcz=dg::PER, std::string method="linear")
 Create an MPI row distributed interpolation 3d matrix. More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > weights (const aRealMPITopology2d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > inv_weights (const aRealMPITopology2d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > weights (const aRealMPITopology2d< real_type > &g, enum coo2d coo)
 nodal weight coefficients More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > weights (const aRealMPITopology3d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > inv_weights (const aRealMPITopology3d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
MPI_Vector< thrust::host_vector< real_type > > weights (const aRealMPITopology3d< real_type > &g, enum coo3d coo)
 nodal weight coefficients More...
 
template<class T >
lu_pivot (dg::Operator< T > &m, std::vector< unsigned > &p)
 LU Decomposition with partial pivoting. More...
 
template<class T >
void lu_solve (const dg::Operator< T > &lu, const std::vector< unsigned > &p, std::vector< T > &b)
 Solve the linear system with the LU decomposition. More...
 
template<class T >
dg::Operator< T > inverse (const dg::Operator< T > &in)
 Compute the inverse of a square matrix. More...
 
template<class real_type >
Operator< real_type > delta (unsigned n)
 Create the unit matrix. More...
 
template<class real_type >
Operator< real_type > pipj (unsigned n)
 Create the S-matrix. More...
 
template<class real_type >
Operator< real_type > pipj_inv (unsigned n)
 Create the T-matrix. More...
 
template<class real_type >
Operator< real_type > pidxpj (unsigned n)
 Create the D-matrix. More...
 
template<class real_type >
Operator< real_type > rirj (unsigned n)
 Create the R-matrix. More...
 
template<class real_type >
Operator< real_type > rilj (unsigned n)
 Create the RL-matrix. More...
 
template<class real_type >
Operator< real_type > lirj (unsigned n)
 Create the LR-matrix. More...
 
template<class real_type >
Operator< real_type > lilj (unsigned n)
 Create the L-matrix. More...
 
template<class real_type >
Operator< real_type > ninj (unsigned n)
 Create the N-matrix. More...
 
template<class real_type >
Operator< real_type > weights (const DLT< real_type > &dlt)
 Construct a diagonal operator with weights. More...
 
template<class real_type >
Operator< real_type > inv_weights (const DLT< real_type > &dlt)
 Construct a diagonal operator with inverse weights. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > diagonal (const thrust::host_vector< real_type > &diagonal)
 Create a diagonal matrix. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const RealGrid1d< real_type > &g_new, const RealGrid1d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const aRealTopology2d< real_type > &g_new, const aRealTopology2d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const aRealTopology3d< real_type > &g_new, const aRealTopology3d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > transformation (const aRealTopology3d< real_type > &g_new, const aRealTopology3d< real_type > &g_old)
 Create a transformation matrix between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > transformation (const aRealTopology2d< real_type > &g_new, const aRealTopology2d< real_type > &g_old)
 Create a transformation matrix between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > transformation (const RealGrid1d< real_type > &g_new, const RealGrid1d< real_type > &g_old)
 Create a transformation matrix between two grids. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backproject (const RealGrid1d< real_type > &g)
 Create a matrix \( PI\) that projects values to an equidistant grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backproject (const aRealTopology2d< real_type > &g)
 Create a matrix \( PI\) that projects values to an equidistant grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backproject (const aRealTopology3d< real_type > &g)
 Create a matrix \( PI\) that projects values to an equidistant grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backproject (const RealGrid1d< real_type > &g)
 Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backproject (const aRealTopology2d< real_type > &g)
 Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backproject (const aRealTopology3d< real_type > &g)
 Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const RealGridX1d< real_type > &g_new, const RealGridX1d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const aRealTopologyX2d< real_type > &g_new, const aRealTopologyX2d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
cusp::coo_matrix< int, real_type, cusp::host_memory > projection (const aRealTopologyX3d< real_type > &g_new, const aRealTopologyX3d< real_type > &g_old, std::string method="dg")
 Create a projection between two grids. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > window_stencil (unsigned window_size, const RealGrid1d< real_type > &g, dg::bc bcx)
 A 1d centered window stencil. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > limiter_stencil (const RealGrid1d< real_type > &g, dg::bc bound)
 A stencil for the dg Slope limiter. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > window_stencil (std::array< int, 2 > window_size, const aRealTopology2d< real_type > &g, dg::bc bcx, dg::bc bcy)
 A 2d centered window stencil. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > limiter_stencil (enum coo3d direction, const aRealTopology2d< real_type > &g, dg::bc bound)
 A stencil for the dg Slope limiter. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > limiter_stencil (enum coo3d direction, const aRealTopology3d< real_type > &g, dg::bc bound)
 A stencil for the dg Slope limiter. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > window_stencil (std::array< int, 2 > window_size, const aRealTopology3d< real_type > &g, dg::bc bcx, dg::bc bcy)
 A 2d centered window stencil. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > window_stencil (std::array< int, 2 > window_size, const aRealMPITopology2d< real_type > &g, dg::bc bcx, dg::bc bcy)
 A 2d centered window stencil. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > window_stencil (std::array< int, 2 > window_size, const aRealMPITopology3d< real_type > &g, dg::bc bcx, dg::bc bcy)
 A 2d centered window stencil. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > limiter_stencil (enum coo3d direction, const aRealMPITopology2d< real_type > &g, dg::bc bound)
 A stencil for the dg Slope limiter. More...
 
template<class real_type >
dg::MIHMatrix_t< real_type > limiter_stencil (enum coo3d direction, const aRealMPITopology3d< real_type > &g, dg::bc bound)
 A stencil for the dg Slope limiter. More...
 
template<class Geometry >
get_host_vector< Geometry > volume (const Geometry &g)
 Create the volume element on the grid (including weights!!) More...
 
template<class Geometry >
get_host_vector< Geometry > inv_volume (const Geometry &g)
 Create the inverse volume element on the grid (including weights!!) More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const RealGrid1d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const RealGrid1d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopology2d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const aRealTopology2d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopology2d< real_type > &g, enum coo2d coo)
 nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopology3d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const aRealTopology3d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopology3d< real_type > &g, enum coo3d coo)
 nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const dg::RealGridX1d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const RealGridX1d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopologyX2d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const aRealTopologyX2d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
thrust::host_vector< real_type > weights (const aRealTopologyX3d< real_type > &g)
 Nodal weight coefficients. More...
 
template<class real_type >
thrust::host_vector< real_type > inv_weights (const aRealTopologyX3d< real_type > &g)
 inverse nodal weight coefficients More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backscatter (const RealGrid1d< real_type > &g)
 Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backscatter (const aRealTopology2d< real_type > &g)
 Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > backscatter (const aRealTopology3d< real_type > &g)
 Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backscatter (const RealGrid1d< real_type > &g)
 Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backscatter (const aRealTopology2d< real_type > &g)
 Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class real_type >
dg::IHMatrix_t< real_type > inv_backscatter (const aRealTopology3d< real_type > &g)
 Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More...
 
template<class T >
void sainv_precond (const cusp::csr_matrix< int, T, cusp::host_memory > &a, cusp::csr_matrix< int, T, cusp::host_memory > &s, thrust::host_vector< T > &d, const thrust::host_vector< T > &weights, unsigned nnzmax, T threshold)
 Left looking sparse inverse preconditioner for self-adjoint positive definit matrices. More...
 

Detailed Description

Contains functions used for matrix creation.

Function Documentation

◆ forward_transform()

template<class real_type >
thrust::host_vector< real_type > dg::create::forward_transform ( const thrust::host_vector< real_type > &  in,
const aRealTopologyX2d< real_type > &  g 
)

Transform a vector from XSPACE to LSPACE.

Parameters
ininput
ggrid
Returns
the vector in LSPACE