| 27 | |
| 28 | template<class MatrixType> |
| 29 | Foam::ConstMatrixBlock<MatrixType>::ConstMatrixBlock |
| 30 | ( |
| 31 | const MatrixType& matrix, |
| 32 | const label m, |
| 33 | const label n, |
| 34 | const label mStart, |
| 35 | const label nStart |
| 36 | ) |
| 37 | : |
| 38 | matrix_(matrix), |
| 39 | mRows_(m), |
| 40 | nCols_(n), |
| 41 | rowStart_(mStart), |
| 42 | colStart_(nStart) |
| 43 | { |
| 44 | #ifdef FULLDEBUG |
| 45 | if |
| 46 | ( |
| 47 | rowStart_ + mRows_ > matrix.m() |
| 48 | || colStart_ + nCols_ > matrix.n() |
| 49 | ) |
| 50 | { |
| 51 | FatalErrorInFunction |
| 52 | << "Block addresses outside matrix" |
| 53 | << abort(FatalError); |
| 54 | } |
| 55 | #endif |
| 56 | } |
| 57 | |
| 58 | |
| 59 | template<class MatrixType> |