| 58 | |
| 59 | template<class MatrixType> |
| 60 | Foam::MatrixBlock<MatrixType>::MatrixBlock |
| 61 | ( |
| 62 | MatrixType& matrix, |
| 63 | const label m, |
| 64 | const label n, |
| 65 | const label mStart, |
| 66 | const label nStart |
| 67 | ) |
| 68 | : |
| 69 | matrix_(matrix), |
| 70 | mRows_(m), |
| 71 | nCols_(n), |
| 72 | rowStart_(mStart), |
| 73 | colStart_(nStart) |
| 74 | { |
| 75 | #ifdef FULLDEBUG |
| 76 | if |
| 77 | ( |
| 78 | rowStart_ + mRows_ > matrix.m() |
| 79 | || colStart_ + nCols_ > matrix.n() |
| 80 | ) |
| 81 | { |
| 82 | FatalErrorInFunction |
| 83 | << "Block addresses outside matrix" |
| 84 | << abort(FatalError); |
| 85 | } |
| 86 | #endif |
| 87 | } |
| 88 | |
| 89 | |
| 90 | // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // |