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

Utility functions used in connection with the SparseTensor class. More...

Functions

template<class ContainerType0 , class ContainerType1 >
void 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 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 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 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 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 determinant2d (const SparseTensor< ContainerType > &t)
 \(\det_{2d}( t)\) More...
 
template<class ContainerType >
ContainerType determinant (const SparseTensor< ContainerType > &t)
 \(\det( t)\) More...
 
template<class ContainerType >
ContainerType volume2d (const SparseTensor< ContainerType > &t)
 \( \sqrt{\det_{2d}(t)}^{-1}\) More...
 
template<class ContainerType >
ContainerType volume (const SparseTensor< ContainerType > &t)
 \( \sqrt{\det(t)}^{-1}\) More...
 
template<class ContainerType0 , class ContainerType1 , class ContainerType2 , class ContainerType3 , class ContainerType4 >
void 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 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 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 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 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 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...
 

Detailed Description

Utility functions used in connection with the SparseTensor class.