Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Go to the source code of this file.
Classes | |
struct | dg::TensorMultiply2d< value_type > |
\( y_i \leftarrow \lambda T_{ij} x_i + \mu y_i\) More... | |
struct | dg::TensorMultiply3d< value_type > |
\( y_i \leftarrow \lambda T_{ij} x_i + \mu y_i\) More... | |
struct | dg::InverseTensorMultiply2d< value_type > |
\( y_i \leftarrow \lambda T^{-1}_{ij} x_i + \mu y_i\) More... | |
struct | dg::InverseTensorMultiply3d< value_type > |
\( y_i \leftarrow \lambda T^{-1}_{ij} x_i + \mu y_i\) More... | |
struct | dg::TensorDot2d< value_type > |
\( y = \lambda\mu v_i T_{ij} w_j \) More... | |
struct | dg::TensorDot3d< value_type > |
\( y = \lambda \mu v_i T_{ij} w_j \) More... | |
struct | dg::TensorDeterminant2d< value_type > |
\( y = t_{00} t_{11} - t_{10}t_{01} \) More... | |
struct | dg::TensorDeterminant3d< value_type > |
\( 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... | |
Namespaces | |
namespace | dg |
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin library. | |
namespace | dg::tensor |
Utility functions used in connection with the SparseTensor class. | |
Functions | |
template<class ContainerType0 , class ContainerType1 > | |
void | dg::tensor::scal (SparseTensor< ContainerType0 > &t, const ContainerType1 &mu) |
\( t^{ij} = \mu t^{ij} \ \forall i,j \) More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerTypeM , class ContainerType3 , class ContainerType4 > | |
void | dg::tensor::multiply2d (const ContainerTypeL &lambda, const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerTypeM &mu, ContainerType3 &out0, ContainerType4 &out1) |
\( w^i = \sum_{i=0}^1 \lambda t^{ij}v_j + \mu w^i \text{ for } i\in \{0,1\}\) More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerTypeM , class ContainerType4 , class ContainerType5 , class ContainerType6 > | |
void | dg::tensor::multiply3d (const ContainerTypeL &lambda, const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerType3 &in2, const ContainerTypeM &mu, ContainerType4 &out0, ContainerType5 &out1, ContainerType6 &out2) |
\( w^i = \sum_{i=0}^2\lambda t^{ij}v_j + \mu w^i \text{ for } i\in \{0,1,2\}\) More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerTypeM , class ContainerType3 , class ContainerType4 > | |
void | dg::tensor::inv_multiply2d (const ContainerTypeL &lambda, const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerTypeM &mu, ContainerType3 &out0, ContainerType4 &out1) |
\( v_j = \sum_{i=0}^1\lambda (t^{-1})_{ji}w^i + \mu v_j \text{ for } i\in \{0,1\}\) More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerTypeM , class ContainerType4 , class ContainerType5 , class ContainerType6 > | |
void | dg::tensor::inv_multiply3d (const ContainerTypeL &lambda, const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerType3 &in2, const ContainerTypeM &mu, ContainerType4 &out0, ContainerType5 &out1, ContainerType6 &out2) |
\( v_j = \sum_{i=0}^2\lambda(t^{-1})_{ji}w^i + \mu v_j \text{ for } i\in \{0,1,2\}\)i More... | |
template<class ContainerType > | |
ContainerType | dg::tensor::determinant2d (const SparseTensor< ContainerType > &t) |
\(\det_{2d}( t)\) More... | |
template<class ContainerType > | |
ContainerType | dg::tensor::determinant (const SparseTensor< ContainerType > &t) |
\(\det( t)\) More... | |
template<class ContainerType > | |
ContainerType | dg::tensor::volume2d (const SparseTensor< ContainerType > &t) |
\( \sqrt{\det_{2d}(t)}^{-1}\) More... | |
template<class ContainerType > | |
ContainerType | dg::tensor::volume (const SparseTensor< ContainerType > &t) |
\( \sqrt{\det(t)}^{-1}\) More... | |
template<class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 > | |
void | dg::tensor::multiply2d (const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, ContainerType3 &out0, ContainerType4 &out1) |
\( w^i = \sum_{i=0}^1 t^{ij}v_j \text{ for } i\in \{0,1\}\) More... | |
template<class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 , class ContainerType5 , class ContainerType6 > | |
void | dg::tensor::multiply3d (const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerType3 &in2, ContainerType4 &out0, ContainerType5 &out1, ContainerType6 &out2) |
\( w^i = \sum_{i=0}^2 t^{ij}v_j \text{ for } i\in \{0,1,2\}\) More... | |
template<class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 > | |
void | dg::tensor::inv_multiply2d (const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, ContainerType3 &out0, ContainerType4 &out1) |
\( v_j = \sum_{i=0}^1(t^{-1})_{ji}w^i \text{ for } i\in \{0,1\}\) More... | |
template<class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 , class ContainerType5 , class ContainerType6 > | |
void | dg::tensor::inv_multiply3d (const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerType3 &in2, ContainerType4 &out0, ContainerType5 &out1, ContainerType6 &out2) |
\( v_j = \sum_{i=0}^2(t^{-1})_{ji}w^i \text{ for } i\in \{0,1,2\}\)i More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerTypeM , class ContainerType4 , class ContainerType5 > | |
void | dg::tensor::scalar_product2d (get_value_type< ContainerType0 > alpha, const ContainerTypeL &lambda, const ContainerType0 &v0, const ContainerType1 &v1, const SparseTensor< ContainerType2 > &t, const ContainerTypeM &mu, const ContainerType3 &w0, const ContainerType4 &w1, get_value_type< ContainerType0 > beta, ContainerType5 &y) |
\( y = \alpha \lambda\mu \sum_{i=0}^1 v_it^{ij}w_j + \beta y \text{ for } i\in \{0,1\}\) More... | |
template<class ContainerTypeL , class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerTypeM , class ContainerType4 , class ContainerType5 , class ContainerType6 , class ContainerType7 > | |
void | dg::tensor::scalar_product3d (get_value_type< ContainerType0 > alpha, const ContainerTypeL &lambda, const ContainerType0 &v0, const ContainerType1 &v1, const ContainerType2 &v2, const SparseTensor< ContainerType3 > &t, const ContainerTypeM &mu, const ContainerType4 &w0, const ContainerType5 &w1, const ContainerType6 &w2, get_value_type< ContainerType0 > beta, ContainerType7 &y) |
\( y = \alpha \lambda\mu \sum_{i=0}^2 v_it^{ij}w_j + \beta y \text{ for } i\in \{0,1,2\}\) More... | |
Basic tensor functions (functions that involve sparse tensors)