Reference documentation for deal.II version 9.1.0-pre
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
TensorProductMatrixSymmetricSumBase< dim, Number, size > Class Template Reference

#include <deal.II/lac/tensor_product_matrix.h>

Inheritance diagram for TensorProductMatrixSymmetricSumBase< dim, Number, size >:
[legend]

Public Member Functions

unsigned int m () const
 
unsigned int n () const
 
void vmult (const ArrayView< Number > &dst, const ArrayView< const Number > &src) const
 
void apply_inverse (const ArrayView< Number > &dst, const ArrayView< const Number > &src) const
 

Protected Member Functions

 TensorProductMatrixSymmetricSumBase ()=default
 

Protected Attributes

std::array< Table< 2, Number >, dim > mass_matrix
 
std::array< Table< 2, Number >, dim > derivative_matrix
 
std::array< AlignedVector< Number >, dim > eigenvalues
 
std::array< Table< 2, Number >, dim > eigenvectors
 

Private Attributes

AlignedVector< Number > tmp_array
 
Threads::Mutex mutex
 

Detailed Description

template<int dim, typename Number, int size = -1>
class TensorProductMatrixSymmetricSumBase< dim, Number, size >

This is an abstract base class used for a special matrix class, namely the TensorProductMatrixSymmetricSum.

First, the base class acts like a container storing 1D mass matrices and 1D derivative matrices as well as the generalized eigenvalues and eigenvectors for each tensor direction. For a detailed definition of these matrices and corresponding generalized eigenproblems we refer to the main documentation of TensorProductMatrixSymmetricSum.

Note
This base class has no functionality to calculate eigenvalues and eigenvectors for mass and derivative matrices given. The responsibility of initializing the data members completely lies with the derived class.

Second, it implements the matrix-vector product with the tensor product matrix (vmult()) and its inverse (apply_inverse()) as described in the main documentation of TensorProductMatrixSymmetricSum.

Note
This class uses a temporary array for storing intermediate results that is a class member. A mutex is used to protect access to this array and ensure correct results. If several threads run parallel instances of this class, it is recommended that each threads holds its own matrix version.
Template Parameters
dimDimension of the problem. Currently, 1D, 2D, and 3D codes are implemented.
NumberArithmetic type of the underlying array elements.
sizeCompile-time array lengths. By default at -1, which means that the run-time information stored in the matrices passed to the reinit() function is used.
Author
Martin Kronbichler and Julius Witte, 2017

Definition at line 73 of file tensor_product_matrix.h.

Constructor & Destructor Documentation

template<int dim, typename Number, int size = -1>
TensorProductMatrixSymmetricSumBase< dim, Number, size >::TensorProductMatrixSymmetricSumBase ( )
protecteddefault

Default constructor.

Member Function Documentation

template<int dim, typename Number, int size = -1>
unsigned int TensorProductMatrixSymmetricSumBase< dim, Number, size >::m ( ) const

Return the number of rows of the tensor product matrix resulting from the Kronecker product of 1D matrices, which is described in the main documentation of TensorProductMatrixSymmetricSum.

template<int dim, typename Number, int size = -1>
unsigned int TensorProductMatrixSymmetricSumBase< dim, Number, size >::n ( ) const

Return the number of columns of the tensor product matrix resulting from the Kronecker product of 1D matrices, which is described in the main documentation of TensorProductMatrixSymmetricSum.

template<int dim, typename Number, int size = -1>
void TensorProductMatrixSymmetricSumBase< dim, Number, size >::vmult ( const ArrayView< Number > &  dst,
const ArrayView< const Number > &  src 
) const

Implements a matrix-vector product with the underlying matrix as described in the main documentation of TensorProductMatrixSymmetricSum. This function is operating on ArrayView to allow checks of array bounds with respect to dst and src.

template<int dim, typename Number, int size = -1>
void TensorProductMatrixSymmetricSumBase< dim, Number, size >::apply_inverse ( const ArrayView< Number > &  dst,
const ArrayView< const Number > &  src 
) const

Implements a matrix-vector product with the underlying matrix as described in the main documentation of TensorProductMatrixSymmetricSum. This function is operating on ArrayView to allow checks of array bounds with respect to dst and src.

Member Data Documentation

template<int dim, typename Number, int size = -1>
std::array<Table<2, Number>, dim> TensorProductMatrixSymmetricSumBase< dim, Number, size >::mass_matrix
protected

An array containing a mass matrix for each tensor direction.

Definition at line 120 of file tensor_product_matrix.h.

template<int dim, typename Number, int size = -1>
std::array<Table<2, Number>, dim> TensorProductMatrixSymmetricSumBase< dim, Number, size >::derivative_matrix
protected

An array containing a derivative matrix for each tensor direction.

Definition at line 125 of file tensor_product_matrix.h.

template<int dim, typename Number, int size = -1>
std::array<AlignedVector<Number>, dim> TensorProductMatrixSymmetricSumBase< dim, Number, size >::eigenvalues
protected

An array storing the generalized eigenvalues for each tensor direction.

Definition at line 131 of file tensor_product_matrix.h.

template<int dim, typename Number, int size = -1>
std::array<Table<2, Number>, dim> TensorProductMatrixSymmetricSumBase< dim, Number, size >::eigenvectors
protected

An array storing the generalized eigenvectors for each tensor direction.

Definition at line 137 of file tensor_product_matrix.h.

template<int dim, typename Number, int size = -1>
AlignedVector<Number> TensorProductMatrixSymmetricSumBase< dim, Number, size >::tmp_array
mutableprivate

An array for temporary data.

Definition at line 143 of file tensor_product_matrix.h.

template<int dim, typename Number, int size = -1>
Threads::Mutex TensorProductMatrixSymmetricSumBase< dim, Number, size >::mutex
mutableprivate

A mutex that guards access to the array tmp_array.

Definition at line 148 of file tensor_product_matrix.h.


The documentation for this class was generated from the following file: