From 72300041df8d01793c9f8def394da9b006c3e641 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 30 Jun 2015 10:26:44 +0100 Subject: [PATCH] Removed use of the deprecated "register" keyword http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340.html --- .../test/HashingSpeed/Test-HashingSpeed.C | 10 ++--- .../test/speed/scalarSpeed/Test-scalarSpeed.C | 20 +++++----- .../test/speed/vectorSpeed/Test-vectorSpeed.C | 2 +- .../mesh/conversion/cfx4ToFoam/cfx4ToFoam.C | 4 +- .../fluent3DMeshToFoam/fluent3DMeshToFoam.L | 2 +- src/ODE/ODESolvers/EulerSI/EulerSI.C | 6 +-- .../ODESolvers/Rosenbrock12/Rosenbrock12.C | 6 +-- .../ODESolvers/Rosenbrock23/Rosenbrock23.C | 6 +-- .../ODESolvers/Rosenbrock34/Rosenbrock34.C | 6 +-- src/ODE/ODESolvers/SIBS/SIBS.C | 14 +++---- src/ODE/ODESolvers/SIBS/SIMPR.C | 20 +++++----- src/ODE/ODESolvers/SIBS/polyExtrapolate.C | 12 +++--- src/ODE/ODESolvers/rodas23/rodas23.C | 6 +-- src/ODE/ODESolvers/rodas34/rodas34.C | 6 +-- .../LinkedLists/accessTypes/LList/LListIO.C | 6 +-- .../containers/Lists/FixedList/FixedListI.H | 24 ++++++------ .../containers/Lists/FixedList/FixedListIO.C | 6 +-- src/OpenFOAM/containers/Lists/List/List.C | 12 +++--- src/OpenFOAM/containers/Lists/List/ListIO.C | 6 +-- .../containers/Lists/List/ListLoopM.H | 12 +++--- .../containers/Lists/PackedList/PackedList.C | 8 ++-- .../containers/Lists/PtrList/PtrList.C | 6 +-- src/OpenFOAM/containers/Lists/UList/UListIO.C | 8 ++-- .../containers/Lists/UPtrList/UPtrList.C | 4 +- .../db/IOstreams/Pstreams/UIPstream.C | 8 ++-- .../db/IOstreams/Pstreams/UOPstream.C | 6 +-- src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C | 14 +++---- src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C | 12 +++--- src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.C | 4 +- src/OpenFOAM/graph/curve/curve.C | 6 +-- .../matrices/LUscalarMatrix/LUscalarMatrix.C | 30 +++++++-------- .../LduMatrix/LduMatrix/LduMatrixATmul.C | 34 ++++++++--------- .../LduMatrix/LduMatrix/LduMatrixOperations.C | 16 ++++---- .../DILUPreconditioner/TDILUPreconditioner.C | 38 +++++++++---------- .../DiagonalPreconditioner.C | 10 ++--- .../GaussSeidel/TGaussSeidelSmoother.C | 36 +++++++++--------- .../LduMatrix/Solvers/PBiCCCG/PBiCCCG.C | 10 ++--- .../LduMatrix/Solvers/PBiCICG/PBiCICG.C | 10 ++--- .../matrices/LduMatrix/Solvers/PCICG/PCICG.C | 10 ++--- src/OpenFOAM/matrices/Matrix/Matrix.C | 34 ++++++++--------- src/OpenFOAM/matrices/Matrix/MatrixIO.C | 18 ++++----- .../processorLduInterfaceTemplates.C | 6 +-- .../lduMatrix/lduMatrix/lduMatrixATmul.C | 38 +++++++++---------- .../lduMatrix/lduMatrix/lduMatrixOperations.C | 10 ++--- .../lduMatrix/lduMatrix/lduMatrixTemplates.C | 8 ++-- .../DICPreconditioner/DICPreconditioner.C | 22 +++++------ .../DILUPreconditioner/DILUPreconditioner.C | 38 +++++++++---------- .../FDICPreconditioner/FDICPreconditioner.C | 24 ++++++------ .../diagonalPreconditioner.C | 10 ++--- .../noPreconditioner/noPreconditioner.C | 6 +-- .../lduMatrix/smoothers/DIC/DICSmoother.C | 14 +++---- .../lduMatrix/smoothers/DILU/DILUSmoother.C | 14 +++---- .../lduMatrix/smoothers/FDIC/FDICSmoother.C | 20 +++++----- .../GaussSeidel/GaussSeidelSmoother.C | 30 +++++++-------- .../nonBlockingGaussSeidelSmoother.C | 36 +++++++++--------- .../symGaussSeidel/symGaussSeidelSmoother.C | 36 +++++++++--------- .../solvers/GAMG/GAMGSolverInterpolate.C | 20 +++++----- .../matrices/lduMatrix/solvers/PBiCG/PBiCG.C | 10 ++--- .../matrices/lduMatrix/solvers/PCG/PCG.C | 10 ++--- .../matrices/scalarMatrices/scalarMatrices.C | 34 ++++++++--------- .../scalarMatrices/scalarMatricesTemplates.C | 34 ++++++++--------- src/OpenFOAM/meshes/meshShapes/cell/cell.C | 4 +- src/OpenFOAM/meshes/meshShapes/face/face.C | 10 ++--- .../meshes/meshShapes/face/faceTemplates.C | 6 +-- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 4 +- .../PrimitivePatch/PrimitivePatchMeshEdges.C | 4 +- src/OpenFOAM/primitives/ints/label/label.C | 6 +-- src/OpenFOAM/primitives/ints/uLabel/uLabel.C | 6 +-- .../primitives/strings/fileName/fileName.C | 16 ++++---- .../primitives/strings/string/string.C | 10 ++--- .../primitives/strings/string/stringI.H | 6 +-- .../enrichedPatch/enrichedPatchPointPoints.C | 4 +- .../leastSquaresGrad/leastSquaresGrad.C | 6 +-- .../biLinearFit/biLinearFitPolynomial.H | 4 +- .../cubicUpwindFit/cubicUpwindFitPolynomial.H | 4 +- .../schemes/linearFit/linearFitPolynomial.H | 4 +- .../quadraticFit/quadraticFitPolynomial.H | 4 +- .../quadraticLinearFitPolynomial.H | 4 +- .../quadraticLinearUpwindFitPolynomial.H | 4 +- .../quadraticUpwindFitPolynomial.H | 4 +- .../surfaceInterpolationScheme.C | 6 +-- .../simpleGeomDecomp/simpleGeomDecomp.C | 6 +-- .../calculateMeshToMesh0Addressing.C | 2 +- src/surfMesh/surfaceFormats/obj/OBJstream.C | 10 ++--- .../chemistryModel/chemistrySolver/ode/ode.C | 4 +- .../specie/thermo/janaf/janafThermoI.H | 12 +++--- 86 files changed, 539 insertions(+), 539 deletions(-) diff --git a/applications/test/HashingSpeed/Test-HashingSpeed.C b/applications/test/HashingSpeed/Test-HashingSpeed.C index 529edd3fec..7e89d44f8b 100644 --- a/applications/test/HashingSpeed/Test-HashingSpeed.C +++ b/applications/test/HashingSpeed/Test-HashingSpeed.C @@ -796,8 +796,8 @@ static uint32_t crc_table[256]; #define CRC32POLYNOMIAL 0x04c11db7L static void GenerateCRC32Table (void) { -register int i, j; -register uint32_t crc_accum; +int i, j; +uint32_t crc_accum; for ( i = 0; i < 256; i++ ) { crc_accum = ( (unsigned long) i << 24 ); @@ -821,8 +821,8 @@ static uint32_t UpdateCRC32 const char *data_blk_ptr, int data_blk_size ) { -register int j; -register uint8_t i; +int j; +uint8_t i; for (j = 0; j < data_blk_size; j++) { i = (crc_accum >> 24) ^ *data_blk_ptr++; @@ -1017,7 +1017,7 @@ int i; uint32_t stroustrup (const char * s, int len) { uint32_t h; - for (register int i=0; i < len; ++s, ++i) + for (int i=0; i < len; ++s, ++i) { h = (h << 1) ^ (unsigned char) s[i]; } diff --git a/applications/test/speed/scalarSpeed/Test-scalarSpeed.C b/applications/test/speed/scalarSpeed/Test-scalarSpeed.C index e1858e2d42..6e46d90cc8 100644 --- a/applications/test/speed/scalarSpeed/Test-scalarSpeed.C +++ b/applications/test/speed/scalarSpeed/Test-scalarSpeed.C @@ -26,7 +26,7 @@ int main() label* redAddr = new label[size]; label* redAddr2 = new label[size]; - for (register label i=0; i{space}{lbrac} { // Quickly scan to the end of the cell data block and discard - register int c; + int c; while ((c = yyinput()) != 0 && c != ')') {} } diff --git a/src/ODE/ODESolvers/EulerSI/EulerSI.C b/src/ODE/ODESolvers/EulerSI/EulerSI.C index 9b28f733ea..91a60461a1 100644 --- a/src/ODE/ODESolvers/EulerSI/EulerSI.C +++ b/src/ODE/ODESolvers/EulerSI/EulerSI.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,9 +63,9 @@ Foam::scalar Foam::EulerSI::solve { odes_.jacobian(x0, y0, dfdx_, dfdy_); - for (register label i=0; i>(Istream& is, LList& L) { if (delimiter == token::BEGIN_LIST) { - for (register label i=0; i> element; @@ -76,7 +76,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList& L) T element; is >> element; - for (register label i=0; i::FixedList() template inline Foam::FixedList::FixedList(const T v[Size]) { - for (register unsigned i=0; i::FixedList(const T v[Size]) template inline Foam::FixedList::FixedList(const T& t) { - for (register unsigned i=0; i::FixedList(const UList& lst) { checkSize(lst.size()); - for (register unsigned i=0; i::FixedList(const SLList& lst) { checkSize(lst.size()); - register label i = 0; + label i = 0; for ( typename SLList::const_iterator iter = lst.begin(); @@ -87,7 +87,7 @@ inline Foam::FixedList::FixedList(const SLList& lst) template inline Foam::FixedList::FixedList(const FixedList& lst) { - for (register unsigned i=0; i::setSize(const label s) template inline void Foam::FixedList::transfer(const FixedList& lst) { - for (register unsigned i=0; i::operator[](const label i) const template inline void Foam::FixedList::operator=(const T lst[Size]) { - for (register unsigned i=0; i::operator=(const UList& lst) { checkSize(lst.size()); - for (register unsigned i=0; i::operator=(const SLList& lst) { checkSize(lst.size()); - register label i = 0; + label i = 0; for ( typename SLList::const_iterator iter = lst.begin(); @@ -299,7 +299,7 @@ inline void Foam::FixedList::operator=(const SLList& lst) template inline void Foam::FixedList::operator=(const T& t) { - for (register unsigned i=0; i::Hash::operator() // hash incrementally unsigned val = seed; - for (register unsigned i=0; i>(Foam::Istream& is, FixedList& L) if (delimiter == token::BEGIN_LIST) { - for (register unsigned i=0; i> L[i]; @@ -107,7 +107,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList& L) "reading the single entry" ); - for (register unsigned i=0; i::setSize(const label newSize) if (this->size_) { - register label i = min(this->size_, newSize); + label i = min(this->size_, newSize); # ifdef USEMEMCPY if (contiguous()) @@ -342,8 +342,8 @@ void Foam::List::setSize(const label newSize) else # endif { - register T* vv = &this->v_[i]; - register T* av = &nv[i]; + T* vv = &this->v_[i]; + T* av = &nv[i]; while (i--) *--av = *--vv; } } @@ -368,8 +368,8 @@ void Foam::List::setSize(const label newSize, const T& a) if (newSize > oldSize) { - register label i = newSize - oldSize; - register T* vv = &this->v_[newSize]; + label i = newSize - oldSize; + T* vv = &this->v_[newSize]; while (i--) *--vv = a; } } diff --git a/src/OpenFOAM/containers/Lists/List/ListIO.C b/src/OpenFOAM/containers/Lists/List/ListIO.C index 718824b13f..51c7805d72 100644 --- a/src/OpenFOAM/containers/Lists/List/ListIO.C +++ b/src/OpenFOAM/containers/Lists/List/ListIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List& L) { if (delimiter == token::BEGIN_LIST) { - for (register label i=0; i> L[i]; @@ -102,7 +102,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List& L) "reading the single entry" ); - for (register label i=0; i unsigned int Foam::PackedList::count() const { - register unsigned int c = 0; + unsigned int c = 0; if (size_) { const label packLen = packedLength(); for (label i = 0; i < packLen; ++i) { - register unsigned int bits = StorageList::operator[](i); + unsigned int bits = StorageList::operator[](i); COUNT_PACKEDBITS(c, bits); } } @@ -282,7 +282,7 @@ Foam::Istream& Foam::PackedList::read(Istream& is) { if (delimiter == token::BEGIN_LIST) { - for (register label i=0; i::setSize(const label newSize) } else if (newSize < oldSize) { - register label i; + label i; for (i=newSize; i::setSize(const label newSize) { ptrs_.setSize(newSize); - register label i; + label i; for (i=oldSize; i>(Istream& is, UList& L) << " expected " << L.size() << exit(FatalIOError); } - for (register label i=0; i>(Istream& is, UList& L) { if (delimiter == token::BEGIN_LIST) { - for (register label i=0; i> L[i]; @@ -217,7 +217,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList& L) "reading the single entry" ); - for (register label i=0; i::setSize(const label newSize) ptrs_.setSize(newSize); // set new elements to NULL - for (register label i=oldSize; i(data); - register size_t i = count; + const char* bufPtr = &externalBuf_[externalBufPosition_]; + char* dataPtr = reinterpret_cast(data); + size_t i = count; while (i--) *dataPtr++ = *bufPtr++; externalBufPosition_ += count; checkEof(); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C index 2608c65e6c..203c45f5db 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,8 +76,8 @@ inline void Foam::UOPstream::writeToBuffer // Extend if necessary sendBuf_.setSize(alignedPos + count); - register const char* dataPtr = reinterpret_cast(data); - register size_t i = count; + const char* dataPtr = reinterpret_cast(data); + size_t i = count; while (i--) sendBuf_[alignedPos++] = *dataPtr++; } diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C index 69a93ec48a..119da7dd12 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -413,8 +413,8 @@ Foam::Istream& Foam::ISstream::read(word& str) static const int errLen = 80; // truncate error message for readability static char buf[maxLen]; - register int nChar = 0; - register int listDepth = 0; + int nChar = 0; + int listDepth = 0; char c; while (get(c) && word::valid(c)) @@ -505,7 +505,7 @@ Foam::Istream& Foam::ISstream::read(string& str) return *this; } - register int nChar = 0; + int nChar = 0; bool escaped = false; while (get(c)) @@ -586,8 +586,8 @@ Foam::Istream& Foam::ISstream::readVariable(string& str) static const int errLen = 80; // truncate error message for readability static char buf[maxLen]; - register int nChar = 0; - register int blockCount = 0; + int nChar = 0; + int blockCount = 0; char c; if (!get(c) || c != '$') @@ -708,7 +708,7 @@ Foam::Istream& Foam::ISstream::readVerbatim(string& str) char c; - register int nChar = 0; + int nChar = 0; while (get(c)) { diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C index c89fb07504..1657e755bc 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,10 +80,10 @@ Foam::Ostream& Foam::OSstream::write(const string& str) { os_ << token::BEGIN_STRING; - register int backslash = 0; + int backslash = 0; for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter) { - register char c = *iter; + char c = *iter; if (c == '\\') { @@ -131,7 +131,7 @@ Foam::Ostream& Foam::OSstream::writeQuoted { os_ << token::BEGIN_STRING; - register int backslash = 0; + int backslash = 0; for ( string::const_iterator iter = str.begin(); @@ -139,7 +139,7 @@ Foam::Ostream& Foam::OSstream::writeQuoted ++iter ) { - register char c = *iter; + char c = *iter; if (c == '\\') { @@ -236,7 +236,7 @@ Foam::Ostream& Foam::OSstream::write(const char* buf, std::streamsize count) void Foam::OSstream::indent() { - for (register unsigned short i = 0; i < indentLevel_*indentSize_; i++) + for (unsigned short i = 0; i < indentLevel_*indentSize_; i++) { os_ << ' '; } diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.C b/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.C index e79d27420d..fd1033dd20 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/ReadHex.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ T Foam::ReadHex(ISstream& is) while (is.get(c) && isspace(c)) {} - register T result = 0; + T result = 0; do { if (isspace(c) || c == 0) break; diff --git a/src/OpenFOAM/graph/curve/curve.C b/src/OpenFOAM/graph/curve/curve.C index 4e0206ebc9..738179a777 100644 --- a/src/OpenFOAM/graph/curve/curve.C +++ b/src/OpenFOAM/graph/curve/curve.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ curve::curve(const curve& Curve, const label nFacets) { // Calculate curve length scalar curveLength=0; - register label i; + label i; for (i=0; i::Amul Apsi ); - register const label nCells = diag().size(); - for (register label cell=0; cell::Tmul Tpsi ); - register const label nCells = diag().size(); - for (register label cell=0; cell::sumA const LUType* __restrict__ lowerPtr = lower().begin(); const LUType* __restrict__ upperPtr = upper().begin(); - register const label nCells = diag().size(); - register const label nFaces = upper().size(); + const label nCells = diag().size(); + const label nFaces = upper().size(); - for (register label cell=0; cell::one); } - for (register label face=0; face::one); sumAPtr[lPtr[face]] += dot(upperPtr[face], pTraits::one); @@ -255,15 +255,15 @@ void Foam::LduMatrix::residual rA ); - register const label nCells = diag().size(); - for (register label cell=0; cell::sumDiag() const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& u = lduAddr().upperAddr(); - for (register label face=0; face::negSumDiag() const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& u = lduAddr().upperAddr(); - for (register label face=0; face::sumMagOffDiag const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& u = lduAddr().upperAddr(); - for (register label face = 0; face < l.size(); face++) + for (label face = 0; face < l.size(); face++) { sumOff[u[face]] += cmptMag(Lower[face]); sumOff[l[face]] += cmptMag(Upper[face]); @@ -106,9 +106,9 @@ Foam::LduMatrix::H(const Field& psi) const const LUType* __restrict__ lowerPtr = lower().begin(); const LUType* __restrict__ upperPtr = upper().begin(); - register const label nFaces = upper().size(); + const label nFaces = upper().size(); - for (register label face=0; face::faceH(const Field& psi) const tmp > tfaceHpsi(new Field (Lower.size())); Field & faceHpsi = tfaceHpsi(); - for (register label face=0; face::operator*= const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& u = lduAddr().upperAddr(); - for (register label face=0; face::calcInvD const LUType* const __restrict__ upperPtr = matrix.upper().begin(); const LUType* const __restrict__ lowerPtr = matrix.lower().begin(); - register label nFaces = matrix.upper().size(); - for (register label face=0; face::calcInvD // Calculate the reciprocal of the preconditioned diagonal - register label nCells = rD.size(); + label nCells = rD.size(); - for (register label cell=0; cell::precondition const LUType* const __restrict__ lowerPtr = this->solver_.matrix().lower().begin(); - register label nCells = wA.size(); - register label nFaces = this->solver_.matrix().upper().size(); - register label nFacesM1 = nFaces - 1; + label nCells = wA.size(); + label nFaces = this->solver_.matrix().upper().size(); + label nFacesM1 = nFaces - 1; - for (register label cell=0; cell=0; face--) + for (label face=nFacesM1; face>=0; face--) { wAPtr[lPtr[face]] -= dot(rDPtr[lPtr[face]], dot(upperPtr[face], wAPtr[uPtr[face]])); @@ -149,25 +149,25 @@ void Foam::TDILUPreconditioner::preconditionT const LUType* const __restrict__ lowerPtr = this->solver_.matrix().lower().begin(); - register label nCells = wT.size(); - register label nFaces = this->solver_.matrix().upper().size(); - register label nFacesM1 = nFaces - 1; + label nCells = wT.size(); + label nFaces = this->solver_.matrix().upper().size(); + label nFacesM1 = nFaces - 1; - for (register label cell=0; cell=0; face--) + for (label face=nFacesM1; face>=0; face--) { sface = losortPtr[face]; wTPtr[lPtr[sface]] -= diff --git a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C index 077704aee7..b85e2f91d7 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C +++ b/src/OpenFOAM/matrices/LduMatrix/Preconditioners/DiagonalPreconditioner/DiagonalPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,10 +40,10 @@ Foam::DiagonalPreconditioner::DiagonalPreconditioner DType* __restrict__ rDPtr = rD.begin(); const DType* __restrict__ DPtr = this->solver_.matrix().diag().begin(); - register label nCells = rD.size(); + label nCells = rD.size(); // Generate inverse (reciprocal for scalar) diagonal - for (register label cell=0; cell::precondition const Type* __restrict__ rAPtr = rA.begin(); const DType* __restrict__ rDPtr = rD.begin(); - register label nCells = wA.size(); + label nCells = wA.size(); - for (register label cell=0; cell::TGaussSeidelSmoother ), rD_(matrix.diag().size()) { - register const label nCells = matrix.diag().size(); - register const DType* const __restrict__ diagPtr = matrix.diag().begin(); - register DType* __restrict__ rDPtr = rD_.begin(); + const label nCells = matrix.diag().size(); + const DType* const __restrict__ diagPtr = matrix.diag().begin(); + DType* __restrict__ rDPtr = rD_.begin(); - for (register label cellI=0; cellI::smooth const label nSweeps ) { - register Type* __restrict__ psiPtr = psi.begin(); + Type* __restrict__ psiPtr = psi.begin(); - register const label nCells = psi.size(); + const label nCells = psi.size(); Field bPrime(nCells); - register Type* __restrict__ bPrimePtr = bPrime.begin(); + Type* __restrict__ bPrimePtr = bPrime.begin(); - register const DType* const __restrict__ rDPtr = rD_.begin(); + const DType* const __restrict__ rDPtr = rD_.begin(); - register const LUType* const __restrict__ upperPtr = + const LUType* const __restrict__ upperPtr = matrix_.upper().begin(); - register const LUType* const __restrict__ lowerPtr = + const LUType* const __restrict__ lowerPtr = matrix_.lower().begin(); - register const label* const __restrict__ uPtr = + const label* const __restrict__ uPtr = matrix_.lduAddr().upperAddr().begin(); - register const label* const __restrict__ ownStartPtr = + const label* const __restrict__ ownStartPtr = matrix_.lduAddr().ownerStartAddr().begin(); @@ -120,10 +120,10 @@ void Foam::TGaussSeidelSmoother::smooth ); Type curPsi; - register label fStart; - register label fEnd = ownStartPtr[0]; + label fStart; + label fEnd = ownStartPtr[0]; - for (register label cellI=0; cellI::smooth curPsi = bPrimePtr[cellI]; // Accumulate the owner product side - for (register label curFace=fStart; curFace::smooth curPsi = dot(rDPtr[cellI], curPsi); // Distribute the neighbour side using current psi - for (register label curFace=fStart; curFace::solve this->fieldName_ ); - register label nCells = psi.size(); + label nCells = psi.size(); Type* __restrict__ psiPtr = psi.begin(); @@ -133,7 +133,7 @@ Foam::PBiCCCG::solve if (solverPerf.nIterations() == 0) { - for (register label cell=0; cell::solve { scalar beta = wArT/wArTold; - for (register label cell=0; cell::solve scalar alpha = wArT/wApT; - for (register label cell=0; cell::solve(Field& psi) const this->fieldName_ ); - register label nCells = psi.size(); + label nCells = psi.size(); Type* __restrict__ psiPtr = psi.begin(); @@ -126,7 +126,7 @@ Foam::PBiCICG::solve(Field& psi) const if (solverPerf.nIterations() == 0) { - for (register label cell=0; cell::solve(Field& psi) const stabilise(wArTold, solverPerf.vsmall_) ); - for (register label cell=0; cell::solve(Field& psi) const stabilise(wApT, solverPerf.vsmall_) ); - for (register label cell=0; cell::solve(Field& psi) const this->fieldName_ ); - register label nCells = psi.size(); + label nCells = psi.size(); Type* __restrict__ psiPtr = psi.begin(); @@ -120,7 +120,7 @@ Foam::PCICG::solve(Field& psi) const if (solverPerf.nIterations() == 0) { - for (register label cell=0; cell::solve(Field& psi) const stabilise(wArAold, solverPerf.vsmall_) ); - for (register label cell=0; cell::solve(Field& psi) const stabilise(wApA, solverPerf.vsmall_) ); - for (register label cell=0; cell::allocate() v_ = new Type*[n_]; v_[0] = new Type[n_*m_]; - for (register label i=1; i::Matrix(const label n, const label m, const Type& a) label nm = n_*m_; - for (register label i=0; i::Matrix(const Matrix& a) const Type* av = a.v_[0]; label nm = n_*m_; - for (register label i=0; i::T() const const Matrix& A = *this; Form At(m(), n()); - for (register label i=0; i::operator=(const Type& t) Type* v = v_[0]; label nm = n_*m_; - for (register label i=0; i::operator=(const Matrix& a) const Type* av = a.v_[0]; label nm = n_*m_; - for (register label i=0; i& a) label curMaxI = 0; const Type* v = a[0]; - for (register label i=1; i v[curMaxI]) { @@ -273,7 +273,7 @@ const Type& Foam::min(const Matrix& a) label curMinI = 0; const Type* v = a[0]; - for (register label i=1; i& a) const Type* av = a[0]; label nm = a.n()*a.m(); - for (register label i=0; i& a, const Matrix& b) const Type* bv = b[0]; label nm = a.n()*a.m(); - for (register label i=0; i& a, const Matrix& b) const Type* bv = b[0]; label nm = a.n()*a.m(); - for (register label i=0; i& a) const Type* av = a[0]; label nm = a.n()*a.m(); - for (register label i=0; i& a, const Matrix& b) Form ab(a.n(), b.m(), scalar(0)); - for (register label i = 0; i < ab.n(); i++) + for (label i = 0; i < ab.n(); i++) { - for (register label j = 0; j < ab.m(); j++) + for (label j = 0; j < ab.m(); j++) { - for (register label l = 0; l < b.n(); l++) + for (label l = 0; l < b.n(); l++) { ab[i][j] += a[i][l]*b[l][j]; } diff --git a/src/OpenFOAM/matrices/Matrix/MatrixIO.C b/src/OpenFOAM/matrices/Matrix/MatrixIO.C index e9bdb7f802..29c9a237e7 100644 --- a/src/OpenFOAM/matrices/Matrix/MatrixIO.C +++ b/src/OpenFOAM/matrices/Matrix/MatrixIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,11 +80,11 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix& M) label k = 0; // loop over rows - for (register label i=0; i> v[k++]; @@ -109,7 +109,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix& M) "reading the single entry" ); - for (register label i=0; i& M) { uniform = true; - for (register label i=0; i< nm; i++) + for (label i=0; i< nm; i++) { if (v[i] != v[0]) { @@ -197,12 +197,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix& M) label k = 0; // loop over rows - for (register label i=0; i< M.n(); i++) + for (label i=0; i< M.n(); i++) { os << token::BEGIN_LIST; // Write row - for (register label j=0; j< M.m(); j++) + for (label j=0; j< M.m(); j++) { if (j > 0) os << token::SPACE; os << v[k++]; @@ -222,12 +222,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix& M) label k = 0; // loop over rows - for (register label i=0; i< M.n(); i++) + for (label i=0; i< M.n(); i++) { os << nl << token::BEGIN_LIST; // Write row - for (register label j=0; j< M.m(); j++) + for (label j=0; j< M.m(); j++) { os << nl << v[k++]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C index 0eab6f7c64..c0ca614a13 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterfaceTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -151,7 +151,7 @@ void Foam::processorLduInterface::compressedSend resizeBuf(sendBuf_, nBytes); float *fArray = reinterpret_cast(sendBuf_.begin()); - for (register label i=0; i(f.begin()); const scalar *slast = &sArray[nm1]; - for (register label i=0; i Foam::lduMatrix::H1() const const scalar* __restrict__ lowerPtr = lower().begin(); const scalar* __restrict__ upperPtr = upper().begin(); - register const label nFaces = upper().size(); + const label nFaces = upper().size(); - for (register label face=0; face > Foam::lduMatrix::H(const Field& psi) const const scalar* __restrict__ lowerPtr = lower().begin(); const scalar* __restrict__ upperPtr = upper().begin(); - register const label nFaces = upper().size(); + const label nFaces = upper().size(); - for (register label face=0; face& psi) const tmp > tfaceHpsi(new Field (Lower.size())); Field & faceHpsi = tfaceHpsi(); - for (register label face=0; face=0; face--) + for (label face=nFacesM1; face>=0; face--) { wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C index 4124b98050..76223830b2 100644 --- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,17 +68,17 @@ void Foam::DILUPreconditioner::calcReciprocalD const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ lowerPtr = matrix.lower().begin(); - register label nFaces = matrix.upper().size(); - for (register label face=0; face=0; face--) + for (label face=nFacesM1; face>=0; face--) { wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]]; @@ -158,25 +158,25 @@ void Foam::DILUPreconditioner::preconditionT const scalar* const __restrict__ lowerPtr = solver_.matrix().lower().begin(); - register label nCells = wT.size(); - register label nFaces = solver_.matrix().upper().size(); - register label nFacesM1 = nFaces - 1; + label nCells = wT.size(); + label nFaces = solver_.matrix().upper().size(); + label nFacesM1 = nFaces - 1; - for (register label cell=0; cell=0; face--) + for (label face=nFacesM1; face>=0; face--) { sface = losortPtr[face]; wTPtr[lPtr[sface]] -= diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C index aa237fcd1b..da9c2e27be 100644 --- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,21 +61,21 @@ Foam::FDICPreconditioner::FDICPreconditioner const scalar* const __restrict__ upperPtr = solver_.matrix().upper().begin(); - register label nCells = rD_.size(); - register label nFaces = solver_.matrix().upper().size(); + label nCells = rD_.size(); + label nFaces = solver_.matrix().upper().size(); - for (register label face=0; face=0; face--) + for (label face=nFacesM1; face>=0; face--) { wAPtr[lPtr[face]] -= rDlUpperPtr[face]*wAPtr[uPtr[face]]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C index 8679cb3e6e..5e2d87c416 100644 --- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C +++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,10 +55,10 @@ Foam::diagonalPreconditioner::diagonalPreconditioner scalar* __restrict__ rDPtr = rD.begin(); const scalar* __restrict__ DPtr = solver_.matrix().diag().begin(); - register label nCells = rD.size(); + label nCells = rD.size(); // Generate reciprocal diagonal - for (register label cell=0; cell=0; facei--) + label nFacesM1 = nFaces - 1; + for (label facei=nFacesM1; facei>=0; facei--) { - register label l = lPtr[facei]; + label l = lPtr[facei]; rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C index 975759f427..6600ce9902 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,17 +100,17 @@ void Foam::DILUSmoother::smooth rA *= rD_; - register label nFaces = matrix_.upper().size(); - for (register label face=0; face=0; face--) + label nFacesM1 = nFaces - 1; + for (label face=nFacesM1; face>=0; face--) { - register label l = lPtr[face]; + label l = lPtr[face]; rAPtr[l] -= rDPtr[l]*upperPtr[face]*rAPtr[uPtr[face]]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C index 0896d01307..741c60f443 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,21 +71,21 @@ Foam::FDICSmoother::FDICSmoother const scalar* const __restrict__ upperPtr = matrix_.upper().begin(); - register label nCells = rD_.size(); - register label nFaces = matrix_.upper().size(); + label nCells = rD_.size(); + label nFaces = matrix_.upper().size(); - for (register label face=0; face=0; face--) + label nFacesM1 = nFaces - 1; + for (label face=nFacesM1; face>=0; face--) { rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]]; } diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C index 42bbea8c9c..b233813d31 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,23 +75,23 @@ void Foam::GaussSeidelSmoother::smooth const label nSweeps ) { - register scalar* __restrict__ psiPtr = psi.begin(); + scalar* __restrict__ psiPtr = psi.begin(); - register const label nCells = psi.size(); + const label nCells = psi.size(); scalarField bPrime(nCells); - register scalar* __restrict__ bPrimePtr = bPrime.begin(); + scalar* __restrict__ bPrimePtr = bPrime.begin(); - register const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); - register const scalar* const __restrict__ upperPtr = + const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); + const scalar* const __restrict__ upperPtr = matrix_.upper().begin(); - register const scalar* const __restrict__ lowerPtr = + const scalar* const __restrict__ lowerPtr = matrix_.lower().begin(); - register const label* const __restrict__ uPtr = + const label* const __restrict__ uPtr = matrix_.lduAddr().upperAddr().begin(); - register const label* const __restrict__ ownStartPtr = + const label* const __restrict__ ownStartPtr = matrix_.lduAddr().ownerStartAddr().begin(); @@ -144,11 +144,11 @@ void Foam::GaussSeidelSmoother::smooth cmpt ); - register scalar psii; - register label fStart; - register label fEnd = ownStartPtr[0]; + scalar psii; + label fStart; + label fEnd = ownStartPtr[0]; - for (register label celli=0; celli=0; celli--) + for (label celli=nCells-1; celli>=0; celli--) { // Start and end of this row fEnd = fStart; @@ -187,7 +187,7 @@ void Foam::symGaussSeidelSmoother::smooth psii = bPrimePtr[celli]; // Accumulate the owner product side - for (register label facei=fStart; facei largestCoeff) { @@ -76,16 +76,16 @@ void Foam::LUDecompose vv[i] = 1.0/largestCoeff; } - for (register label j=0; j largestCoeff) { @@ -58,7 +58,7 @@ void Foam::solve { //Info<< "Pivoted on " << i << " " << iMax << endl; - for (register label k=i; k=i; k--) + for (label k=n-1; k>=i; k--) { tmpMatrix[j][k] -= tmpMatrix[i][k]*tmpMatrix[j][i]/tmpMatrix[i][i]; @@ -87,11 +87,11 @@ void Foam::solve } // Back-substitution - for (register label j=n-1; j>=0; j--) + for (label j=n-1; j>=0; j--) { Type ntempvec = pTraits::zero; - for (register label k=j+1; k=0; i--) + for (label i=n-1; i>=0; i--) { Type sum = sourceSol[i]; const scalar* __restrict__ luMatrixi = luMatrix[i]; - for (register label j=i+1; j=0; i--) + for (label i=n-1; i>=0; i--) { Type sum = sourceSol[i]; const scalar* __restrict__ luMatrixi = luMatrix[i]; - for (register label j=i+1; j(A.n(), B.m(), scalar(0)); - for (register label i = 0; i < A.n(); i++) + for (label i = 0; i < A.n(); i++) { - for (register label j = 0; j < B.m(); j++) + for (label j = 0; j < B.m(); j++) { - for (register label l = 0; l < B.n(); l++) + for (label l = 0; l < B.n(); l++) { ans[i][j] += A[i][l]*B[l][j]; } diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C index 60394dcdc2..969b33784b 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -73,7 +73,7 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const bool found = false; - for (register label checkI = 0; checkI < maxVert; checkI++) + for (label checkI = 0; checkI < maxVert; checkI++) { if (curPoint == p[checkI]) { diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 41650aad6c..5a9680ea48 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -468,7 +468,7 @@ Foam::point Foam::face::centre(const pointField& points) const point centrePoint = point::zero; - for (register label pI=0; pI::zero; - for (register label pI=0; pI::zero; - for (register label pI=0; pI::typeName = "int32"; Foam::label Foam::pow(label a, label b) { - register label ans = 1; - for (register label i=0; i::typeName = "uint32"; Foam::uLabel Foam::pow(uLabel a, uLabel b) { - register uLabel ans = 1; - for (register uLabel i=0; ifind('/'); + string::size_type top = this->find('/'); // no slashes - nothing to do if (top == string::npos) @@ -100,18 +100,18 @@ bool Foam::fileName::clean() } // start with the '/' found: - register char prev = '/'; - register string::size_type nChar = top+1; - register string::size_type maxLen = this->size(); + char prev = '/'; + string::size_type nChar = top+1; + string::size_type maxLen = this->size(); for ( - register string::size_type src = nChar; + string::size_type src = nChar; src < maxLen; /*nil*/ ) { - register char c = operator[](src++); + char c = operator[](src++); if (prev == '/') { @@ -132,7 +132,7 @@ bool Foam::fileName::clean() // peek at the next character - register char c1 = operator[](src); + char c1 = operator[](src); // found '/./' - skip it if (c1 == '/') diff --git a/src/OpenFOAM/primitives/strings/string/string.C b/src/OpenFOAM/primitives/strings/string/string.C index d1bd3495c6..9e17488d1e 100644 --- a/src/OpenFOAM/primitives/strings/string/string.C +++ b/src/OpenFOAM/primitives/strings/string/string.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ const Foam::string Foam::string::null; // Count and return the number of a given character in the string Foam::string::size_type Foam::string::count(const char c) const { - register size_type cCount = 0; + size_type cCount = 0; for (const_iterator iter = begin(); iter != end(); ++iter) { @@ -109,10 +109,10 @@ bool Foam::string::removeRepeated(const char character) if (character && find(character) != npos) { - register string::size_type nChar=0; + string::size_type nChar=0; iterator iter2 = begin(); - register char prev = 0; + char prev = 0; for ( @@ -121,7 +121,7 @@ bool Foam::string::removeRepeated(const char character) iter1++ ) { - register char c = *iter1; + char c = *iter1; if (prev == c && c == character) { diff --git a/src/OpenFOAM/primitives/strings/string/stringI.H b/src/OpenFOAM/primitives/strings/string/stringI.H index 9d81da04f1..3dc2fe043f 100644 --- a/src/OpenFOAM/primitives/strings/string/stringI.H +++ b/src/OpenFOAM/primitives/strings/string/stringI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ inline bool Foam::string::stripInvalid(string& str) { if (!valid(str)) { - register size_type nValid = 0; + size_type nValid = 0; iterator iter2 = str.begin(); for @@ -89,7 +89,7 @@ inline bool Foam::string::stripInvalid(string& str) iter1++ ) { - register char c = *iter1; + char c = *iter1; if (String::valid(c)) { diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C index df9497fedf..e726ab95b7 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ void Foam::enrichedPatch::calcPointPoints() const const faceList& lf = localFaces(); - register bool found = false; + bool found = false; forAll(lf, faceI) { diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C index 9879efc1b9..ac1957f9b1 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,8 +89,8 @@ Foam::fv::leastSquaresGrad::calcGrad forAll(own, facei) { - register label ownFaceI = own[facei]; - register label neiFaceI = nei[facei]; + label ownFaceI = own[facei]; + label neiFaceI = nei[facei]; Type deltaVsf = vsf[neiFaceI] - vsf[ownFaceI]; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFitPolynomial.H index ae639bd744..3ac3f4bf1f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/biLinearFit/biLinearFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFitPolynomial.H index f5d570456a..1c11391d82 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cubicUpwindFit/cubicUpwindFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFitPolynomial.H index 743ab32ee5..a7cfe322a5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearFit/linearFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFitPolynomial.H index c66bcc23a9..bbe3f80b4d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticFit/quadraticFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFitPolynomial.H index 86bfd30d16..14e4d57b9e 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearFit/quadraticLinearFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFitPolynomial.H index 31391c71bd..4283687efb 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticLinearUpwindFit/quadraticLinearUpwindFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFitPolynomial.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFitPolynomial.H index c56fde7aeb..50558b1332 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFitPolynomial.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwindFit/quadraticUpwindFitPolynomial.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ public: const direction dim ) { - register label curIdx = 0; + label curIdx = 0; coeffs[curIdx++] = weight; coeffs[curIdx++] = weight*d.x(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index f66c3acfa6..810a72a5c6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -208,7 +208,7 @@ surfaceInterpolationScheme::interpolate Field& sfi = sf.internalField(); - for (register label fi=0; fi::interpolate Field& sfi = sf.internalField(); - for (register label fi=0; fi::solve label nSpecie = this->nSpecie(); // Copy the concentration, T and P to the total solve-vector - for (register int i=0; i::solve odeSolver_->solve(0, deltaT, cTp_, subDeltaT); - for (register int i=0; i::janafThermo Thigh_(Thigh), Tcommon_(Tcommon) { - for (register label coefLabel=0; coefLabel::janafThermo Thigh_(jt.Thigh_), Tcommon_(jt.Tcommon_) { - for (register label coefLabel=0; coefLabel::operator+= for ( - register label coefLabel=0; + label coefLabel=0; coefLabel::nCoeffs_; coefLabel++ ) @@ -307,7 +307,7 @@ inline void Foam::janafThermo::operator-= for ( - register label coefLabel=0; + label coefLabel=0; coefLabel::nCoeffs_; coefLabel++ ) @@ -343,7 +343,7 @@ inline Foam::janafThermo Foam::operator+ for ( - register label coefLabel=0; + label coefLabel=0; coefLabel::nCoeffs_; coefLabel++ ) @@ -405,7 +405,7 @@ inline Foam::janafThermo Foam::operator- for ( - register label coefLabel=0; + label coefLabel=0; coefLabel::nCoeffs_; coefLabel++ )