 Reference documentation for deal.II version 9.4.0
TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d > Class Template Reference

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

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

## Public Types

using value_type = Number

## 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

## Static Public Attributes

static constexpr int n_rows_1d_static = n_rows_1d

## 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

## Detailed Description

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

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
 dim Dimension of the problem. Currently, 1D, 2D, and 3D codes are implemented. Number Arithmetic type of the underlying array elements. n_rows_1d Compile-time number of rows of 1D matrices (only valid if the number of rows and columns coincide for each dimension). By default at -1, which means that the number of rows is determined at run-time by means of the matrices passed to the reinit() function.

Definition at line 74 of file tensor_product_matrix.h.

## ◆ value_type

template<int dim, typename Number , int n_rows_1d = -1>
 using TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::value_type = Number

Type of matrix entries. This alias is analogous to value_type in the standard library containers.

Definition at line 81 of file tensor_product_matrix.h.

## ◆ TensorProductMatrixSymmetricSumBase()

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

Default constructor.

## ◆ m()

template<int dim, typename Number , int n_rows_1d = -1>
 unsigned int TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::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 n_rows_1d = -1>
 unsigned int TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::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 n_rows_1d = -1>
 void TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::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 n_rows_1d = -1>
 void TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::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.

## ◆ n_rows_1d_static

template<int dim, typename Number , int n_rows_1d = -1>
 constexpr int TensorProductMatrixSymmetricSumBase< dim, Number, n_rows_1d >::n_rows_1d_static = n_rows_1d
staticconstexpr

The static number of rows of the 1D matrices. For more details, see the description of the template parameter n_rows_1d.

Definition at line 87 of file tensor_product_matrix.h.

## ◆ mass_matrix

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

An array containing a mass matrix for each tensor direction.

Definition at line 133 of file tensor_product_matrix.h.

## ◆ derivative_matrix

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

An array containing a derivative matrix for each tensor direction.

Definition at line 138 of file tensor_product_matrix.h.

## ◆ eigenvalues

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

An array storing the generalized eigenvalues for each tensor direction.

Definition at line 144 of file tensor_product_matrix.h.

## ◆ eigenvectors

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

An array storing the generalized eigenvectors for each tensor direction.

Definition at line 150 of file tensor_product_matrix.h.

## ◆ tmp_array

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

An array for temporary data.

Definition at line 156 of file tensor_product_matrix.h.

## ◆ mutex

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

A mutex that guards access to the array tmp_array.

Definition at line 161 of file tensor_product_matrix.h.

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