Reference documentation for deal.II version 9.4.2
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d > Class Template Reference

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

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

Public Types

using value_type = VectorizedArray< Number >
 

Public Member Functions

 TensorProductMatrixSymmetricSum ()=default
 
 TensorProductMatrixSymmetricSum (const std::array< Table< 2, VectorizedArray< Number > >, dim > &mass_matrix, const std::array< Table< 2, VectorizedArray< Number > >, dim > &derivative_matrix)
 
 TensorProductMatrixSymmetricSum (const Table< 2, VectorizedArray< Number > > &mass_matrix, const Table< 2, VectorizedArray< Number > > &derivative_matrix)
 
void reinit (const std::array< Table< 2, VectorizedArray< Number > >, dim > &mass_matrix, const std::array< Table< 2, VectorizedArray< Number > >, dim > &derivative_matrix)
 
void reinit (const Table< 2, VectorizedArray< Number > > &mass_matrix, const Table< 2, VectorizedArray< Number > > &derivative_matrix)
 
unsigned int m () const
 
unsigned int n () const
 
void vmult (const ArrayView< VectorizedArray< Number > > &dst, const ArrayView< const VectorizedArray< Number > > &src) const
 
void apply_inverse (const ArrayView< VectorizedArray< Number > > &dst, const ArrayView< const VectorizedArray< Number > > &src) const
 

Static Public Attributes

static constexpr int n_rows_1d_static
 

Protected Attributes

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

Private Member Functions

template<typename MatrixArray >
void reinit_impl (MatrixArray &&mass_matrix, MatrixArray &&derivative_matrix)
 

Private Attributes

AlignedVector< VectorizedArray< Number > > tmp_array
 
Threads::Mutex mutex
 

Detailed Description

template<int dim, typename Number, int n_rows_1d>
class TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >

This is the template specialization for VectorizedArray<Number> being the arithmetic template. For a detailed description see the main documentation of the generic TensorProductMatrixSymmetricSum class.

Definition at line 330 of file tensor_product_matrix.h.

Member Typedef Documentation

◆ value_type

using TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::value_type = VectorizedArray< Number >
inherited

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.

Constructor & Destructor Documentation

◆ TensorProductMatrixSymmetricSum() [1/3]

template<int dim, typename Number , int n_rows_1d>
TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::TensorProductMatrixSymmetricSum ( )
default

Default constructor.

◆ TensorProductMatrixSymmetricSum() [2/3]

template<int dim, typename Number , int n_rows_1d>
TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::TensorProductMatrixSymmetricSum ( const std::array< Table< 2, VectorizedArray< Number > >, dim > &  mass_matrix,
const std::array< Table< 2, VectorizedArray< Number > >, dim > &  derivative_matrix 
)

Constructor that is equivalent to the empty constructor and immediately calling reinit(const std::array<Table<2,VectorizedArray<Number> >, dim>&,const std::array<Table<2,VectorizedArray<Number> >, dim>&).

◆ TensorProductMatrixSymmetricSum() [3/3]

template<int dim, typename Number , int n_rows_1d>
TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::TensorProductMatrixSymmetricSum ( const Table< 2, VectorizedArray< Number > > &  mass_matrix,
const Table< 2, VectorizedArray< Number > > &  derivative_matrix 
)

Constructor that is equivalent to the empty constructor and immediately calling reinit(const Table<2,VectorizedArray<Number> >&,const Table<2,VectorizedArray<Number> >&).

Member Function Documentation

◆ reinit() [1/2]

template<int dim, typename Number , int n_rows_1d>
void TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::reinit ( const std::array< Table< 2, VectorizedArray< Number > >, dim > &  mass_matrix,
const std::array< Table< 2, VectorizedArray< Number > >, dim > &  derivative_matrix 
)

Initializes the tensor product matrix by copying the arrays of 1D mass matrices mass_matrix and 1D derivative matrices derivative_matrix into its base class counterparts, respectively, and by assembling the regarding generalized eigenvalues and eigenvectors in TensorProductMatrixSymmetricSumBase::eigenvalues and TensorProductMatrixSymmetricSumBase::eigenvectors, respectively. Note that the current implementation requires each $M_{d}$ to be symmetric and positive definite and every $A_{d}$ to be symmetric and invertible but not necessarily positive definite.

◆ reinit() [2/2]

template<int dim, typename Number , int n_rows_1d>
void TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::reinit ( const Table< 2, VectorizedArray< Number > > &  mass_matrix,
const Table< 2, VectorizedArray< Number > > &  derivative_matrix 
)

This function is equivalent to the previous reinit() except that we consider the same 1D mass matrix mass_matrix and the same 1D derivative matrix derivative_matrix for each tensor direction.

◆ reinit_impl()

template<int dim, typename Number , int n_rows_1d>
template<typename MatrixArray >
void TensorProductMatrixSymmetricSum< dim, VectorizedArray< Number >, n_rows_1d >::reinit_impl ( MatrixArray &&  mass_matrix,
MatrixArray &&  derivative_matrix 
)
private

A generic implementation of all reinit() functions based on perfect forwarding, that allows to pass lvalue as well as rvalue arguments.

Template Parameters
MatrixArrayHas to be convertible to the underlying type of TensorProductMatrixSymmetricSumBase::mass_matrix and TensorProductMatrixSymmetricSumBase::derivative_matrix.

◆ m()

unsigned int TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::m ( ) const
inherited

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()

unsigned int TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::n ( ) const
inherited

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()

void TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::vmult ( const ArrayView< VectorizedArray< Number > > &  dst,
const ArrayView< const VectorizedArray< Number > > &  src 
) const
inherited

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()

void TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::apply_inverse ( const ArrayView< VectorizedArray< Number > > &  dst,
const ArrayView< const VectorizedArray< Number > > &  src 
) const
inherited

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

◆ n_rows_1d_static

constexpr int TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::n_rows_1d_static
staticconstexprinherited

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

std::array<Table<2, VectorizedArray< Number > >, dim> TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::mass_matrix
protectedinherited

An array containing a mass matrix for each tensor direction.

Definition at line 133 of file tensor_product_matrix.h.

◆ derivative_matrix

std::array<Table<2, VectorizedArray< Number > >, dim> TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::derivative_matrix
protectedinherited

An array containing a derivative matrix for each tensor direction.

Definition at line 138 of file tensor_product_matrix.h.

◆ eigenvalues

std::array<AlignedVector<VectorizedArray< Number > >, dim> TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::eigenvalues
protectedinherited

An array storing the generalized eigenvalues for each tensor direction.

Definition at line 144 of file tensor_product_matrix.h.

◆ eigenvectors

std::array<Table<2, VectorizedArray< Number > >, dim> TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::eigenvectors
protectedinherited

An array storing the generalized eigenvectors for each tensor direction.

Definition at line 150 of file tensor_product_matrix.h.

◆ tmp_array

AlignedVector<VectorizedArray< Number > > TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::tmp_array
mutableprivateinherited

An array for temporary data.

Definition at line 156 of file tensor_product_matrix.h.

◆ mutex

Threads::Mutex TensorProductMatrixSymmetricSumBase< dim, VectorizedArray< Number > , n_rows_1d >::mutex
mutableprivateinherited

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: