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

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

Static Public Attributes

static const bool value
 

Static Private Member Functions

template<typename T >
static std::true_type check (const BlockMatrixBase< T > *)
 
template<typename T >
static std::true_type check (const BlockSparseMatrixEZ< T > *)
 
static std::false_type check (...)
 

Detailed Description

template<typename MatrixType>
struct internal::AffineConstraints::IsBlockMatrix< MatrixType >

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

IsBlockMatrix<SparseMatrix<number> >::value

has the value false, whereas

IsBlockMatrix<BlockSparseMatrix<number> >::value

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)

Definition at line 2331 of file affine_constraints.h.

Member Function Documentation

◆ check() [1/3]

template<typename MatrixType >
template<typename T >
static std::true_type internal::AffineConstraints::IsBlockMatrix< MatrixType >::check ( 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() [2/3]

template<typename MatrixType >
template<typename T >
static std::true_type internal::AffineConstraints::IsBlockMatrix< MatrixType >::check ( 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() [3/3]

template<typename MatrixType >
static std::false_type internal::AffineConstraints::IsBlockMatrix< MatrixType >::check (   ...)
staticprivate

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

Member Data Documentation

◆ value

template<typename MatrixType >
const bool internal::AffineConstraints::IsBlockMatrix< MatrixType >::value
static
Initial value:
=
std::is_same<decltype(check(std::declval<MatrixType *>())),
std::true_type>::value

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> or is one of the other block matrix types).

Definition at line 2365 of file affine_constraints.h.


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