MFEM  v4.1.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Functions
mfem::kernels Namespace Reference

Functions

template<typename T >
MFEM_HOST_DEVICE double Norml2 (const int size, const T *data)
 Returns the l2 norm of the Vector with given size and data. More...
 
template<typename TA , typename TX , typename TY >
MFEM_HOST_DEVICE void Mult (const int height, const int width, TA *data, const TX *x, TY *y)
 Matrix vector multiplication: y = A x, where the matrix A is of size height x width with given data, while x and y specify the data of the input and output vectors. More...
 
template<typename T >
MFEM_HOST_DEVICE void Symmetrize (const int size, T *data)
 Symmetrize a square matrix with given size and data: A -> (A+A^T)/2. More...
 
template<int dim, typename T >
MFEM_HOST_DEVICE T Det (const T *data)
 Compute the determinant of a square matrix of size dim with given data. More...
 
template<int dim, typename T >
MFEM_HOST_DEVICE void CalcInverse (const T *data, T *inv_data)
 Return the inverse a matrix with given size and data into the matrix with data inv_data. More...
 
template<typename TALPHA , typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void Add (const int height, const int width, const TALPHA alpha, const TA *Adata, const TB *Bdata, TC *Cdata)
 Compute C = A + alpha*B, where the matrices A, B and C are of size height x width with data Adata, Bdata and Cdata. More...
 
template<typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void Mult (const int Aheight, const int Awidth, const int Bwidth, const TB *Bdata, const TC *Cdata, TA *Adata)
 Matrix-matrix multiplication: A = B * C, where the matrices A, B and C are of sizes Aheight x Awidth, Aheight x Bwidth and Bwidth x Awidth, respectively. More...
 
template<typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void MultABt (const int Aheight, const int Awidth, const int Bheight, const TA *Adata, const TB *Bdata, TC *ABtdata)
 Multiply a matrix of size Aheight x Awidth and data Adata with the transpose of a matrix of size Bheight x Awidth and data Bdata: A * Bt. Return the result in a matrix with data ABtdata. More...
 
template<int dim>
void CalcEigenvalues (const double *data, double *lambda, double *vec)
 
template<int dim>
double CalcSingularvalue (const double *data, const int i)
 Return the i'th singular value of the matrix of size dim with given data. More...
 
template<>
MFEM_HOST_DEVICE void CalcEigenvalues< 2 > (const double *data, double *lambda, double *vec)
 
template<>
MFEM_HOST_DEVICE void CalcEigenvalues< 3 > (const double *data, double *lambda, double *vec)
 
template<>
MFEM_HOST_DEVICE double CalcSingularvalue< 2 > (const double *data, const int i)
 Return the i'th singular value of the matrix of size 2 with given data. More...
 
template<>
MFEM_HOST_DEVICE double CalcSingularvalue< 3 > (const double *data, const int i)
 Return the i'th singular value of the matrix of size 3 with given data. More...
 

Function Documentation

template<typename TALPHA , typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void mfem::kernels::Add ( const int  height,
const int  width,
const TALPHA  alpha,
const TA *  Adata,
const TB *  Bdata,
TC *  Cdata 
)
inline

Compute C = A + alpha*B, where the matrices A, B and C are of size height x width with data Adata, Bdata and Cdata.

Definition at line 141 of file kernels.hpp.

template<int dim>
void mfem::kernels::CalcEigenvalues ( const double *  data,
double *  lambda,
double *  vec 
)

Compute the spectrum of the matrix of size dim with given data, returning the eigenvalues in the array lambda and the eigenvectors in the array vec (listed consecutively).

template<>
MFEM_HOST_DEVICE void mfem::kernels::CalcEigenvalues< 2 > ( const double *  data,
double *  lambda,
double *  vec 
)
inline

Compute the spectrum of the matrix of size 2 with given data, returning the eigenvalues in the array lambda and the eigenvectors in the array vec (listed consecutively).

Definition at line 866 of file kernels.hpp.

template<>
MFEM_HOST_DEVICE void mfem::kernels::CalcEigenvalues< 3 > ( const double *  data,
double *  lambda,
double *  vec 
)
inline

Compute the spectrum of the matrix of size 3 with given data, returning the eigenvalues in the array lambda and the eigenvectors in the array vec (listed consecutively).

Definition at line 897 of file kernels.hpp.

template<int dim, typename T >
MFEM_HOST_DEVICE void mfem::kernels::CalcInverse ( const T *  data,
T *  inv_data 
)
inline

Return the inverse a matrix with given size and data into the matrix with data inv_data.

Definition at line 130 of file kernels.hpp.

template<int dim>
double mfem::kernels::CalcSingularvalue ( const double *  data,
const int  i 
)

Return the i'th singular value of the matrix of size dim with given data.

template<>
MFEM_HOST_DEVICE double mfem::kernels::CalcSingularvalue< 2 > ( const double *  data,
const int  i 
)
inline

Return the i'th singular value of the matrix of size 2 with given data.

Definition at line 1099 of file kernels.hpp.

template<>
MFEM_HOST_DEVICE double mfem::kernels::CalcSingularvalue< 3 > ( const double *  data,
const int  i 
)
inline

Return the i'th singular value of the matrix of size 3 with given data.

Definition at line 1147 of file kernels.hpp.

template<int dim, typename T >
MFEM_HOST_DEVICE T mfem::kernels::Det ( const T *  data)
inline

Compute the determinant of a square matrix of size dim with given data.

Definition at line 121 of file kernels.hpp.

template<typename TA , typename TX , typename TY >
MFEM_HOST_DEVICE void mfem::kernels::Mult ( const int  height,
const int  width,
TA *  data,
const TX *  x,
TY *  y 
)
inline

Matrix vector multiplication: y = A x, where the matrix A is of size height x width with given data, while x and y specify the data of the input and output vectors.

Definition at line 76 of file kernels.hpp.

template<typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void mfem::kernels::Mult ( const int  Aheight,
const int  Awidth,
const int  Bwidth,
const TB *  Bdata,
const TC *  Cdata,
TA *  Adata 
)
inline

Matrix-matrix multiplication: A = B * C, where the matrices A, B and C are of sizes Aheight x Awidth, Aheight x Bwidth and Bwidth x Awidth, respectively.

Definition at line 159 of file kernels.hpp.

template<typename TA , typename TB , typename TC >
MFEM_HOST_DEVICE void mfem::kernels::MultABt ( const int  Aheight,
const int  Awidth,
const int  Bheight,
const TA *  Adata,
const TB *  Bdata,
TC *  ABtdata 
)
inline

Multiply a matrix of size Aheight x Awidth and data Adata with the transpose of a matrix of size Bheight x Awidth and data Bdata: A * Bt. Return the result in a matrix with data ABtdata.

Definition at line 181 of file kernels.hpp.

template<typename T >
MFEM_HOST_DEVICE double mfem::kernels::Norml2 ( const int  size,
const T *  data 
)
inline

Returns the l2 norm of the Vector with given size and data.

Definition at line 46 of file kernels.hpp.

template<typename T >
MFEM_HOST_DEVICE void mfem::kernels::Symmetrize ( const int  size,
T *  data 
)
inline

Symmetrize a square matrix with given size and data: A -> (A+A^T)/2.

Definition at line 107 of file kernels.hpp.