Reference documentation for deal.II version 9.0.0
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 67 of file tensor_product_matrix.h.

Constructor & Destructor Documentation

◆ TensorProductMatrixSymmetricSumBase()

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

Default constructor.

Member Function Documentation

◆ m()

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.

◆ n()

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.

◆ vmult()

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.

◆ apply_inverse()

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

◆ mass_matrix

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 111 of file tensor_product_matrix.h.

◆ derivative_matrix

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 116 of file tensor_product_matrix.h.

◆ eigenvalues

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 122 of file tensor_product_matrix.h.

◆ eigenvectors

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 128 of file tensor_product_matrix.h.

◆ tmp_array

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 134 of file tensor_product_matrix.h.

◆ mutex

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 139 of file tensor_product_matrix.h.


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