Reference documentation for deal.II version 9.2.0
\(\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\}}\)
Classes | Static Public Attributes | Static Private Member Functions | List of all members
IsBlockMatrix< MatrixType > Struct Template Reference

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

Classes

struct  no_type
 
struct  yes_type
 

Static Public Attributes

static const bool value
 

Static Private Member Functions

template<typename T >
static yes_type check_for_block_matrix (const BlockMatrixBase< T > *)
 
template<typename T >
static yes_type check_for_block_matrix (const BlockSparsityPatternBase< T > *)
 
template<typename T >
static yes_type check_for_block_matrix (const BlockSparseMatrixEZ< T > *)
 
static no_type check_for_block_matrix (...)
 

Detailed Description

template<typename MatrixType>
struct IsBlockMatrix< MatrixType >

A class that can be used to determine whether a given type is a block matrix type or not. For example,

has the value false, whereas

is true. This is sometimes useful in template contexts where we may want to do things differently depending on whether a template type denotes a regular or a block matrix type.

See also
Block (linear algebra)
Author
Wolfgang Bangerth, 2009

Definition at line 1928 of file affine_constraints.h.

Member Function Documentation

◆ check_for_block_matrix() [1/4]

template<typename MatrixType >
template<typename T >
static yes_type IsBlockMatrix< MatrixType >::check_for_block_matrix ( const BlockMatrixBase< T > *  )
staticprivate

Overload returning true if the class is derived from BlockMatrixBase, which is what block matrices do (with the exception of BlockSparseMatrixEZ).

◆ check_for_block_matrix() [2/4]

template<typename MatrixType >
template<typename T >
static yes_type IsBlockMatrix< MatrixType >::check_for_block_matrix ( const BlockSparsityPatternBase< T > *  )
staticprivate

Overload returning true if the class is derived from BlockSparsityPatternBase, which is what block sparsity patterns do.

◆ check_for_block_matrix() [3/4]

template<typename MatrixType >
template<typename T >
static yes_type IsBlockMatrix< MatrixType >::check_for_block_matrix ( const BlockSparseMatrixEZ< T > *  )
staticprivate

Overload for BlockSparseMatrixEZ, which is the only block matrix not derived from BlockMatrixBase at the time of writing this class.

◆ check_for_block_matrix() [4/4]

template<typename MatrixType >
static no_type IsBlockMatrix< MatrixType >::check_for_block_matrix (   ...)
staticprivate

Catch all for all other potential matrix types that are not block matrices.

Member Data Documentation

◆ value

template<typename MatrixType >
const bool IsBlockMatrix< MatrixType >::value
static
Initial value:
=
(sizeof(check_for_block_matrix(static_cast<MatrixType *>(nullptr))) ==
sizeof(yes_type))

A statically computable value that indicates whether the template argument to this class is a block matrix (in fact whether the type is derived from BlockMatrixBase<T>).

Definition at line 1978 of file affine_constraints.h.


The documentation for this struct was generated from the following file:
IsBlockMatrix
Definition: affine_constraints.h:1928
IsBlockMatrix::value
static const bool value
Definition: affine_constraints.h:1978
IsBlockMatrix::check_for_block_matrix
static yes_type check_for_block_matrix(const BlockMatrixBase< T > *)