diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C index 4cdf0ac325..f2ad0802b0 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C @@ -125,23 +125,23 @@ Foam::CompactListList::CompactListList // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Foam::CompactListList::setSize(const label nRows) +void Foam::CompactListList::setSize(const label mRows) { - if (nRows == 0) + if (mRows == 0) { clear(); } - if (nRows < size()) + if (mRows < size()) { - size_ = nRows; - offsets_.setSize(nRows+1); - m_.setSize(offsets_[nRows]); + size_ = mRows; + offsets_.setSize(mRows+1); + m_.setSize(offsets_[mRows]); } - else if (nRows > size()) + else if (mRows > size()) { FatalErrorInFunction << "Cannot be used to extend the list from " << offsets_.size() - << " to " << nRows << nl + << " to " << mRows << nl << " Please use one of the other setSize member functions" << abort(FatalError); } @@ -151,12 +151,12 @@ void Foam::CompactListList::setSize(const label nRows) template void Foam::CompactListList::setSize ( - const label nRows, + const label mRows, const label nData ) { - size_ = nRows; - offsets_.setSize(nRows+1); + size_ = mRows; + offsets_.setSize(mRows+1); m_.setSize(nData); } @@ -164,13 +164,13 @@ void Foam::CompactListList::setSize template void Foam::CompactListList::setSize ( - const label nRows, + const label mRows, const label nData, const T& t ) { - size_ = nRows; - offsets_.setSize(nRows+1); + size_ = mRows; + offsets_.setSize(mRows+1); m_.setSize(nData, t); } diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H index d5764ba08d..fcb7ea2ba5 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H @@ -107,11 +107,11 @@ public: //- Construct given size of offset table (number of rows) // and number of data. - inline CompactListList(const label nRows, const label nData); + inline CompactListList(const label mRows, const label nData); //- Construct given size of offset table (number of rows), // the number of data and a value for all elements. - inline CompactListList(const label nRows, const label nData, const T&); + inline CompactListList(const label mRows, const label nData, const T&); //- Construct given list of row-sizes. explicit CompactListList(const labelUList& rowSizes); @@ -159,26 +159,26 @@ public: //- Reset size of CompactListList. // This form only allows contraction of the CompactListList. - void setSize(const label nRows); + void setSize(const label mRows); //- Reset size of CompactListList. - void setSize(const label nRows, const label nData); + void setSize(const label mRows, const label nData); //- Reset sizes of CompactListList and value for new elements. - void setSize(const label nRows, const label nData, const T&); + void setSize(const label mRows, const label nData, const T&); //- Reset size of CompactListList. void setSize(const labelUList& rowSizes); //- Reset size of CompactListList. // This form only allows contraction of the CompactListList. - inline void resize(const label nRows); + inline void resize(const label mRows); //- Reset size of CompactListList. - inline void resize(const label nRows, const label nData); + inline void resize(const label mRows, const label nData); //- Reset sizes of CompactListList and value for new elements. - inline void resize(const label nRows, const label nData, const T&); + inline void resize(const label mRows, const label nData, const T&); //- Reset size of CompactListList. inline void resize(const labelUList& rowSizes); diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H index 4abf848915..2072887cc5 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H @@ -38,12 +38,12 @@ inline Foam::CompactListList::CompactListList() template inline Foam::CompactListList::CompactListList ( - const label nRows, + const label mRows, const label nData ) : - size_(nRows), - offsets_(nRows+1, 0), + size_(mRows), + offsets_(mRows+1, 0), m_(nData) {} @@ -51,13 +51,13 @@ inline Foam::CompactListList::CompactListList template inline Foam::CompactListList::CompactListList ( - const label nRows, + const label mRows, const label nData, const T& t ) : - size_(nRows), - offsets_(nRows+1, 0), + size_(mRows), + offsets_(mRows+1, 0), m_(nData, t) {} @@ -173,32 +173,32 @@ Foam::CompactListList::xfer() template -inline void Foam::CompactListList::resize(const label nRows) +inline void Foam::CompactListList::resize(const label mRows) { - this->setSize(nRows); + this->setSize(mRows); } template inline void Foam::CompactListList::resize ( - const label nRows, + const label mRows, const label nData ) { - this->setSize(nRows, nData); + this->setSize(mRows, nData); } template inline void Foam::CompactListList::resize ( - const label nRows, + const label mRows, const label nData, const T& t ) { - this->setSize(nRows, nData, t); + this->setSize(mRows, nData, t); } diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H index 82be15ee5a..ee93041791 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H @@ -244,14 +244,14 @@ label findLower //- To construct a List from a C array. Has extra Container type // to initialise e.g. wordList from arrays of char*. -template -List initList(const T[nRows]); +template +List initList(const T[mRows]); //- To construct a (square) ListList from a C array. Has extra Container type // to initialise e.g. faceList from arrays of labels. -template -List initListList(const T[nRows][nColumns]); +template +List initListList(const T[mRows][nColumns]); //- Helper class for list to append y onto the end of x diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C index 7194a89eb7..bb20707a77 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C @@ -687,10 +687,10 @@ Foam::label Foam::findLower } -template -Foam::List Foam::initList(const T elems[nRows]) +template +Foam::List Foam::initList(const T elems[mRows]) { - List lst(nRows); + List lst(mRows); forAll(lst, rowI) { @@ -700,10 +700,10 @@ Foam::List Foam::initList(const T elems[nRows]) } -template -Foam::List Foam::initListList(const T elems[nRows][nColumns]) +template +Foam::List Foam::initListList(const T elems[mRows][nColumns]) { - List lst(nRows); + List lst(mRows); Container cols(nColumns); forAll(lst, rowI) diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C index 5c811d20c3..5a4076633d 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C @@ -144,13 +144,13 @@ Foam::LUscalarMatrix::LUscalarMatrix if (Pstream::master(comm_)) { - label nRows = m(); + label mRows = m(); label nColumns = n(); if (debug) { - Pout<< "LUscalarMatrix : size:" << nRows << endl; - for (label rowI = 0; rowI < nRows; rowI++) + Pout<< "LUscalarMatrix : size:" << mRows << endl; + for (label rowI = 0; rowI < mRows; rowI++) { const scalar* row = operator[](rowI); diff --git a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H index d93310ed26..8fa5397c2d 100644 --- a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H +++ b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpace.H @@ -52,21 +52,21 @@ namespace Foam Class MatrixSpace Declaration \*---------------------------------------------------------------------------*/ -template +template class MatrixSpace : - public VectorSpace + public VectorSpace { public: //- MatrixSpace type - typedef MatrixSpace msType; + typedef MatrixSpace msType; // Member constants - static const direction nRows = Nrows; + static const direction mRows = Mrows; static const direction nCols = Ncols; @@ -75,7 +75,7 @@ public: //- Return the number of rows static direction m() { - return Nrows; + return Mrows; } //- Return the number of columns @@ -99,13 +99,13 @@ public: public: - static const direction nRows = SubTensor::nRows; + static const direction mRows = SubTensor::mRows; static const direction nCols = SubTensor::nCols; //- Return the number of rows in the block static direction m() { - return nRows; + return mRows; } //- Return the number of columns in the block @@ -143,13 +143,13 @@ public: public: - static const direction nRows = SubTensor::nRows; + static const direction mRows = SubTensor::mRows; static const direction nCols = SubTensor::nCols; //- Return the number of rows in the block static direction m() { - return nRows; + return mRows; } //- Return the number of columns in the block @@ -169,7 +169,7 @@ public: < Form2, Cmpt, - SubTensor::nRows, + SubTensor::mRows, SubTensor::nCols >& matrix ); @@ -178,7 +178,7 @@ public: template inline void operator= ( - const VectorSpace& v + const VectorSpace& v ); //- Construct and return the sub-ensor corresponding to this block @@ -208,7 +208,7 @@ public: template inline explicit MatrixSpace ( - const VectorSpace& + const VectorSpace& ); //- Construct from a block of another matrix space diff --git a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H index e7ae70ec6b..2aa3a4d52b 100644 --- a/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H +++ b/src/OpenFOAM/primitives/MatrixSpace/MatrixSpaceI.H @@ -27,13 +27,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::MatrixSpace::MatrixSpace() +template +inline Foam::MatrixSpace::MatrixSpace() {} -template -inline Foam::MatrixSpace::MatrixSpace +template +inline Foam::MatrixSpace::MatrixSpace ( const Foam::zero ) @@ -42,30 +42,30 @@ inline Foam::MatrixSpace::MatrixSpace {} -template +template template -inline Foam::MatrixSpace::MatrixSpace +inline Foam::MatrixSpace::MatrixSpace ( - const VectorSpace& vs + const VectorSpace& vs ) : MatrixSpace::vsType(vs) {} -template +template template < template class Block2, Foam::direction BRowStart, Foam::direction BColStart > -inline Foam::MatrixSpace::MatrixSpace +inline Foam::MatrixSpace::MatrixSpace ( const Block2& block ) { - for (direction i=0; i::MatrixSpace } -template -inline Foam::MatrixSpace::MatrixSpace(Istream& is) +template +inline Foam::MatrixSpace::MatrixSpace(Istream& is) : MatrixSpace::vsType(is) {} -template +template template -inline Foam::MatrixSpace:: +inline Foam::MatrixSpace:: ConstBlock:: ConstBlock(const msType& matrix) : matrix_(matrix) { - StaticAssert(msType::nRows >= BRowStart + nRows); + StaticAssert(msType::mRows >= BRowStart + mRows); StaticAssert(msType::nCols >= BColStart + nCols); } -template +template template -inline Foam::MatrixSpace:: +inline Foam::MatrixSpace:: Block:: Block(msType& matrix) : matrix_(matrix) { - StaticAssert(msType::nRows >= BRowStart + nRows); + StaticAssert(msType::mRows >= BRowStart + mRows); StaticAssert(msType::nCols >= BColStart + nCols); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template +template template -inline const Cmpt& Foam::MatrixSpace::elmt() const +inline const Cmpt& Foam::MatrixSpace::elmt() const { - StaticAssert(Row < Nrows && Col < Ncols); + StaticAssert(Row < Mrows && Col < Ncols); return this->v_[Row*Ncols + Col]; } -template +template template -inline Cmpt& Foam::MatrixSpace::elmt() +inline Cmpt& Foam::MatrixSpace::elmt() { - StaticAssert(Row < Nrows && Col < Ncols); + StaticAssert(Row < Mrows && Col < Ncols); return this->v_[Row*Ncols + Col]; } -template -inline const Cmpt& Foam::MatrixSpace::xx() const +template +inline const Cmpt& Foam::MatrixSpace::xx() const { return elmt<0, 0>(); } -template -inline Cmpt& Foam::MatrixSpace::xx() +template +inline Cmpt& Foam::MatrixSpace::xx() { return elmt<0, 0>(); } -template -inline const Cmpt& Foam::MatrixSpace::xy() const +template +inline const Cmpt& Foam::MatrixSpace::xy() const { return elmt<0,1>(); } -template -inline Cmpt& Foam::MatrixSpace::xy() +template +inline Cmpt& Foam::MatrixSpace::xy() { return elmt<0,1>(); } -template -inline const Cmpt& Foam::MatrixSpace::xz() const +template +inline const Cmpt& Foam::MatrixSpace::xz() const { return elmt<0,2>(); } -template -inline Cmpt& Foam::MatrixSpace::xz() +template +inline Cmpt& Foam::MatrixSpace::xz() { return elmt<0,2>(); } -template -inline const Cmpt& Foam::MatrixSpace::yx() const +template +inline const Cmpt& Foam::MatrixSpace::yx() const { return elmt<1,0>(); } -template -inline Cmpt& Foam::MatrixSpace::yx() +template +inline Cmpt& Foam::MatrixSpace::yx() { return elmt<1,0>(); } -template -inline const Cmpt& Foam::MatrixSpace::yy() const +template +inline const Cmpt& Foam::MatrixSpace::yy() const { return elmt<1,1>(); } -template -inline Cmpt& Foam::MatrixSpace::yy() +template +inline Cmpt& Foam::MatrixSpace::yy() { return elmt<1,1>(); } -template -inline const Cmpt& Foam::MatrixSpace::yz() const +template +inline const Cmpt& Foam::MatrixSpace::yz() const { return elmt<1,2>(); } -template -inline Cmpt& Foam::MatrixSpace::yz() +template +inline Cmpt& Foam::MatrixSpace::yz() { return elmt<1,2>(); } -template -inline const Cmpt& Foam::MatrixSpace::zx() const +template +inline const Cmpt& Foam::MatrixSpace::zx() const { return elmt<2,0>(); } -template -inline Cmpt& Foam::MatrixSpace::zx() +template +inline Cmpt& Foam::MatrixSpace::zx() { return elmt<2,0>(); } -template -inline const Cmpt& Foam::MatrixSpace::zy() const +template +inline const Cmpt& Foam::MatrixSpace::zy() const { return elmt<2,1>(); } -template -inline Cmpt& Foam::MatrixSpace::zy() +template +inline Cmpt& Foam::MatrixSpace::zy() { return elmt<2,1>(); } -template -inline const Cmpt& Foam::MatrixSpace::zz() const +template +inline const Cmpt& Foam::MatrixSpace::zz() const { return elmt<2,2>(); } -template -inline Cmpt& Foam::MatrixSpace::zz() +template +inline Cmpt& Foam::MatrixSpace::zz() { return elmt<2,2>(); } -template -inline Foam::MatrixSpace -Foam::MatrixSpace::identity() +template +inline Foam::MatrixSpace +Foam::MatrixSpace::identity() { - StaticAssert(Nrows == Ncols); + StaticAssert(Mrows == Ncols); msType result(Zero); for (direction i=0; i::identity() } -template +template inline typename Foam::typeOfTranspose::type -Foam::MatrixSpace::T() const +Foam::MatrixSpace::T() const { typename typeOfTranspose::type result; - for (direction i=0; i::T() const } -template +template template < class SubTensor, Foam::direction BRowStart, Foam::direction BColStart > -inline typename Foam::MatrixSpace::template +inline typename Foam::MatrixSpace::template ConstBlock -Foam::MatrixSpace::block() const +Foam::MatrixSpace::block() const { return *this; } -template +template template < class SubTensor, @@ -309,9 +309,9 @@ template Foam::direction BColStart > inline -typename Foam::MatrixSpace::template +typename Foam::MatrixSpace::template Block -Foam::MatrixSpace::block() +Foam::MatrixSpace::block() { return *this; } @@ -319,15 +319,15 @@ Foam::MatrixSpace::block() // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline const Cmpt& Foam::MatrixSpace::operator() +template +inline const Cmpt& Foam::MatrixSpace::operator() ( const direction& i, const direction& j ) const { #ifdef FULLDEBUG - if (i > Nrows-1 || j > Ncols-1) + if (i > Mrows-1 || j > Ncols-1) { FatalErrorInFunction << "indices out of range" @@ -339,15 +339,15 @@ inline const Cmpt& Foam::MatrixSpace::operator() } -template -inline Cmpt& Foam::MatrixSpace::operator() +template +inline Cmpt& Foam::MatrixSpace::operator() ( const direction& i, const direction& j ) { #ifdef FULLDEBUG - if (i > Nrows-1 || j > Ncols-1) + if (i > Mrows-1 || j > Ncols-1) { FatalErrorInFunction << "indices out of range" @@ -359,10 +359,10 @@ inline Cmpt& Foam::MatrixSpace::operator() } -template +template template inline SubTensor -Foam::MatrixSpace:: +Foam::MatrixSpace:: ConstBlock:: operator()() const { @@ -370,10 +370,10 @@ operator()() const } -template +template template inline const Cmpt& -Foam::MatrixSpace:: +Foam::MatrixSpace:: ConstBlock:: operator()(const direction i, const direction j) const { @@ -381,10 +381,10 @@ operator()(const direction i, const direction j) const } -template +template template inline SubTensor -Foam::MatrixSpace:: +Foam::MatrixSpace:: Block:: operator()() const { @@ -392,10 +392,10 @@ operator()() const } -template +template template inline const Cmpt& -Foam::MatrixSpace:: +Foam::MatrixSpace:: Block:: operator()(const direction i, const direction j) const { @@ -403,10 +403,10 @@ operator()(const direction i, const direction j) const } -template +template template inline Cmpt& -Foam::MatrixSpace:: +Foam::MatrixSpace:: Block:: operator()(const direction i, const direction j) { @@ -414,8 +414,8 @@ operator()(const direction i, const direction j) } -template -inline void Foam::MatrixSpace::operator= +template +inline void Foam::MatrixSpace::operator= ( const Foam::zero ) @@ -424,9 +424,9 @@ inline void Foam::MatrixSpace::operator= } -template +template template -inline void Foam::MatrixSpace::operator&= +inline void Foam::MatrixSpace::operator&= ( const MatrixSpace& matrix ) @@ -435,19 +435,19 @@ inline void Foam::MatrixSpace::operator&= } -template +template template < template class Block2, Foam::direction BRowStart, Foam::direction BColStart > -inline void Foam::MatrixSpace::operator= +inline void Foam::MatrixSpace::operator= ( const Block2& block ) { - for (direction i = 0; i < Nrows; ++i) + for (direction i = 0; i < Mrows; ++i) { for (direction j = 0; j < Ncols; ++j) { @@ -457,18 +457,18 @@ inline void Foam::MatrixSpace::operator= } -template +template template template inline void -Foam::MatrixSpace:: +Foam::MatrixSpace:: Block:: operator= ( - const MatrixSpace& matrix + const MatrixSpace& matrix ) { - for (direction i=0; i +template template template inline void -Foam::MatrixSpace:: +Foam::MatrixSpace:: Block:: operator= ( - const VectorSpace& v + const VectorSpace& v ) { StaticAssert(nCols == 1); - for (direction i=0; i +template inline typename typeOfTranspose::type T ( - const MatrixSpace& matrix + const MatrixSpace& matrix ) { return matrix.T(); @@ -539,26 +539,26 @@ template class Form1, class Form2, class Cmpt, - direction Nrows1, + direction Mrows1, direction Ncols1, - direction Nrows2, + direction Mrows2, direction Ncols2 > inline typename typeOfInnerProduct::type operator& ( - const MatrixSpace& matrix1, - const MatrixSpace& matrix2 + const MatrixSpace& matrix1, + const MatrixSpace& matrix2 ) { - StaticAssert(Ncols1 == Nrows2); + StaticAssert(Ncols1 == Mrows2); typename typeOfInnerProduct::type result(Zero); - for (direction i=0; i::type operator& } -template +template inline typename typeOfInnerProduct::type operator& ( - const MatrixSpace& matrix, + const MatrixSpace& matrix, const VectorSpace& v ) { typename typeOfInnerProduct::type result(Zero); - for (direction i=0; i