Loading...
Searching...
No Matches
ConstMatrixBlock< MatrixType > Class Template Reference

#include <MatrixBlock.H>

Public Types

typedef MatrixType::cmptType cmptType
 The value type the Matrix contains.
typedef MatrixType::value_type value_type
 The value type the Matrix contains.
typedef MatrixType::size_type size_type
 The type to represent the size of a Matrix.

Public Member Functions

 ConstMatrixBlock (const MatrixType &matrix, const label m, const label n, const label mStart, const label nStart)
 Construct block for matrix, size and location.
label m () const noexcept
 Return the number of rows in the block.
label n () const noexcept
 Return the number of columns in the block.
label size () const noexcept
 The number of elements in the block (m*n).
labelPair sizes () const noexcept
 Return row/column sizes of the block.
const cmptTypeoperator() (const label i, const label j) const
 (i, j) const element access operator
 operator Field< cmptType > () const
 Convert a column of a matrix to a Field.
void checkIndex (const label i, const label j) const
 Check if (i, j) is within range of row-column limits.

Detailed Description

template<class MatrixType>
class Foam::ConstMatrixBlock< MatrixType >

Definition at line 57 of file MatrixBlock.H.

Member Typedef Documentation

◆ cmptType

template<class MatrixType>
typedef MatrixType::cmptType cmptType

The value type the Matrix contains.

Definition at line 94 of file MatrixBlock.H.

◆ value_type

template<class MatrixType>
typedef MatrixType::value_type value_type

The value type the Matrix contains.

Definition at line 99 of file MatrixBlock.H.

◆ size_type

template<class MatrixType>
typedef MatrixType::size_type size_type

The type to represent the size of a Matrix.

Definition at line 104 of file MatrixBlock.H.

Constructor & Destructor Documentation

◆ ConstMatrixBlock()

template<class MatrixType>
ConstMatrixBlock ( const MatrixType & matrix,
const label m,
const label n,
const label mStart,
const label nStart )
inline

Construct block for matrix, size and location.

Definition at line 25 of file MatrixBlockI.H.

References m(), and n().

Here is the call graph for this function:

Member Function Documentation

◆ m()

template<class MatrixType>
label m ( ) const
inlinenoexcept

Return the number of rows in the block.

Definition at line 127 of file MatrixBlock.H.

References Foam::noexcept.

Referenced by ConstMatrixBlock().

Here is the caller graph for this function:

◆ n()

template<class MatrixType>
label n ( ) const
inlinenoexcept

Return the number of columns in the block.

Definition at line 132 of file MatrixBlock.H.

References Foam::noexcept.

Referenced by ConstMatrixBlock().

Here is the caller graph for this function:

◆ size()

template<class MatrixType>
Foam::label size ( ) const
inlinenoexcept

The number of elements in the block (m*n).

Definition at line 83 of file MatrixBlockI.H.

References Foam::noexcept.

◆ sizes()

template<class MatrixType>
Foam::labelPair sizes ( ) const
inlinenoexcept

Return row/column sizes of the block.

Definition at line 98 of file MatrixBlockI.H.

References Foam::noexcept.

◆ operator()()

template<class MatrixType>
const MatrixType::cmptType & operator() ( const label i,
const label j ) const
inline

(i, j) const element access operator

Definition at line 116 of file MatrixBlockI.H.

References checkIndex().

Referenced by operator Field< cmptType >().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator Field< cmptType >()

template<class MatrixType>
operator Field< cmptType > ( ) const

Convert a column of a matrix to a Field.

Definition at line 27 of file MatrixBlock.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, and operator()().

Here is the call graph for this function:

◆ checkIndex()

template<class MatrixType>
void checkIndex ( const label i,
const label j ) const

Check if (i, j) is within range of row-column limits.

Definition at line 96 of file MatrixBlock.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

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