Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
\( D_x\), \( D_y\) and \( D_z \) More...
Enumerations | |
enum | dg::bc { dg::PER = 0 , dg::DIR = 1 , dg::DIR_NEU = 2 , dg::NEU_DIR = 3 , dg::NEU = 4 } |
Switch between boundary conditions. More... | |
enum | dg::direction { dg::forward , dg::backward , dg::centered } |
Direction of a discrete derivative. More... | |
enum | dg::space { dg::lspace , dg::xspace } |
Space of DG coefficients. More... | |
enum class | dg::coo2d : char { dg::coo2d::x = 'x' , dg::coo2d::y = 'y' } |
2d coordinates More... | |
enum class | dg::coo3d : char { dg::coo3d::x = 'x' , dg::coo3d::y = 'y' , dg::coo3d::z = 'z' } |
3d coordinates More... | |
Functions | |
template<class real_type , size_t Nd> | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::derivative (unsigned coord, const aRealTopology< real_type, Nd > &g, dg::bc bc, direction dir=centered) |
Create a derivative along given coordinate. | |
template<class real_type , size_t Nd> | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::jump (unsigned coord, const aRealTopology< real_type, Nd > &g, dg::bc bc) |
Create a jump matrix along given coordinate. | |
template<class Topology > | |
auto | dg::create::dx (const Topology &g, dg::bc bc, dg::direction dir=centered) |
template<class Topology > | |
auto | dg::create::dy (const Topology &g, dg::bc bc, dg::direction dir=centered) |
Short for dg::create::derivative( 1, g, bc, dir); | |
template<class Topology > | |
auto | dg::create::dz (const Topology &g, dg::bc bc, dg::direction dir=centered) |
Short for dg::create::derivative( 2, g, bc, dir); | |
template<class Topology > | |
auto | dg::create::jumpX (const Topology &g, bc bc) |
Short for dg::create::jump( 0, g, bc); | |
template<class Topology > | |
auto | dg::create::jumpY (const Topology &g, bc bc) |
Short for dg::create::jump( 1, g, bc); | |
template<class Topology > | |
auto | dg::create::jumpZ (const Topology &g, bc bc) |
Short for dg::create::jump( 2, g, bc); | |
template<class Topology > | |
auto | dg::create::derivative (unsigned coord, const Topology &g, direction dir=centered) |
Short for dg::create::derivative( coord, g, g.bcx(), dir); | |
template<class Topology > | |
auto | dg::create::jump (unsigned coord, const Topology &g) |
Short for dg::create::jump( coord, g, g.bcx()); | |
template<class Topology > | |
auto | dg::create::dx (const Topology &g, dg::direction dir=centered) |
Short for dg::create::derivative( 0, g, g.bcx() dir); | |
template<class Topology > | |
auto | dg::create::dy (const Topology &g, dg::direction dir=centered) |
Short for dg::create::derivative( 1, g, g.bcy(), dir); | |
template<class Topology > | |
auto | dg::create::dz (const Topology &g, dg::direction dir=centered) |
Short for dg::create::derivative( 2, g, g.bcz(), dir); | |
template<class Topology > | |
auto | dg::create::jumpX (const Topology &g) |
Short for dg::create::jump( 0, g, g.bcx()); | |
template<class Topology > | |
auto | dg::create::jumpY (const Topology &g) |
Short for dg::create::jump( 1, g, g.bcy()); | |
template<class Topology > | |
auto | dg::create::jumpZ (const Topology &g) |
Short for dg::create::jump( 2, g, g.bcz()); | |
template<class real_type > | |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > | dg::create::derivative (unsigned coord, const aRealTopologyX2d< real_type > &g, dg::bc bc, direction dir=centered) |
Create 2d derivative in x-direction. | |
template<class real_type > | |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > | dg::create::jump (unsigned coord, const aRealTopologyX2d< real_type > &g, bc bc) |
Matrix that contains 2d jump terms in X direction. | |
template<class real_type > | |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > | dg::create::jump (unsigned coord, const aRealTopologyX3d< real_type > &g, bc bc) |
Matrix that contains jump terms in X direction in 3D. | |
template<class real_type > | |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > | dg::create::derivative (unsigned coord, const aRealTopologyX3d< real_type > &g, bc bc, direction dir=centered) |
Create 3d derivative in x-direction. | |
template<class real_type > | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::dx (const RealGridX1d< real_type > &g, bc bcx, direction dir=centered) |
Create and assemble a host Matrix for the derivative in 1d. | |
template<class real_type > | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::dx (const RealGridX1d< real_type > &g, direction dir=centered) |
Create and assemble a host Matrix for the derivative in 1d. | |
template<class real_type > | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::jump (const RealGridX1d< real_type > &g, bc bcx) |
Create and assemble a host Matrix for the jump in 1d. | |
template<class real_type > | |
EllSparseBlockMat< real_type, thrust::host_vector > | dg::create::jump (const RealGridX1d< real_type > &g) |
Create and assemble a host Matrix for the jump in 1d. | |
template<class real_type , size_t Nd> | |
dg::MHMatrix_t< real_type > | dg::create::derivative (unsigned coord, const aRealMPITopology< real_type, Nd > &g, dg::bc bc, direction dir=centered) |
Create a derivative along the given coordinate for mpi. | |
template<class real_type , size_t Nd> | |
dg::MHMatrix_t< real_type > | dg::create::jump (unsigned coord, const aRealMPITopology< real_type, Nd > &g, dg::bc bc) |
Create a jump matrix along given coordinate for mpi. | |
std::string | dg::bc2str (bc bcx) |
write a string describing boundary condition to an output stream | |
bc | dg::str2bc (std::string s) |
convert a string to a bc | |
bc | dg::inverse (bc bound) |
invert boundary condition | |
direction | dg::str2direction (std::string s) |
convert a string to a direction | |
std::string | dg::direction2str (enum direction dir) |
convert a direciton to string | |
direction | dg::inverse (direction dir) |
invert direction | |
\( D_x\), \( D_y\) and \( D_z \)
High level matrix creation functions
enum dg::bc |
|
strong |
|
strong |
enum dg::direction |
enum dg::space |
|
inline |
write a string describing boundary condition to an output stream
converts
bcx | the boundary condition |
dg::MHMatrix_t< real_type > dg::create::derivative | ( | unsigned | coord, |
const aRealMPITopology< real_type, Nd > & | g, | ||
dg::bc | bc, | ||
direction | dir = centered ) |
Create a derivative along the given coordinate for mpi.
coord | the coordinate along which to derive |
g | A mpi grid |
bc | boundary condition |
dir | centered, forward or backward |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::derivative | ( | unsigned | coord, |
const aRealTopology< real_type, Nd > & | g, | ||
dg::bc | bc, | ||
direction | dir = centered ) |
Create a derivative along given coordinate.
coord | the coordinate along which to derive |
g | The grid on which to create derivative |
bc | The boundary condition |
dir | centered, forward or backward |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > dg::create::derivative | ( | unsigned | coord, |
const aRealTopologyX2d< real_type > & | g, | ||
dg::bc | bc, | ||
direction | dir = centered ) |
Create 2d derivative in x-direction.
coord | Either 0 (for x derivative) or 1 (for y derivative) |
g | The grid on which to create dx |
bc | The boundary condition |
dir | The direction of the first derivative |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > dg::create::derivative | ( | unsigned | coord, |
const aRealTopologyX3d< real_type > & | g, | ||
bc | bc, | ||
direction | dir = centered ) |
Create 3d derivative in x-direction.
coord | Either 0 (for x derivative) or 1 (for y derivative) or 2 (for z derivative) |
g | The grid on which to create dx |
bc | The boundary condition |
dir | The direction of the first derivative |
auto dg::create::derivative | ( | unsigned | coord, |
const Topology & | g, | ||
direction | dir = centered ) |
Short for dg::create::derivative( coord, g, g.bcx(), dir);
|
inline |
convert a direciton to string
converts
dir | the input direction |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::dx | ( | const RealGridX1d< real_type > & | g, |
bc | bcx, | ||
direction | dir = centered ) |
Create and assemble a host Matrix for the derivative in 1d.
g | 1D grid with X-point topology |
bcx | boundary condition |
dir | The direction of the first derivative |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::dx | ( | const RealGridX1d< real_type > & | g, |
direction | dir = centered ) |
Create and assemble a host Matrix for the derivative in 1d.
Take the boundary condition from the grid
g | 1D grid with X-point topology |
dir | The direction of the first derivative |
auto dg::create::dx | ( | const Topology & | g, |
dg::bc | bc, | ||
dg::direction | dir = centered ) |
Short for dg::create::derivative( 0, g, bc, dir);
auto dg::create::dx | ( | const Topology & | g, |
dg::direction | dir = centered ) |
Short for dg::create::derivative( 0, g, g.bcx() dir);
auto dg::create::dy | ( | const Topology & | g, |
dg::bc | bc, | ||
dg::direction | dir = centered ) |
Short for dg::create::derivative( 1, g, bc, dir);
auto dg::create::dy | ( | const Topology & | g, |
dg::direction | dir = centered ) |
Short for dg::create::derivative( 1, g, g.bcy(), dir);
auto dg::create::dz | ( | const Topology & | g, |
dg::bc | bc, | ||
dg::direction | dir = centered ) |
Short for dg::create::derivative( 2, g, bc, dir);
auto dg::create::dz | ( | const Topology & | g, |
dg::direction | dir = centered ) |
Short for dg::create::derivative( 2, g, g.bcz(), dir);
invert boundary condition
bound | boundary condition to invert |
invert direction
dir | direction to invert |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::jump | ( | const RealGridX1d< real_type > & | g | ) |
Create and assemble a host Matrix for the jump in 1d.
Take the boundary condition from the grid
g | 1D grid with X-point topology |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::jump | ( | const RealGridX1d< real_type > & | g, |
bc | bcx ) |
Create and assemble a host Matrix for the jump in 1d.
g | 1D grid with X-point topology |
bcx | boundary condition |
dg::MHMatrix_t< real_type > dg::create::jump | ( | unsigned | coord, |
const aRealMPITopology< real_type, Nd > & | g, | ||
dg::bc | bc ) |
Create a jump matrix along given coordinate for mpi.
coord | the coordinate along which to jump |
g | The mpi grid on which to create jump |
bc | The boundary condition |
EllSparseBlockMat< real_type, thrust::host_vector > dg::create::jump | ( | unsigned | coord, |
const aRealTopology< real_type, Nd > & | g, | ||
dg::bc | bc ) |
Create a jump matrix along given coordinate.
coord | the coordinate along which to jump |
g | The grid on which to create jump |
bc | The boundary condition |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > dg::create::jump | ( | unsigned | coord, |
const aRealTopologyX2d< real_type > & | g, | ||
bc | bc ) |
Matrix that contains 2d jump terms in X direction.
coord | Either 0 (for x derivative) or 1 (for y derivative) |
g | grid |
bc | boundary condition in x |
Composite< EllSparseBlockMat< real_type, thrust::host_vector > > dg::create::jump | ( | unsigned | coord, |
const aRealTopologyX3d< real_type > & | g, | ||
bc | bc ) |
Matrix that contains jump terms in X direction in 3D.
coord | Either 0 (for x derivative) or 1 (for y derivative) or 2 (for z derivative) |
g | The 3D grid |
bc | boundary condition |
auto dg::create::jump | ( | unsigned | coord, |
const Topology & | g ) |
Short for dg::create::jump( coord, g, g.bcx());
auto dg::create::jumpX | ( | const Topology & | g | ) |
Short for dg::create::jump( 0, g, g.bcx());
auto dg::create::jumpX | ( | const Topology & | g, |
bc | bc ) |
Short for dg::create::jump( 0, g, bc);
auto dg::create::jumpY | ( | const Topology & | g | ) |
Short for dg::create::jump( 1, g, g.bcy());
auto dg::create::jumpY | ( | const Topology & | g, |
bc | bc ) |
Short for dg::create::jump( 1, g, bc);
auto dg::create::jumpZ | ( | const Topology & | g | ) |
Short for dg::create::jump( 2, g, g.bcz());
auto dg::create::jumpZ | ( | const Topology & | g, |
bc | bc ) |
Short for dg::create::jump( 2, g, bc);
|
inline |
convert a string to a bc
converts
s | the input string |
std::runtime_error | if string doesn't match any of the above |
|
inline |
convert a string to a direction
converts
s | the input string |
std::runtime_error | if string doesn't match any of the above |