A templated block of an (m x n) matrix of type <MatrixType>. More...
#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 | |
| MatrixBlock (const MatrixBlock &)=default | |
| Copy construct. | |
| MatrixBlock (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 cmptType & | operator() (const label i, const label j) const |
| (i, j) const element access operator | |
| cmptType & | operator() (const label i, const label j) |
| (i, j) 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. | |
| template<class Form> | |
| void | operator= (const Matrix< Form, cmptType > &) |
| Assignment to a compatible matrix. | |
| void | operator= (const ConstMatrixBlock< MatrixType > &) |
| Assignment to a compatible const block. | |
| void | operator= (const MatrixBlock< MatrixType > &) |
| Assignment to a compatible block. | |
| template<class MatrixType2> | |
| void | operator= (const ConstMatrixBlock< MatrixType2 > &) |
| Assignment to a compatible const block. | |
| template<class MatrixType2> | |
| void | operator= (const MatrixBlock< MatrixType2 > &) |
| Assignment to a compatible block. | |
| template<class MSForm, direction Nrows, direction Ncols> | |
| void | operator= (const MatrixSpace< MSForm, cmptType, Nrows, Ncols > &) |
| Assignment to a compatible MatrixSpace. | |
| template<template< class, direction, direction > class Block, class SubTensor, direction BRowStart, direction BColStart> | |
| void | operator= (const Block< SubTensor, BRowStart, BColStart > &) |
| Assignment to a compatible MatrixSpace block. | |
| template<class VSForm, direction Ncmpts> | |
| void | operator= (const VectorSpace< VSForm, cmptType, Ncmpts > &) |
| Assignment to a compatible VectorSpace (column-vector). | |
| template<template< class, direction > class Block, class SubVector, direction BStart> | |
| void | operator= (const Block< SubVector, BStart > &) |
| Assignment to a compatible VectorSpace (column-vector) block. | |
| void | operator= (const Field< cmptType > &) |
| Assignment to a Field (column-vector). | |
| template<template< class, Foam::direction, Foam::direction > class MSBlock, class SubTensor, Foam::direction BRowStart, Foam::direction BColStart> | |
| void | operator= (const MSBlock< SubTensor, BRowStart, BColStart > &Mb) |
| template<template< class, Foam::direction > class VSBlock, class SubVector, Foam::direction BStart> | |
| void | operator= (const VSBlock< SubVector, BStart > &Mb) |
A templated block of an (m x n) matrix of type <MatrixType>.
Foam::ConstMatrixBlock: block of a const matrix Foam::MatrixBlock: block of a non-const matrix
The block may be assigned to a block of another matrix or to a VectorSpace or MatrixSpace e.g. tensor. Conversion of a column block to a Field<T> is also provide.
Definition at line 170 of file MatrixBlock.H.
| typedef MatrixType::cmptType cmptType |
The value type the Matrix contains.
Definition at line 207 of file MatrixBlock.H.
| typedef MatrixType::value_type value_type |
The value type the Matrix contains.
Definition at line 212 of file MatrixBlock.H.
| typedef MatrixType::size_type size_type |
The type to represent the size of a Matrix.
Definition at line 217 of file MatrixBlock.H.
|
default |
Copy construct.
References m(), MatrixBlock(), and n().
Referenced by MatrixBlock(), operator=(), and operator=().


|
inline |
Construct block for matrix, size and location.
Definition at line 53 of file MatrixBlockI.H.

|
inlinenoexcept |
Return the number of rows in the block.
Definition at line 248 of file MatrixBlock.H.
References Foam::noexcept.
Referenced by MatrixBlock(), and MatrixBlock().

|
inlinenoexcept |
Return the number of columns in the block.
Definition at line 253 of file MatrixBlock.H.
References Foam::noexcept.
Referenced by MatrixBlock(), and MatrixBlock().

|
inlinenoexcept |
The number of elements in the block (m*n).
Definition at line 90 of file MatrixBlockI.H.
References Foam::noexcept.
|
inlinenoexcept |
Return row/column sizes of the block.
Definition at line 106 of file MatrixBlockI.H.
References Foam::noexcept.
|
inline |
(i, j) const element access operator
Definition at line 132 of file MatrixBlockI.H.
References checkIndex().
Referenced by operator Field< cmptType >(), operator=(), operator=(), operator=(), and operator=().


|
inline |
(i, j) element access operator
Definition at line 148 of file MatrixBlockI.H.
References checkIndex().

Convert a column of a matrix to a Field.
Definition at line 48 of file MatrixBlock.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, and operator()().

| void checkIndex | ( | const label | i, |
| const label | j ) const |
Check if (i, j) is within range of row-column limits.
Definition at line 117 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by operator()(), and operator()().


| void operator= | ( | const Matrix< Form, cmptType > & | Mb | ) |
Assignment to a compatible matrix.
Definition at line 142 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

| void operator= | ( | const ConstMatrixBlock< MatrixType > & | Mb | ) |
Assignment to a compatible const block.
Definition at line 167 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

| void operator= | ( | const MatrixBlock< MatrixType > & | Mb | ) |
Assignment to a compatible block.
Definition at line 195 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and MatrixBlock().

| void operator= | ( | const ConstMatrixBlock< MatrixType2 > & | Mb | ) |
Assignment to a compatible const block.
Definition at line 224 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

| void operator= | ( | const MatrixBlock< MatrixType2 > & | Mb | ) |
Assignment to a compatible block.
Definition at line 253 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and MatrixBlock().

| void operator= | ( | const MatrixSpace< MSForm, cmptType, Nrows, Ncols > & | ms | ) |
Assignment to a compatible MatrixSpace.
Definition at line 342 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

| void operator= | ( | const Block< SubTensor, BRowStart, BColStart > & | ) |
Assignment to a compatible MatrixSpace block.
| void operator= | ( | const VectorSpace< VSForm, cmptType, Ncmpts > & | ms | ) |
Assignment to a compatible VectorSpace (column-vector).
Definition at line 368 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and operator()().

| void operator= | ( | const Block< SubVector, BStart > & | ) |
Assignment to a compatible VectorSpace (column-vector) block.
Assignment to a Field (column-vector).
Definition at line 390 of file MatrixBlock.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, and operator()().

| void operator= | ( | const MSBlock< SubTensor, BRowStart, BColStart > & | Mb | ) |
Definition at line 288 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and operator()().

| void operator= | ( | const VSBlock< SubVector, BStart > & | Mb | ) |
Definition at line 319 of file MatrixBlock.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and operator()().
