Removed use of the deprecated "register" keyword

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340.html
This commit is contained in:
Henry Weller
2015-06-30 10:26:44 +01:00
parent 138c34fb0f
commit 72300041df
86 changed files with 539 additions and 539 deletions

View File

@ -796,8 +796,8 @@ static uint32_t crc_table[256];
#define CRC32POLYNOMIAL 0x04c11db7L #define CRC32POLYNOMIAL 0x04c11db7L
static void GenerateCRC32Table (void) { static void GenerateCRC32Table (void) {
register int i, j; int i, j;
register uint32_t crc_accum; uint32_t crc_accum;
for ( i = 0; i < 256; i++ ) { for ( i = 0; i < 256; i++ ) {
crc_accum = ( (unsigned long) i << 24 ); crc_accum = ( (unsigned long) i << 24 );
@ -821,8 +821,8 @@ static uint32_t UpdateCRC32
const char *data_blk_ptr, const char *data_blk_ptr,
int data_blk_size int data_blk_size
) { ) {
register int j; int j;
register uint8_t i; uint8_t i;
for (j = 0; j < data_blk_size; j++) { for (j = 0; j < data_blk_size; j++) {
i = (crc_accum >> 24) ^ *data_blk_ptr++; i = (crc_accum >> 24) ^ *data_blk_ptr++;
@ -1017,7 +1017,7 @@ int i;
uint32_t stroustrup (const char * s, int len) { uint32_t stroustrup (const char * s, int len) {
uint32_t h; 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]; h = (h << 1) ^ (unsigned char) s[i];
} }

View File

@ -26,7 +26,7 @@ int main()
label* redAddr = new label[size]; label* redAddr = new label[size];
label* redAddr2 = new label[size]; label* redAddr2 = new label[size];
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f1[i] = 1.0; f1[i] = 1.0;
f2[i] = 1.0; f2[i] = 1.0;
@ -36,12 +36,12 @@ int main()
redAddr2[i] = (size - i - 1)/redFac; redAddr2[i] = (size - i - 1)/redFac;
} }
for (register label i=0; i<size; i+=rndAddrSkip) for (label i=0; i<size; i+=rndAddrSkip)
{ {
addr[i] = genAddr.integer(0, size-1); addr[i] = genAddr.integer(0, size-1);
} }
for (register label i=0; i<redSize; i++) for (label i=0; i<redSize; i++)
{ {
fr[i] = 1.0; fr[i] = 1.0;
} }
@ -56,7 +56,7 @@ int main()
for (int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f4[i] = f1[i] + f2[i] - f3[i]; f4[i] = f1[i] + f2[i] - f3[i];
} }
@ -77,7 +77,7 @@ int main()
for (int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f4[addr[i]] = f1[addr[i]] + f2[addr[i]] - f3[addr[i]]; f4[addr[i]] = f1[addr[i]] + f2[addr[i]] - f3[addr[i]];
} }
@ -99,7 +99,7 @@ int main()
for (int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
label j = i/redFac; label j = i/redFac;
fr[j] += f1[i]; fr[j] += f1[i];
@ -122,7 +122,7 @@ int main()
for (int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
fr[redAddr[i]] += f1[i]; fr[redAddr[i]] += f1[i];
fr[redAddr2[i]] -= f2[i]; fr[redAddr2[i]] -= f2[i];
@ -143,15 +143,15 @@ int main()
for (int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f4[i] = f1[i]; f4[i] = f1[i];
} }
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f4[i] += f2[i]; f4[i] += f2[i];
} }
for (register label i=0; i<size; i++) for (label i=0; i<size; i++)
{ {
f4[i] -= f3[i]; f4[i] -= f3[i];
} }

View File

@ -25,7 +25,7 @@ int main()
Info<< "vectorField algebra" << endl; Info<< "vectorField algebra" << endl;
for (register int j=0; j<nIter; j++) for (int j=0; j<nIter; j++)
{ {
vf4 = vf1 + vf2 - vf3; vf4 = vf1 + vf2 - vf3;
} }

View File

@ -279,7 +279,7 @@ int main(int argc, char *argv[])
sqrMergeTol /= 10.0; sqrMergeTol /= 10.0;
register bool found = false; bool found = false;
// N-squared point search over all points of all faces of // N-squared point search over all points of all faces of
// master block over all point of all faces of slave block // master block over all point of all faces of slave block
@ -354,7 +354,7 @@ int main(int argc, char *argv[])
} }
register bool changedPointMerge = false; bool changedPointMerge = false;
label nPasses = 0; label nPasses = 0;
do do

View File

@ -604,7 +604,7 @@ endOfSection {space}")"{space}
<readCellData>{space}{lbrac} { <readCellData>{space}{lbrac} {
// Quickly scan to the end of the cell data block and discard // Quickly scan to the end of the cell data block and discard
register int c; int c;
while ((c = yyinput()) != 0 && c != ')') while ((c = yyinput()) != 0 && c != ')')
{} {}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -63,9 +63,9 @@ Foam::scalar Foam::EulerSI::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -77,9 +77,9 @@ Foam::scalar Foam::Rosenbrock12::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -90,9 +90,9 @@ Foam::scalar Foam::Rosenbrock23::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -135,9 +135,9 @@ Foam::scalar Foam::Rosenbrock34::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -86,14 +86,14 @@ void Foam::SIBS::solve
scalar eps1 = safe1*relTol_[0]; scalar eps1 = safe1*relTol_[0];
a_[0] = nSeq_[0] + 1; a_[0] = nSeq_[0] + 1;
for (register label k=0; k<kMaxX_; k++) for (label k=0; k<kMaxX_; k++)
{ {
a_[k + 1] = a_[k] + nSeq_[k + 1]; a_[k + 1] = a_[k] + nSeq_[k + 1];
} }
for (register label iq = 1; iq<kMaxX_; iq++) for (label iq = 1; iq<kMaxX_; iq++)
{ {
for (register label k=0; k<iq; k++) for (label k=0; k<iq; k++)
{ {
alpha_[k][iq] = alpha_[k][iq] =
pow(eps1, (a_[k + 1] - a_[iq + 1]) pow(eps1, (a_[k + 1] - a_[iq + 1])
@ -104,7 +104,7 @@ void Foam::SIBS::solve
epsOld_ = relTol_[0]; epsOld_ = relTol_[0];
a_[0] += n_; a_[0] += n_;
for (register label k=0; k<kMaxX_; k++) for (label k=0; k<kMaxX_; k++)
{ {
a_[k + 1] = a_[k] + nSeq_[k + 1]; a_[k + 1] = a_[k] + nSeq_[k + 1];
} }
@ -158,7 +158,7 @@ void Foam::SIBS::solve
if (k != 0) if (k != 0)
{ {
maxErr = SMALL; maxErr = SMALL;
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
maxErr = max maxErr = max
( (
@ -217,7 +217,7 @@ void Foam::SIBS::solve
scalar wrkmin = GREAT; scalar wrkmin = GREAT;
scalar scale = 1.0; scalar scale = 1.0;
for (register label kk=0; kk<=km; kk++) for (label kk=0; kk<=km; kk++)
{ {
scalar fact = max(err_[kk], scaleMX); scalar fact = max(err_[kk], scaleMX);
scalar work = fact*a_[kk + 1]; scalar work = fact*a_[kk + 1];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,9 +42,9 @@ void Foam::SIBS::SIMPR
scalar h = deltaX/nSteps; scalar h = deltaX/nSteps;
scalarSquareMatrix a(n_); scalarSquareMatrix a(n_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a[i][j] = -h*dfdy[i][j]; a[i][j] = -h*dfdy[i][j];
} }
@ -54,7 +54,7 @@ void Foam::SIBS::SIMPR
labelList pivotIndices(n_); labelList pivotIndices(n_);
LUDecompose(a, pivotIndices); LUDecompose(a, pivotIndices);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
yEnd[i] = h*(dydx[i] + h*dfdx[i]); yEnd[i] = h*(dydx[i] + h*dfdx[i]);
} }
@ -64,7 +64,7 @@ void Foam::SIBS::SIMPR
scalarField del(yEnd); scalarField del(yEnd);
scalarField ytemp(n_); scalarField ytemp(n_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
ytemp[i] = y[i] + del[i]; ytemp[i] = y[i] + del[i];
} }
@ -73,16 +73,16 @@ void Foam::SIBS::SIMPR
odes_.derivatives(x, ytemp, yEnd); odes_.derivatives(x, ytemp, yEnd);
for (register label nn=2; nn<=nSteps; nn++) for (label nn=2; nn<=nSteps; nn++)
{ {
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
yEnd[i] = h*yEnd[i] - del[i]; yEnd[i] = h*yEnd[i] - del[i];
} }
LUBacksubstitute(a, pivotIndices, yEnd); LUBacksubstitute(a, pivotIndices, yEnd);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
ytemp[i] += (del[i] += 2.0*yEnd[i]); ytemp[i] += (del[i] += 2.0*yEnd[i]);
} }
@ -91,14 +91,14 @@ void Foam::SIBS::SIMPR
odes_.derivatives(x, ytemp, yEnd); odes_.derivatives(x, ytemp, yEnd);
} }
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
yEnd[i] = h*yEnd[i] - del[i]; yEnd[i] = h*yEnd[i] - del[i];
} }
LUBacksubstitute(a, pivotIndices, yEnd); LUBacksubstitute(a, pivotIndices, yEnd);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
yEnd[i] += ytemp[i]; yEnd[i] += ytemp[i];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,14 +42,14 @@ void Foam::SIBS::polyExtrapolate
x[iest] = xest; x[iest] = xest;
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
dy[j] = yz[j] = yest[j]; dy[j] = yz[j] = yest[j];
} }
if (iest == 0) if (iest == 0)
{ {
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
d[j][0] = yest[j]; d[j][0] = yest[j];
} }
@ -58,13 +58,13 @@ void Foam::SIBS::polyExtrapolate
{ {
scalarField c(yest); scalarField c(yest);
for (register label k1=0; k1<iest; k1++) for (label k1=0; k1<iest; k1++)
{ {
scalar delta = 1.0/(x[iest - k1 - 1] - xest); scalar delta = 1.0/(x[iest - k1 - 1] - xest);
scalar f1 = xest*delta; scalar f1 = xest*delta;
scalar f2 = x[iest - k1 - 1]*delta; scalar f2 = x[iest - k1 - 1]*delta;
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
scalar q = d[j][k1]; scalar q = d[j][k1];
d[j][k1] = dy[j]; d[j][k1] = dy[j];
@ -75,7 +75,7 @@ void Foam::SIBS::polyExtrapolate
} }
} }
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
d[j][iest] = dy[j]; d[j][iest] = dy[j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,9 +81,9 @@ Foam::scalar Foam::rodas23::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -104,9 +104,9 @@ Foam::scalar Foam::rodas34::solve
{ {
odes_.jacobian(x0, y0, dfdx_, dfdy_); odes_.jacobian(x0, y0, dfdx_, dfdy_);
for (register label i=0; i<n_; i++) for (label i=0; i<n_; i++)
{ {
for (register label j=0; j<n_; j++) for (label j=0; j<n_; j++)
{ {
a_[i][j] = -dfdy_[i][j]; a_[i][j] = -dfdy_[i][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,7 +64,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
{ {
if (delimiter == token::BEGIN_LIST) if (delimiter == token::BEGIN_LIST)
{ {
for (register label i=0; i<s; ++i) for (label i=0; i<s; ++i)
{ {
T element; T element;
is >> element; is >> element;
@ -76,7 +76,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
T element; T element;
is >> element; is >> element;
for (register label i=0; i<s; ++i) for (label i=0; i<s; ++i)
{ {
L.append(element); L.append(element);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ inline Foam::FixedList<T, Size>::FixedList()
template<class T, unsigned Size> template<class T, unsigned Size>
inline Foam::FixedList<T, Size>::FixedList(const T v[Size]) inline Foam::FixedList<T, Size>::FixedList(const T v[Size])
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = v[i]; v_[i] = v[i];
} }
@ -47,7 +47,7 @@ inline Foam::FixedList<T, Size>::FixedList(const T v[Size])
template<class T, unsigned Size> template<class T, unsigned Size>
inline Foam::FixedList<T, Size>::FixedList(const T& t) inline Foam::FixedList<T, Size>::FixedList(const T& t)
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = t; v_[i] = t;
} }
@ -59,7 +59,7 @@ inline Foam::FixedList<T, Size>::FixedList(const UList<T>& lst)
{ {
checkSize(lst.size()); checkSize(lst.size());
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = lst[i]; v_[i] = lst[i];
} }
@ -71,7 +71,7 @@ inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& lst)
{ {
checkSize(lst.size()); checkSize(lst.size());
register label i = 0; label i = 0;
for for
( (
typename SLList<T>::const_iterator iter = lst.begin(); typename SLList<T>::const_iterator iter = lst.begin();
@ -87,7 +87,7 @@ inline Foam::FixedList<T, Size>::FixedList(const SLList<T>& lst)
template<class T, unsigned Size> template<class T, unsigned Size>
inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& lst) inline Foam::FixedList<T, Size>::FixedList(const FixedList<T, Size>& lst)
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = lst[i]; v_[i] = lst[i];
} }
@ -184,7 +184,7 @@ inline void Foam::FixedList<T, Size>::setSize(const label s)
template<class T, unsigned Size> template<class T, unsigned Size>
inline void Foam::FixedList<T, Size>::transfer(const FixedList<T, Size>& lst) inline void Foam::FixedList<T, Size>::transfer(const FixedList<T, Size>& lst)
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = lst[i]; v_[i] = lst[i];
} }
@ -262,7 +262,7 @@ inline const T& Foam::FixedList<T, Size>::operator[](const label i) const
template<class T, unsigned Size> template<class T, unsigned Size>
inline void Foam::FixedList<T, Size>::operator=(const T lst[Size]) inline void Foam::FixedList<T, Size>::operator=(const T lst[Size])
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = lst[i]; v_[i] = lst[i];
} }
@ -273,7 +273,7 @@ inline void Foam::FixedList<T, Size>::operator=(const UList<T>& lst)
{ {
checkSize(lst.size()); checkSize(lst.size());
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = lst[i]; v_[i] = lst[i];
} }
@ -284,7 +284,7 @@ inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& lst)
{ {
checkSize(lst.size()); checkSize(lst.size());
register label i = 0; label i = 0;
for for
( (
typename SLList<T>::const_iterator iter = lst.begin(); typename SLList<T>::const_iterator iter = lst.begin();
@ -299,7 +299,7 @@ inline void Foam::FixedList<T, Size>::operator=(const SLList<T>& lst)
template<class T, unsigned Size> template<class T, unsigned Size>
inline void Foam::FixedList<T, Size>::operator=(const T& t) inline void Foam::FixedList<T, Size>::operator=(const T& t)
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
v_[i] = t; v_[i] = t;
} }
@ -443,7 +443,7 @@ inline unsigned Foam::FixedList<T, Size>::Hash<HashT>::operator()
// hash incrementally // hash incrementally
unsigned val = seed; unsigned val = seed;
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
val = HashT()(lst[i], val); val = HashT()(lst[i], val);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
if (delimiter == token::BEGIN_LIST) if (delimiter == token::BEGIN_LIST)
{ {
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
is >> L[i]; is >> L[i];
@ -107,7 +107,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
"reading the single entry" "reading the single entry"
); );
for (register unsigned i=0; i<Size; i++) for (unsigned i=0; i<Size; i++)
{ {
L[i] = element; L[i] = element;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -332,7 +332,7 @@ void Foam::List<T>::setSize(const label newSize)
if (this->size_) if (this->size_)
{ {
register label i = min(this->size_, newSize); label i = min(this->size_, newSize);
# ifdef USEMEMCPY # ifdef USEMEMCPY
if (contiguous<T>()) if (contiguous<T>())
@ -342,8 +342,8 @@ void Foam::List<T>::setSize(const label newSize)
else else
# endif # endif
{ {
register T* vv = &this->v_[i]; T* vv = &this->v_[i];
register T* av = &nv[i]; T* av = &nv[i];
while (i--) *--av = *--vv; while (i--) *--av = *--vv;
} }
} }
@ -368,8 +368,8 @@ void Foam::List<T>::setSize(const label newSize, const T& a)
if (newSize > oldSize) if (newSize > oldSize)
{ {
register label i = newSize - oldSize; label i = newSize - oldSize;
register T* vv = &this->v_[newSize]; T* vv = &this->v_[newSize];
while (i--) *--vv = a; while (i--) *--vv = a;
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
{ {
if (delimiter == token::BEGIN_LIST) if (delimiter == token::BEGIN_LIST)
{ {
for (register label i=0; i<s; i++) for (label i=0; i<s; i++)
{ {
is >> L[i]; is >> L[i];
@ -102,7 +102,7 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
"reading the single entry" "reading the single entry"
); );
for (register label i=0; i<s; i++) for (label i=0; i<s; i++)
{ {
L[i] = element; L[i] = element;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,8 +37,8 @@ Description
// Element access looping using [] for vector machines // Element access looping using [] for vector machines
#define List_FOR_ALL(f, i) \ #define List_FOR_ALL(f, i) \
register const label _n##i = (f).size();\ const label _n##i = (f).size();\
for (register label i=0; i<_n##i; i++) \ for (label i=0; i<_n##i; i++) \
{ {
#define List_END_FOR_ALL } #define List_END_FOR_ALL }
@ -56,7 +56,7 @@ Description
// Pointer looping for scalar machines // Pointer looping for scalar machines
#define List_FOR_ALL(f, i) \ #define List_FOR_ALL(f, i) \
register label i = (f).size(); \ label i = (f).size(); \
while (i--) \ while (i--) \
{ \ { \
@ -65,10 +65,10 @@ Description
#define List_ELEM(f, fp, i) (*fp++) #define List_ELEM(f, fp, i) (*fp++)
#define List_ACCESS(type, f, fp) \ #define List_ACCESS(type, f, fp) \
register type* __restrict__ fp = (f).begin() type* __restrict__ fp = (f).begin()
#define List_CONST_ACCESS(type, f, fp) \ #define List_CONST_ACCESS(type, f, fp) \
register const type* __restrict__ fp = (f).begin() const type* __restrict__ fp = (f).begin()
#endif #endif

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -54,14 +54,14 @@ License
template<unsigned nBits> template<unsigned nBits>
unsigned int Foam::PackedList<nBits>::count() const unsigned int Foam::PackedList<nBits>::count() const
{ {
register unsigned int c = 0; unsigned int c = 0;
if (size_) if (size_)
{ {
const label packLen = packedLength(); const label packLen = packedLength();
for (label i = 0; i < packLen; ++i) for (label i = 0; i < packLen; ++i)
{ {
register unsigned int bits = StorageList::operator[](i); unsigned int bits = StorageList::operator[](i);
COUNT_PACKEDBITS(c, bits); COUNT_PACKEDBITS(c, bits);
} }
} }
@ -282,7 +282,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
{ {
if (delimiter == token::BEGIN_LIST) if (delimiter == token::BEGIN_LIST)
{ {
for (register label i=0; i<sz; ++i) for (label i=0; i<sz; ++i)
{ {
lst[i] = lst.readValue(is); lst[i] = lst.readValue(is);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -157,7 +157,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
} }
else if (newSize < oldSize) else if (newSize < oldSize)
{ {
register label i; label i;
for (i=newSize; i<oldSize; i++) for (i=newSize; i<oldSize; i++)
{ {
if (ptrs_[i]) if (ptrs_[i])
@ -172,7 +172,7 @@ void Foam::PtrList<T>::setSize(const label newSize)
{ {
ptrs_.setSize(newSize); ptrs_.setSize(newSize);
register label i; label i;
for (i=oldSize; i<newSize; i++) for (i=oldSize; i<newSize; i++)
{ {
ptrs_[i] = NULL; ptrs_[i] = NULL;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -167,7 +167,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
<< " expected " << L.size() << " expected " << L.size()
<< exit(FatalIOError); << exit(FatalIOError);
} }
for (register label i=0; i<s; i++) for (label i=0; i<s; i++)
{ {
L[i] = elems[i]; L[i] = elems[i];
} }
@ -196,7 +196,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
{ {
if (delimiter == token::BEGIN_LIST) if (delimiter == token::BEGIN_LIST)
{ {
for (register label i=0; i<s; i++) for (label i=0; i<s; i++)
{ {
is >> L[i]; is >> L[i];
@ -217,7 +217,7 @@ Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
"reading the single entry" "reading the single entry"
); );
for (register label i=0; i<s; i++) for (label i=0; i<s; i++)
{ {
L[i] = element; L[i] = element;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -77,7 +77,7 @@ void Foam::UPtrList<T>::setSize(const label newSize)
ptrs_.setSize(newSize); ptrs_.setSize(newSize);
// set new elements to NULL // set new elements to NULL
for (register label i=oldSize; i<newSize; i++) for (label i=oldSize; i<newSize; i++)
{ {
ptrs_[i] = NULL; ptrs_[i] = NULL;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,9 +67,9 @@ inline void Foam::UIPstream::readFromBuffer
+ ((externalBufPosition_ - 1) & ~(align - 1)); + ((externalBufPosition_ - 1) & ~(align - 1));
} }
register const char* bufPtr = &externalBuf_[externalBufPosition_]; const char* bufPtr = &externalBuf_[externalBufPosition_];
register char* dataPtr = reinterpret_cast<char*>(data); char* dataPtr = reinterpret_cast<char*>(data);
register size_t i = count; size_t i = count;
while (i--) *dataPtr++ = *bufPtr++; while (i--) *dataPtr++ = *bufPtr++;
externalBufPosition_ += count; externalBufPosition_ += count;
checkEof(); checkEof();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,8 +76,8 @@ inline void Foam::UOPstream::writeToBuffer
// Extend if necessary // Extend if necessary
sendBuf_.setSize(alignedPos + count); sendBuf_.setSize(alignedPos + count);
register const char* dataPtr = reinterpret_cast<const char*>(data); const char* dataPtr = reinterpret_cast<const char*>(data);
register size_t i = count; size_t i = count;
while (i--) sendBuf_[alignedPos++] = *dataPtr++; while (i--) sendBuf_[alignedPos++] = *dataPtr++;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -413,8 +413,8 @@ Foam::Istream& Foam::ISstream::read(word& str)
static const int errLen = 80; // truncate error message for readability static const int errLen = 80; // truncate error message for readability
static char buf[maxLen]; static char buf[maxLen];
register int nChar = 0; int nChar = 0;
register int listDepth = 0; int listDepth = 0;
char c; char c;
while (get(c) && word::valid(c)) while (get(c) && word::valid(c))
@ -505,7 +505,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
return *this; return *this;
} }
register int nChar = 0; int nChar = 0;
bool escaped = false; bool escaped = false;
while (get(c)) 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 const int errLen = 80; // truncate error message for readability
static char buf[maxLen]; static char buf[maxLen];
register int nChar = 0; int nChar = 0;
register int blockCount = 0; int blockCount = 0;
char c; char c;
if (!get(c) || c != '$') if (!get(c) || c != '$')
@ -708,7 +708,7 @@ Foam::Istream& Foam::ISstream::readVerbatim(string& str)
char c; char c;
register int nChar = 0; int nChar = 0;
while (get(c)) while (get(c))
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,10 +80,10 @@ Foam::Ostream& Foam::OSstream::write(const string& str)
{ {
os_ << token::BEGIN_STRING; os_ << token::BEGIN_STRING;
register int backslash = 0; int backslash = 0;
for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter) for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter)
{ {
register char c = *iter; char c = *iter;
if (c == '\\') if (c == '\\')
{ {
@ -131,7 +131,7 @@ Foam::Ostream& Foam::OSstream::writeQuoted
{ {
os_ << token::BEGIN_STRING; os_ << token::BEGIN_STRING;
register int backslash = 0; int backslash = 0;
for for
( (
string::const_iterator iter = str.begin(); string::const_iterator iter = str.begin();
@ -139,7 +139,7 @@ Foam::Ostream& Foam::OSstream::writeQuoted
++iter ++iter
) )
{ {
register char c = *iter; char c = *iter;
if (c == '\\') if (c == '\\')
{ {
@ -236,7 +236,7 @@ Foam::Ostream& Foam::OSstream::write(const char* buf, std::streamsize count)
void Foam::OSstream::indent() void Foam::OSstream::indent()
{ {
for (register unsigned short i = 0; i < indentLevel_*indentSize_; i++) for (unsigned short i = 0; i < indentLevel_*indentSize_; i++)
{ {
os_ << ' '; os_ << ' ';
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ T Foam::ReadHex(ISstream& is)
while (is.get(c) && isspace(c)) while (is.get(c) && isspace(c))
{} {}
register T result = 0; T result = 0;
do do
{ {
if (isspace(c) || c == 0) break; if (isspace(c) || c == 0) break;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ curve::curve(const curve& Curve, const label nFacets)
{ {
// Calculate curve length // Calculate curve length
scalar curveLength=0; scalar curveLength=0;
register label i; label i;
for (i=0; i<Curve.size()-1; i++) for (i=0; i<Curve.size()-1; i++)
{ {
curveLength += distance(Curve[i], Curve[i+1]); curveLength += distance(Curve[i], Curve[i+1]);
@ -128,7 +128,7 @@ curve grad(const curve& Curve)
{ {
curve gradCurve(Curve); curve gradCurve(Curve);
register label i; label i;
for (i=1; i<Curve.size()-1; i++) for (i=1; i<Curve.size()-1; i++)
{ {
scalar deltaIm1 = Curve[i].x() - Curve[i-1].x(); scalar deltaIm1 = Curve[i].x() - Curve[i-1].x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -202,15 +202,15 @@ void Foam::LUscalarMatrix::convert
const scalar* __restrict__ upperPtr = ldum.upper().begin(); const scalar* __restrict__ upperPtr = ldum.upper().begin();
const scalar* __restrict__ lowerPtr = ldum.lower().begin(); const scalar* __restrict__ lowerPtr = ldum.lower().begin();
register const label nCells = ldum.diag().size(); const label nCells = ldum.diag().size();
register const label nFaces = ldum.upper().size(); const label nFaces = ldum.upper().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
operator[](cell)[cell] = diagPtr[cell]; operator[](cell)[cell] = diagPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
label uCell = uPtr[face]; label uCell = uPtr[face];
label lCell = lPtr[face]; label lCell = lPtr[face];
@ -238,9 +238,9 @@ void Foam::LUscalarMatrix::convert
const scalar* __restrict__ nbrUpperLowerPtr = const scalar* __restrict__ nbrUpperLowerPtr =
interfaceCoeffs[nbrInt].begin(); interfaceCoeffs[nbrInt].begin();
register label inFaces = interface.faceCells().size(); label inFaces = interface.faceCells().size();
for (register label face=0; face<inFaces; face++) for (label face=0; face<inFaces; face++)
{ {
label uCell = lPtr[face]; label uCell = lPtr[face];
label lCell = uPtr[face]; label lCell = uPtr[face];
@ -279,16 +279,16 @@ void Foam::LUscalarMatrix::convert
const scalar* __restrict__ upperPtr = lduMatrixi.upper_.begin(); const scalar* __restrict__ upperPtr = lduMatrixi.upper_.begin();
const scalar* __restrict__ lowerPtr = lduMatrixi.lower_.begin(); const scalar* __restrict__ lowerPtr = lduMatrixi.lower_.begin();
register const label nCells = lduMatrixi.size(); const label nCells = lduMatrixi.size();
register const label nFaces = lduMatrixi.upper_.size(); const label nFaces = lduMatrixi.upper_.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
label globalCell = cell + offset; label globalCell = cell + offset;
operator[](globalCell)[globalCell] = diagPtr[cell]; operator[](globalCell)[globalCell] = diagPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
label uCell = uPtr[face] + offset; label uCell = uPtr[face] + offset;
label lCell = lPtr[face] + offset; label lCell = lPtr[face] + offset;
@ -311,9 +311,9 @@ void Foam::LUscalarMatrix::convert
const scalar* __restrict__ upperLowerPtr = const scalar* __restrict__ upperLowerPtr =
interface.coeffs_.begin(); interface.coeffs_.begin();
register label inFaces = interface.faceCells_.size()/2; label inFaces = interface.faceCells_.size()/2;
for (register label face=0; face<inFaces; face++) for (label face=0; face<inFaces; face++)
{ {
label uCell = ulPtr[face] + offset; label uCell = ulPtr[face] + offset;
label lCell = ulPtr[face + inFaces] + offset; label lCell = ulPtr[face + inFaces] + offset;
@ -366,10 +366,10 @@ void Foam::LUscalarMatrix::convert
const scalar* __restrict__ lowerPtr = const scalar* __restrict__ lowerPtr =
neiInterface.coeffs_.begin(); neiInterface.coeffs_.begin();
register label inFaces = interface.faceCells_.size(); label inFaces = interface.faceCells_.size();
label neiOffset = procOffsets_[interface.neighbProcNo_]; label neiOffset = procOffsets_[interface.neighbProcNo_];
for (register label face=0; face<inFaces; face++) for (label face=0; face<inFaces; face++)
{ {
label uCell = uPtr[face] + offset; label uCell = uPtr[face] + offset;
label lCell = lPtr[face] + neiOffset; label lCell = lPtr[face] + neiOffset;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -87,15 +87,15 @@ void Foam::LduMatrix<Type, DType, LUType>::Amul
Apsi Apsi
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
ApsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]); ApsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]);
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
ApsiPtr[uPtr[face]] += dot(lowerPtr[face], psiPtr[lPtr[face]]); ApsiPtr[uPtr[face]] += dot(lowerPtr[face], psiPtr[lPtr[face]]);
ApsiPtr[lPtr[face]] += dot(upperPtr[face], psiPtr[uPtr[face]]); ApsiPtr[lPtr[face]] += dot(upperPtr[face], psiPtr[uPtr[face]]);
@ -141,14 +141,14 @@ void Foam::LduMatrix<Type, DType, LUType>::Tmul
Tpsi Tpsi
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
TpsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]); TpsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]);
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
TpsiPtr[uPtr[face]] += dot(upperPtr[face], psiPtr[lPtr[face]]); TpsiPtr[uPtr[face]] += dot(upperPtr[face], psiPtr[lPtr[face]]);
TpsiPtr[lPtr[face]] += dot(lowerPtr[face], psiPtr[uPtr[face]]); TpsiPtr[lPtr[face]] += dot(lowerPtr[face], psiPtr[uPtr[face]]);
@ -182,15 +182,15 @@ void Foam::LduMatrix<Type, DType, LUType>::sumA
const LUType* __restrict__ lowerPtr = lower().begin(); const LUType* __restrict__ lowerPtr = lower().begin();
const LUType* __restrict__ upperPtr = upper().begin(); const LUType* __restrict__ upperPtr = upper().begin();
register const label nCells = diag().size(); const label nCells = diag().size();
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
sumAPtr[cell] = dot(diagPtr[cell], pTraits<Type>::one); sumAPtr[cell] = dot(diagPtr[cell], pTraits<Type>::one);
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
sumAPtr[uPtr[face]] += dot(lowerPtr[face], pTraits<Type>::one); sumAPtr[uPtr[face]] += dot(lowerPtr[face], pTraits<Type>::one);
sumAPtr[lPtr[face]] += dot(upperPtr[face], pTraits<Type>::one); sumAPtr[lPtr[face]] += dot(upperPtr[face], pTraits<Type>::one);
@ -255,15 +255,15 @@ void Foam::LduMatrix<Type, DType, LUType>::residual
rA rA
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rAPtr[cell] = sourcePtr[cell] - dot(diagPtr[cell], psiPtr[cell]); rAPtr[cell] = sourcePtr[cell] - dot(diagPtr[cell], psiPtr[cell]);
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rAPtr[uPtr[face]] -= dot(lowerPtr[face], psiPtr[lPtr[face]]); rAPtr[uPtr[face]] -= dot(lowerPtr[face], psiPtr[lPtr[face]]);
rAPtr[lPtr[face]] -= dot(upperPtr[face], psiPtr[uPtr[face]]); rAPtr[lPtr[face]] -= dot(upperPtr[face], psiPtr[uPtr[face]]);

View File

@ -37,7 +37,7 @@ void Foam::LduMatrix<Type, DType, LUType>::sumDiag()
const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr(); const unallocLabelList& u = lduAddr().upperAddr();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
Diag[l[face]] += Lower[face]; Diag[l[face]] += Lower[face];
Diag[u[face]] += Upper[face]; Diag[u[face]] += Upper[face];
@ -55,7 +55,7 @@ void Foam::LduMatrix<Type, DType, LUType>::negSumDiag()
const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr(); const unallocLabelList& u = lduAddr().upperAddr();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
Diag[l[face]] -= Lower[face]; Diag[l[face]] -= Lower[face];
Diag[u[face]] -= Upper[face]; Diag[u[face]] -= Upper[face];
@ -75,7 +75,7 @@ void Foam::LduMatrix<Type, DType, LUType>::sumMagOffDiag
const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr(); 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[u[face]] += cmptMag(Lower[face]);
sumOff[l[face]] += cmptMag(Upper[face]); sumOff[l[face]] += cmptMag(Upper[face]);
@ -106,9 +106,9 @@ Foam::LduMatrix<Type, DType, LUType>::H(const Field<Type>& psi) const
const LUType* __restrict__ lowerPtr = lower().begin(); const LUType* __restrict__ lowerPtr = lower().begin();
const LUType* __restrict__ upperPtr = upper().begin(); const LUType* __restrict__ upperPtr = upper().begin();
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
HpsiPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]]; HpsiPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]];
HpsiPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]]; HpsiPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]];
@ -142,7 +142,7 @@ Foam::LduMatrix<Type, DType, LUType>::faceH(const Field<Type>& psi) const
tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size())); tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size()));
Field<Type> & faceHpsi = tfaceHpsi(); Field<Type> & faceHpsi = tfaceHpsi();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
faceHpsi[face] = Upper[face]*psi[u[face]] - Lower[face]*psi[l[face]]; faceHpsi[face] = Upper[face]*psi[u[face]] - Lower[face]*psi[l[face]];
} }
@ -422,12 +422,12 @@ void Foam::LduMatrix<Type, DType, LUType>::operator*=
const unallocLabelList& l = lduAddr().lowerAddr(); const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr(); const unallocLabelList& u = lduAddr().upperAddr();
for (register label face=0; face<upper.size(); face++) for (label face=0; face<upper.size(); face++)
{ {
upper[face] *= sf[l[face]]; upper[face] *= sf[l[face]];
} }
for (register label face=0; face<lower.size(); face++) for (label face=0; face<lower.size(); face++)
{ {
lower[face] *= sf[u[face]]; lower[face] *= sf[u[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,8 +58,8 @@ void Foam::TDILUPreconditioner<Type, DType, LUType>::calcInvD
const LUType* const __restrict__ upperPtr = matrix.upper().begin(); const LUType* const __restrict__ upperPtr = matrix.upper().begin();
const LUType* const __restrict__ lowerPtr = matrix.lower().begin(); const LUType* const __restrict__ lowerPtr = matrix.lower().begin();
register label nFaces = matrix.upper().size(); label nFaces = matrix.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDPtr[uPtr[face]] -= rDPtr[uPtr[face]] -=
dot(dot(upperPtr[face], lowerPtr[face]), inv(rDPtr[lPtr[face]])); dot(dot(upperPtr[face], lowerPtr[face]), inv(rDPtr[lPtr[face]]));
@ -67,9 +67,9 @@ void Foam::TDILUPreconditioner<Type, DType, LUType>::calcInvD
// Calculate the reciprocal of the preconditioned diagonal // Calculate the reciprocal of the preconditioned diagonal
register label nCells = rD.size(); label nCells = rD.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = inv(rDPtr[cell]); rDPtr[cell] = inv(rDPtr[cell]);
} }
@ -99,26 +99,26 @@ void Foam::TDILUPreconditioner<Type, DType, LUType>::precondition
const LUType* const __restrict__ lowerPtr = const LUType* const __restrict__ lowerPtr =
this->solver_.matrix().lower().begin(); this->solver_.matrix().lower().begin();
register label nCells = wA.size(); label nCells = wA.size();
register label nFaces = this->solver_.matrix().upper().size(); label nFaces = this->solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = dot(rDPtr[cell], rAPtr[cell]); wAPtr[cell] = dot(rDPtr[cell], rAPtr[cell]);
} }
register label sface; label sface;
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
sface = losortPtr[face]; sface = losortPtr[face];
wAPtr[uPtr[sface]] -= wAPtr[uPtr[sface]] -=
dot(rDPtr[uPtr[sface]], dot(lowerPtr[sface], wAPtr[lPtr[sface]])); dot(rDPtr[uPtr[sface]], dot(lowerPtr[sface], wAPtr[lPtr[sface]]));
} }
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
wAPtr[lPtr[face]] -= wAPtr[lPtr[face]] -=
dot(rDPtr[lPtr[face]], dot(upperPtr[face], wAPtr[uPtr[face]])); dot(rDPtr[lPtr[face]], dot(upperPtr[face], wAPtr[uPtr[face]]));
@ -149,25 +149,25 @@ void Foam::TDILUPreconditioner<Type, DType, LUType>::preconditionT
const LUType* const __restrict__ lowerPtr = const LUType* const __restrict__ lowerPtr =
this->solver_.matrix().lower().begin(); this->solver_.matrix().lower().begin();
register label nCells = wT.size(); label nCells = wT.size();
register label nFaces = this->solver_.matrix().upper().size(); label nFaces = this->solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wTPtr[cell] = dot(rDPtr[cell], rTPtr[cell]); wTPtr[cell] = dot(rDPtr[cell], rTPtr[cell]);
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
wTPtr[uPtr[face]] -= wTPtr[uPtr[face]] -=
dot(rDPtr[uPtr[face]], dot(upperPtr[face], wTPtr[lPtr[face]])); dot(rDPtr[uPtr[face]], dot(upperPtr[face], wTPtr[lPtr[face]]));
} }
register label sface; label sface;
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
sface = losortPtr[face]; sface = losortPtr[face];
wTPtr[lPtr[sface]] -= wTPtr[lPtr[sface]] -=

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,10 +40,10 @@ Foam::DiagonalPreconditioner<Type, DType, LUType>::DiagonalPreconditioner
DType* __restrict__ rDPtr = rD.begin(); DType* __restrict__ rDPtr = rD.begin();
const DType* __restrict__ DPtr = this->solver_.matrix().diag().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 // Generate inverse (reciprocal for scalar) diagonal
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = inv(DPtr[cell]); rDPtr[cell] = inv(DPtr[cell]);
} }
@ -68,9 +68,9 @@ void Foam::DiagonalPreconditioner<Type, DType, LUType>::precondition
const Type* __restrict__ rAPtr = rA.begin(); const Type* __restrict__ rAPtr = rA.begin();
const DType* __restrict__ rDPtr = rD.begin(); const DType* __restrict__ rDPtr = rD.begin();
register label nCells = wA.size(); label nCells = wA.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = dot(rDPtr[cell], rAPtr[cell]); wAPtr[cell] = dot(rDPtr[cell], rAPtr[cell]);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,11 +41,11 @@ Foam::TGaussSeidelSmoother<Type, DType, LUType>::TGaussSeidelSmoother
), ),
rD_(matrix.diag().size()) rD_(matrix.diag().size())
{ {
register const label nCells = matrix.diag().size(); const label nCells = matrix.diag().size();
register const DType* const __restrict__ diagPtr = matrix.diag().begin(); const DType* const __restrict__ diagPtr = matrix.diag().begin();
register DType* __restrict__ rDPtr = rD_.begin(); DType* __restrict__ rDPtr = rD_.begin();
for (register label cellI=0; cellI<nCells; cellI++) for (label cellI=0; cellI<nCells; cellI++)
{ {
rDPtr[cellI] = inv(diagPtr[cellI]); rDPtr[cellI] = inv(diagPtr[cellI]);
} }
@ -64,25 +64,25 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth
const label nSweeps 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<Type> bPrime(nCells); Field<Type> 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(); matrix_.upper().begin();
register const LUType* const __restrict__ lowerPtr = const LUType* const __restrict__ lowerPtr =
matrix_.lower().begin(); matrix_.lower().begin();
register const label* const __restrict__ uPtr = const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin(); matrix_.lduAddr().upperAddr().begin();
register const label* const __restrict__ ownStartPtr = const label* const __restrict__ ownStartPtr =
matrix_.lduAddr().ownerStartAddr().begin(); matrix_.lduAddr().ownerStartAddr().begin();
@ -120,10 +120,10 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth
); );
Type curPsi; Type curPsi;
register label fStart; label fStart;
register label fEnd = ownStartPtr[0]; label fEnd = ownStartPtr[0];
for (register label cellI=0; cellI<nCells; cellI++) for (label cellI=0; cellI<nCells; cellI++)
{ {
// Start and end of this row // Start and end of this row
fStart = fEnd; fStart = fEnd;
@ -133,7 +133,7 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth
curPsi = bPrimePtr[cellI]; curPsi = bPrimePtr[cellI];
// Accumulate the owner product side // Accumulate the owner product side
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
curPsi -= dot(upperPtr[curFace], psiPtr[uPtr[curFace]]); curPsi -= dot(upperPtr[curFace], psiPtr[uPtr[curFace]]);
} }
@ -142,7 +142,7 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth
curPsi = dot(rDPtr[cellI], curPsi); curPsi = dot(rDPtr[cellI], curPsi);
// Distribute the neighbour side using current psi // Distribute the neighbour side using current psi
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
bPrimePtr[uPtr[curFace]] -= dot(lowerPtr[curFace], curPsi); bPrimePtr[uPtr[curFace]] -= dot(lowerPtr[curFace], curPsi);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -62,7 +62,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
this->fieldName_ this->fieldName_
); );
register label nCells = psi.size(); label nCells = psi.size();
Type* __restrict__ psiPtr = psi.begin(); Type* __restrict__ psiPtr = psi.begin();
@ -133,7 +133,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
if (solverPerf.nIterations() == 0) if (solverPerf.nIterations() == 0)
{ {
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell]; pAPtr[cell] = wAPtr[cell];
pTPtr[cell] = wTPtr[cell]; pTPtr[cell] = wTPtr[cell];
@ -143,7 +143,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
{ {
scalar beta = wArT/wArTold; scalar beta = wArT/wArTold;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell] + (beta* pAPtr[cell]); pAPtr[cell] = wAPtr[cell] + (beta* pAPtr[cell]);
pTPtr[cell] = wTPtr[cell] + (beta* pTPtr[cell]); pTPtr[cell] = wTPtr[cell] + (beta* pTPtr[cell]);
@ -174,7 +174,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
scalar alpha = wArT/wApT; scalar alpha = wArT/wApT;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
psiPtr[cell] += (alpha* pAPtr[cell]); psiPtr[cell] += (alpha* pAPtr[cell]);
rAPtr[cell] -= (alpha* wAPtr[cell]); rAPtr[cell] -= (alpha* wAPtr[cell]);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
this->fieldName_ this->fieldName_
); );
register label nCells = psi.size(); label nCells = psi.size();
Type* __restrict__ psiPtr = psi.begin(); Type* __restrict__ psiPtr = psi.begin();
@ -126,7 +126,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
if (solverPerf.nIterations() == 0) if (solverPerf.nIterations() == 0)
{ {
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell]; pAPtr[cell] = wAPtr[cell];
pTPtr[cell] = wTPtr[cell]; pTPtr[cell] = wTPtr[cell];
@ -140,7 +140,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
stabilise(wArTold, solverPerf.vsmall_) stabilise(wArTold, solverPerf.vsmall_)
); );
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell] + cmptMultiply(beta, pAPtr[cell]); pAPtr[cell] = wAPtr[cell] + cmptMultiply(beta, pAPtr[cell]);
pTPtr[cell] = wTPtr[cell] + cmptMultiply(beta, pTPtr[cell]); pTPtr[cell] = wTPtr[cell] + cmptMultiply(beta, pTPtr[cell]);
@ -175,7 +175,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
stabilise(wApT, solverPerf.vsmall_) stabilise(wApT, solverPerf.vsmall_)
); );
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
psiPtr[cell] += cmptMultiply(alpha, pAPtr[cell]); psiPtr[cell] += cmptMultiply(alpha, pAPtr[cell]);
rAPtr[cell] -= cmptMultiply(alpha, wAPtr[cell]); rAPtr[cell] -= cmptMultiply(alpha, wAPtr[cell]);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -59,7 +59,7 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
this->fieldName_ this->fieldName_
); );
register label nCells = psi.size(); label nCells = psi.size();
Type* __restrict__ psiPtr = psi.begin(); Type* __restrict__ psiPtr = psi.begin();
@ -120,7 +120,7 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
if (solverPerf.nIterations() == 0) if (solverPerf.nIterations() == 0)
{ {
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell]; pAPtr[cell] = wAPtr[cell];
} }
@ -133,7 +133,7 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
stabilise(wArAold, solverPerf.vsmall_) stabilise(wArAold, solverPerf.vsmall_)
); );
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell] + cmptMultiply(beta, pAPtr[cell]); pAPtr[cell] = wAPtr[cell] + cmptMultiply(beta, pAPtr[cell]);
} }
@ -167,7 +167,7 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
stabilise(wApA, solverPerf.vsmall_) stabilise(wApA, solverPerf.vsmall_)
); );
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
psiPtr[cell] += cmptMultiply(alpha, pAPtr[cell]); psiPtr[cell] += cmptMultiply(alpha, pAPtr[cell]);
rAPtr[cell] -= cmptMultiply(alpha, wAPtr[cell]); rAPtr[cell] -= cmptMultiply(alpha, wAPtr[cell]);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ void Foam::Matrix<Form, Type>::allocate()
v_ = new Type*[n_]; v_ = new Type*[n_];
v_[0] = new Type[n_*m_]; v_[0] = new Type[n_*m_];
for (register label i=1; i<n_; i++) for (label i=1; i<n_; i++)
{ {
v_[i] = v_[i-1] + m_; v_[i] = v_[i-1] + m_;
} }
@ -100,7 +100,7 @@ Foam::Matrix<Form, Type>::Matrix(const label n, const label m, const Type& a)
label nm = n_*m_; label nm = n_*m_;
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
v[i] = a; v[i] = a;
} }
@ -122,7 +122,7 @@ Foam::Matrix<Form, Type>::Matrix(const Matrix<Form, Type>& a)
const Type* av = a.v_[0]; const Type* av = a.v_[0];
label nm = n_*m_; label nm = n_*m_;
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
v[i] = av[i]; v[i] = av[i];
} }
@ -166,9 +166,9 @@ Form Foam::Matrix<Form, Type>::T() const
const Matrix<Form, Type>& A = *this; const Matrix<Form, Type>& A = *this;
Form At(m(), n()); Form At(m(), n());
for (register label i=0; i<n(); i++) for (label i=0; i<n(); i++)
{ {
for (register label j=0; j<m(); j++) for (label j=0; j<m(); j++)
{ {
At[j][i] = A[i][j]; At[j][i] = A[i][j];
} }
@ -188,7 +188,7 @@ void Foam::Matrix<Form, Type>::operator=(const Type& t)
Type* v = v_[0]; Type* v = v_[0];
label nm = n_*m_; label nm = n_*m_;
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
v[i] = t; v[i] = t;
} }
@ -221,7 +221,7 @@ void Foam::Matrix<Form, Type>::operator=(const Matrix<Form, Type>& a)
const Type* av = a.v_[0]; const Type* av = a.v_[0];
label nm = n_*m_; label nm = n_*m_;
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
v[i] = av[i]; v[i] = av[i];
} }
@ -241,7 +241,7 @@ const Type& Foam::max(const Matrix<Form, Type>& a)
label curMaxI = 0; label curMaxI = 0;
const Type* v = a[0]; const Type* v = a[0];
for (register label i=1; i<nm; i++) for (label i=1; i<nm; i++)
{ {
if (v[i] > v[curMaxI]) if (v[i] > v[curMaxI])
{ {
@ -273,7 +273,7 @@ const Type& Foam::min(const Matrix<Form, Type>& a)
label curMinI = 0; label curMinI = 0;
const Type* v = a[0]; const Type* v = a[0];
for (register label i=1; i<nm; i++) for (label i=1; i<nm; i++)
{ {
if (v[i] < v[curMinI]) if (v[i] < v[curMinI])
{ {
@ -308,7 +308,7 @@ Form Foam::operator-(const Matrix<Form, Type>& a)
const Type* av = a[0]; const Type* av = a[0];
label nm = a.n()*a.m(); label nm = a.n()*a.m();
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
nav[i] = -av[i]; nav[i] = -av[i];
} }
@ -350,7 +350,7 @@ Form Foam::operator+(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
const Type* bv = b[0]; const Type* bv = b[0];
label nm = a.n()*a.m(); label nm = a.n()*a.m();
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
abv[i] = av[i] + bv[i]; abv[i] = av[i] + bv[i];
} }
@ -391,7 +391,7 @@ Form Foam::operator-(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
const Type* bv = b[0]; const Type* bv = b[0];
label nm = a.n()*a.m(); label nm = a.n()*a.m();
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
abv[i] = av[i] - bv[i]; abv[i] = av[i] - bv[i];
} }
@ -411,7 +411,7 @@ Form Foam::operator*(const scalar s, const Matrix<Form, Type>& a)
const Type* av = a[0]; const Type* av = a[0];
label nm = a.n()*a.m(); label nm = a.n()*a.m();
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
sav[i] = s*av[i]; sav[i] = s*av[i];
} }
@ -440,11 +440,11 @@ Form Foam::operator*(const Matrix<Form, Type>& a, const Matrix<Form, Type>& b)
Form ab(a.n(), b.m(), scalar(0)); 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]; ab[i][j] += a[i][l]*b[l][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -80,11 +80,11 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
label k = 0; label k = 0;
// loop over rows // loop over rows
for (register label i=0; i<M.n(); i++) for (label i=0; i<M.n(); i++)
{ {
listDelimiter = is.readBeginList("MatrixRow"); listDelimiter = is.readBeginList("MatrixRow");
for (register label j=0; j<M.m(); j++) for (label j=0; j<M.m(); j++)
{ {
is >> v[k++]; is >> v[k++];
@ -109,7 +109,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
"reading the single entry" "reading the single entry"
); );
for (register label i=0; i<nm; i++) for (label i=0; i<nm; i++)
{ {
v[i] = element; v[i] = element;
} }
@ -168,7 +168,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
{ {
uniform = true; uniform = true;
for (register label i=0; i< nm; i++) for (label i=0; i< nm; i++)
{ {
if (v[i] != v[0]) if (v[i] != v[0])
{ {
@ -197,12 +197,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
label k = 0; label k = 0;
// loop over rows // loop over rows
for (register label i=0; i< M.n(); i++) for (label i=0; i< M.n(); i++)
{ {
os << token::BEGIN_LIST; os << token::BEGIN_LIST;
// Write row // 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; if (j > 0) os << token::SPACE;
os << v[k++]; os << v[k++];
@ -222,12 +222,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
label k = 0; label k = 0;
// loop over rows // 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; os << nl << token::BEGIN_LIST;
// Write row // Write row
for (register label j=0; j< M.m(); j++) for (label j=0; j< M.m(); j++)
{ {
os << nl << v[k++]; os << nl << v[k++];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -151,7 +151,7 @@ void Foam::processorLduInterface::compressedSend
resizeBuf(sendBuf_, nBytes); resizeBuf(sendBuf_, nBytes);
float *fArray = reinterpret_cast<float*>(sendBuf_.begin()); float *fArray = reinterpret_cast<float*>(sendBuf_.begin());
for (register label i=0; i<nm1; i++) for (label i=0; i<nm1; i++)
{ {
fArray[i] = sArray[i] - slast[i%nCmpts]; fArray[i] = sArray[i] - slast[i%nCmpts];
} }
@ -249,7 +249,7 @@ void Foam::processorLduInterface::compressedReceive
scalar *sArray = reinterpret_cast<scalar*>(f.begin()); scalar *sArray = reinterpret_cast<scalar*>(f.begin());
const scalar *slast = &sArray[nm1]; const scalar *slast = &sArray[nm1];
for (register label i=0; i<nm1; i++) for (label i=0; i<nm1; i++)
{ {
sArray[i] = fArray[i] + slast[i%nCmpts]; sArray[i] = fArray[i] + slast[i%nCmpts];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -63,16 +63,16 @@ void Foam::lduMatrix::Amul
cmpt cmpt
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
ApsiPtr[cell] = diagPtr[cell]*psiPtr[cell]; ApsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]]; ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]];
ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]]; ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]];
@ -124,14 +124,14 @@ void Foam::lduMatrix::Tmul
cmpt cmpt
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
TpsiPtr[cell] = diagPtr[cell]*psiPtr[cell]; TpsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
TpsiPtr[uPtr[face]] += upperPtr[face]*psiPtr[lPtr[face]]; TpsiPtr[uPtr[face]] += upperPtr[face]*psiPtr[lPtr[face]];
TpsiPtr[lPtr[face]] += lowerPtr[face]*psiPtr[uPtr[face]]; TpsiPtr[lPtr[face]] += lowerPtr[face]*psiPtr[uPtr[face]];
@ -168,15 +168,15 @@ void Foam::lduMatrix::sumA
const scalar* __restrict__ lowerPtr = lower().begin(); const scalar* __restrict__ lowerPtr = lower().begin();
const scalar* __restrict__ upperPtr = upper().begin(); const scalar* __restrict__ upperPtr = upper().begin();
register const label nCells = diag().size(); const label nCells = diag().size();
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
sumAPtr[cell] = diagPtr[cell]; sumAPtr[cell] = diagPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
sumAPtr[uPtr[face]] += lowerPtr[face]; sumAPtr[uPtr[face]] += lowerPtr[face];
sumAPtr[lPtr[face]] += upperPtr[face]; sumAPtr[lPtr[face]] += upperPtr[face];
@ -253,16 +253,16 @@ void Foam::lduMatrix::residual
cmpt cmpt
); );
register const label nCells = diag().size(); const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rAPtr[cell] = sourcePtr[cell] - diagPtr[cell]*psiPtr[cell]; rAPtr[cell] = sourcePtr[cell] - diagPtr[cell]*psiPtr[cell];
} }
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rAPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]]; rAPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]];
rAPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]]; rAPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]];
@ -314,9 +314,9 @@ Foam::tmp<Foam::scalarField > Foam::lduMatrix::H1() const
const scalar* __restrict__ lowerPtr = lower().begin(); const scalar* __restrict__ lowerPtr = lower().begin();
const scalar* __restrict__ upperPtr = upper().begin(); const scalar* __restrict__ upperPtr = upper().begin();
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
H1Ptr[uPtr[face]] -= lowerPtr[face]; H1Ptr[uPtr[face]] -= lowerPtr[face];
H1Ptr[lPtr[face]] -= upperPtr[face]; H1Ptr[lPtr[face]] -= upperPtr[face];

View File

@ -39,7 +39,7 @@ void Foam::lduMatrix::sumDiag()
const labelUList& l = lduAddr().lowerAddr(); const labelUList& l = lduAddr().lowerAddr();
const labelUList& u = lduAddr().upperAddr(); const labelUList& u = lduAddr().upperAddr();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
Diag[l[face]] += Lower[face]; Diag[l[face]] += Lower[face];
Diag[u[face]] += Upper[face]; Diag[u[face]] += Upper[face];
@ -56,7 +56,7 @@ void Foam::lduMatrix::negSumDiag()
const labelUList& l = lduAddr().lowerAddr(); const labelUList& l = lduAddr().lowerAddr();
const labelUList& u = lduAddr().upperAddr(); const labelUList& u = lduAddr().upperAddr();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
Diag[l[face]] -= Lower[face]; Diag[l[face]] -= Lower[face];
Diag[u[face]] -= Upper[face]; Diag[u[face]] -= Upper[face];
@ -75,7 +75,7 @@ void Foam::lduMatrix::sumMagOffDiag
const labelUList& l = lduAddr().lowerAddr(); const labelUList& l = lduAddr().lowerAddr();
const labelUList& u = lduAddr().upperAddr(); const labelUList& u = lduAddr().upperAddr();
for (register label face = 0; face < l.size(); face++) for (label face = 0; face < l.size(); face++)
{ {
sumOff[u[face]] += mag(Lower[face]); sumOff[u[face]] += mag(Lower[face]);
sumOff[l[face]] += mag(Upper[face]); sumOff[l[face]] += mag(Upper[face]);
@ -316,12 +316,12 @@ void Foam::lduMatrix::operator*=(const scalarField& sf)
const labelUList& l = lduAddr().lowerAddr(); const labelUList& l = lduAddr().lowerAddr();
const labelUList& u = lduAddr().upperAddr(); const labelUList& u = lduAddr().upperAddr();
for (register label face=0; face<upper.size(); face++) for (label face=0; face<upper.size(); face++)
{ {
upper[face] *= sf[l[face]]; upper[face] *= sf[l[face]];
} }
for (register label face=0; face<lower.size(); face++) for (label face=0; face<lower.size(); face++)
{ {
lower[face] *= sf[u[face]]; lower[face] *= sf[u[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,9 +52,9 @@ Foam::tmp<Foam::Field<Type> > Foam::lduMatrix::H(const Field<Type>& psi) const
const scalar* __restrict__ lowerPtr = lower().begin(); const scalar* __restrict__ lowerPtr = lower().begin();
const scalar* __restrict__ upperPtr = upper().begin(); const scalar* __restrict__ upperPtr = upper().begin();
register const label nFaces = upper().size(); const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
HpsiPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]]; HpsiPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]];
HpsiPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]]; HpsiPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]];
@ -89,7 +89,7 @@ Foam::lduMatrix::faceH(const Field<Type>& psi) const
tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size())); tmp<Field<Type> > tfaceHpsi(new Field<Type> (Lower.size()));
Field<Type> & faceHpsi = tfaceHpsi(); Field<Type> & faceHpsi = tfaceHpsi();
for (register label face=0; face<l.size(); face++) for (label face=0; face<l.size(); face++)
{ {
faceHpsi[face] = faceHpsi[face] =
Upper[face]*psi[u[face]] Upper[face]*psi[u[face]]

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,17 +67,17 @@ void Foam::DICPreconditioner::calcReciprocalD
const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ upperPtr = matrix.upper().begin();
// Calculate the DIC diagonal // Calculate the DIC diagonal
register const label nFaces = matrix.upper().size(); const label nFaces = matrix.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDPtr[uPtr[face]] -= upperPtr[face]*upperPtr[face]/rDPtr[lPtr[face]]; rDPtr[uPtr[face]] -= upperPtr[face]*upperPtr[face]/rDPtr[lPtr[face]];
} }
// Calculate the reciprocal of the preconditioned diagonal // Calculate the reciprocal of the preconditioned diagonal
register const label nCells = rD.size(); const label nCells = rD.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = 1.0/rDPtr[cell]; rDPtr[cell] = 1.0/rDPtr[cell];
} }
@ -102,21 +102,21 @@ void Foam::DICPreconditioner::precondition
const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
solver_.matrix().upper().begin(); solver_.matrix().upper().begin();
register label nCells = wA.size(); label nCells = wA.size();
register label nFaces = solver_.matrix().upper().size(); label nFaces = solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = rDPtr[cell]*rAPtr[cell]; wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
wAPtr[uPtr[face]] -= rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[lPtr[face]]; wAPtr[uPtr[face]] -= rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[lPtr[face]];
} }
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]]; wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,17 +68,17 @@ void Foam::DILUPreconditioner::calcReciprocalD
const scalar* const __restrict__ upperPtr = matrix.upper().begin(); const scalar* const __restrict__ upperPtr = matrix.upper().begin();
const scalar* const __restrict__ lowerPtr = matrix.lower().begin(); const scalar* const __restrict__ lowerPtr = matrix.lower().begin();
register label nFaces = matrix.upper().size(); label nFaces = matrix.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDPtr[uPtr[face]] -= upperPtr[face]*lowerPtr[face]/rDPtr[lPtr[face]]; rDPtr[uPtr[face]] -= upperPtr[face]*lowerPtr[face]/rDPtr[lPtr[face]];
} }
// Calculate the reciprocal of the preconditioned diagonal // Calculate the reciprocal of the preconditioned diagonal
register label nCells = rD.size(); label nCells = rD.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = 1.0/rDPtr[cell]; rDPtr[cell] = 1.0/rDPtr[cell];
} }
@ -108,26 +108,26 @@ void Foam::DILUPreconditioner::precondition
const scalar* const __restrict__ lowerPtr = const scalar* const __restrict__ lowerPtr =
solver_.matrix().lower().begin(); solver_.matrix().lower().begin();
register label nCells = wA.size(); label nCells = wA.size();
register label nFaces = solver_.matrix().upper().size(); label nFaces = solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = rDPtr[cell]*rAPtr[cell]; wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
} }
register label sface; label sface;
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
sface = losortPtr[face]; sface = losortPtr[face];
wAPtr[uPtr[sface]] -= wAPtr[uPtr[sface]] -=
rDPtr[uPtr[sface]]*lowerPtr[sface]*wAPtr[lPtr[sface]]; rDPtr[uPtr[sface]]*lowerPtr[sface]*wAPtr[lPtr[sface]];
} }
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
wAPtr[lPtr[face]] -= wAPtr[lPtr[face]] -=
rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]]; rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]];
@ -158,25 +158,25 @@ void Foam::DILUPreconditioner::preconditionT
const scalar* const __restrict__ lowerPtr = const scalar* const __restrict__ lowerPtr =
solver_.matrix().lower().begin(); solver_.matrix().lower().begin();
register label nCells = wT.size(); label nCells = wT.size();
register label nFaces = solver_.matrix().upper().size(); label nFaces = solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wTPtr[cell] = rDPtr[cell]*rTPtr[cell]; wTPtr[cell] = rDPtr[cell]*rTPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
wTPtr[uPtr[face]] -= wTPtr[uPtr[face]] -=
rDPtr[uPtr[face]]*upperPtr[face]*wTPtr[lPtr[face]]; rDPtr[uPtr[face]]*upperPtr[face]*wTPtr[lPtr[face]];
} }
register label sface; label sface;
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
sface = losortPtr[face]; sface = losortPtr[face];
wTPtr[lPtr[sface]] -= wTPtr[lPtr[sface]] -=

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,21 +61,21 @@ Foam::FDICPreconditioner::FDICPreconditioner
const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
solver_.matrix().upper().begin(); solver_.matrix().upper().begin();
register label nCells = rD_.size(); label nCells = rD_.size();
register label nFaces = solver_.matrix().upper().size(); label nFaces = solver_.matrix().upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]]; rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]];
} }
// Generate reciprocal FDIC // Generate reciprocal FDIC
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = 1.0/rDPtr[cell]; rDPtr[cell] = 1.0/rDPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face]; rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face];
rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face]; rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face];
@ -104,21 +104,21 @@ void Foam::FDICPreconditioner::precondition
const scalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin(); const scalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin();
const scalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin(); const scalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin();
register label nCells = wA.size(); label nCells = wA.size();
register label nFaces = solver_.matrix().upper().size(); label nFaces = solver_.matrix().upper().size();
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = rDPtr[cell]*rAPtr[cell]; wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
wAPtr[uPtr[face]] -= rDuUpperPtr[face]*wAPtr[lPtr[face]]; wAPtr[uPtr[face]] -= rDuUpperPtr[face]*wAPtr[lPtr[face]];
} }
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
wAPtr[lPtr[face]] -= rDlUpperPtr[face]*wAPtr[uPtr[face]]; wAPtr[lPtr[face]] -= rDlUpperPtr[face]*wAPtr[uPtr[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -55,10 +55,10 @@ Foam::diagonalPreconditioner::diagonalPreconditioner
scalar* __restrict__ rDPtr = rD.begin(); scalar* __restrict__ rDPtr = rD.begin();
const scalar* __restrict__ DPtr = solver_.matrix().diag().begin(); const scalar* __restrict__ DPtr = solver_.matrix().diag().begin();
register label nCells = rD.size(); label nCells = rD.size();
// Generate reciprocal diagonal // Generate reciprocal diagonal
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = 1.0/DPtr[cell]; rDPtr[cell] = 1.0/DPtr[cell];
} }
@ -78,9 +78,9 @@ void Foam::diagonalPreconditioner::precondition
const scalar* __restrict__ rAPtr = rA.begin(); const scalar* __restrict__ rAPtr = rA.begin();
const scalar* __restrict__ rDPtr = rD.begin(); const scalar* __restrict__ rDPtr = rD.begin();
register label nCells = wA.size(); label nCells = wA.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = rDPtr[cell]*rAPtr[cell]; wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,9 +65,9 @@ void Foam::noPreconditioner::precondition
scalar* __restrict__ wAPtr = wA.begin(); scalar* __restrict__ wAPtr = wA.begin();
const scalar* __restrict__ rAPtr = rA.begin(); const scalar* __restrict__ rAPtr = rA.begin();
register label nCells = wA.size(); label nCells = wA.size();
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
wAPtr[cell] = rAPtr[cell]; wAPtr[cell] = rAPtr[cell];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -97,17 +97,17 @@ void Foam::DICSmoother::smooth
rA *= rD_; rA *= rD_;
register label nFaces = matrix_.upper().size(); label nFaces = matrix_.upper().size();
for (register label facei=0; facei<nFaces; facei++) for (label facei=0; facei<nFaces; facei++)
{ {
register label u = uPtr[facei]; label u = uPtr[facei];
rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]]; rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]];
} }
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label facei=nFacesM1; facei>=0; facei--) 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]]; rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -100,17 +100,17 @@ void Foam::DILUSmoother::smooth
rA *= rD_; rA *= rD_;
register label nFaces = matrix_.upper().size(); label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
register label u = uPtr[face]; label u = uPtr[face];
rAPtr[u] -= rDPtr[u]*lowerPtr[face]*rAPtr[lPtr[face]]; rAPtr[u] -= rDPtr[u]*lowerPtr[face]*rAPtr[lPtr[face]];
} }
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label face=nFacesM1; face>=0; face--) 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]]; rAPtr[l] -= rDPtr[l]*upperPtr[face]*rAPtr[uPtr[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -71,21 +71,21 @@ Foam::FDICSmoother::FDICSmoother
const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
matrix_.upper().begin(); matrix_.upper().begin();
register label nCells = rD_.size(); label nCells = rD_.size();
register label nFaces = matrix_.upper().size(); label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]]; rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]];
} }
// Generate reciprocal FDIC // Generate reciprocal FDIC
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
rDPtr[cell] = 1.0/rDPtr[cell]; rDPtr[cell] = 1.0/rDPtr[cell];
} }
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face]; rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face];
rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face]; rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face];
@ -129,14 +129,14 @@ void Foam::FDICSmoother::smooth
rA *= rD_; rA *= rD_;
register label nFaces = matrix_.upper().size(); label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]]; rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]];
} }
register label nFacesM1 = nFaces - 1; label nFacesM1 = nFaces - 1;
for (register label face=nFacesM1; face>=0; face--) for (label face=nFacesM1; face>=0; face--)
{ {
rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]]; rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,23 +75,23 @@ void Foam::GaussSeidelSmoother::smooth
const label nSweeps 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); scalarField bPrime(nCells);
register scalar* __restrict__ bPrimePtr = bPrime.begin(); scalar* __restrict__ bPrimePtr = bPrime.begin();
register const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
register const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
matrix_.upper().begin(); matrix_.upper().begin();
register const scalar* const __restrict__ lowerPtr = const scalar* const __restrict__ lowerPtr =
matrix_.lower().begin(); matrix_.lower().begin();
register const label* const __restrict__ uPtr = const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin(); matrix_.lduAddr().upperAddr().begin();
register const label* const __restrict__ ownStartPtr = const label* const __restrict__ ownStartPtr =
matrix_.lduAddr().ownerStartAddr().begin(); matrix_.lduAddr().ownerStartAddr().begin();
@ -144,11 +144,11 @@ void Foam::GaussSeidelSmoother::smooth
cmpt cmpt
); );
register scalar psii; scalar psii;
register label fStart; label fStart;
register label fEnd = ownStartPtr[0]; label fEnd = ownStartPtr[0];
for (register label celli=0; celli<nCells; celli++) for (label celli=0; celli<nCells; celli++)
{ {
// Start and end of this row // Start and end of this row
fStart = fEnd; fStart = fEnd;
@ -158,7 +158,7 @@ void Foam::GaussSeidelSmoother::smooth
psii = bPrimePtr[celli]; psii = bPrimePtr[celli];
// Accumulate the owner product side // Accumulate the owner product side
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
} }
@ -167,7 +167,7 @@ void Foam::GaussSeidelSmoother::smooth
psii /= diagPtr[celli]; psii /= diagPtr[celli];
// Distribute the neighbour side using psi for this cell // Distribute the neighbour side using psi for this cell
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,7 +64,7 @@ Foam::nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother
// Check that all interface addressing is sorted to be after the // Check that all interface addressing is sorted to be after the
// non-interface addressing. // non-interface addressing.
register const label nCells = matrix.diag().size(); const label nCells = matrix.diag().size();
blockStart_ = nCells; blockStart_ = nCells;
@ -103,23 +103,23 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
const label nSweeps 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); scalarField bPrime(nCells);
register scalar* __restrict__ bPrimePtr = bPrime.begin(); scalar* __restrict__ bPrimePtr = bPrime.begin();
register const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
register const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
matrix_.upper().begin(); matrix_.upper().begin();
register const scalar* const __restrict__ lowerPtr = const scalar* const __restrict__ lowerPtr =
matrix_.lower().begin(); matrix_.lower().begin();
register const label* const __restrict__ uPtr = const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin(); matrix_.lduAddr().upperAddr().begin();
register const label* const __restrict__ ownStartPtr = const label* const __restrict__ ownStartPtr =
matrix_.lduAddr().ownerStartAddr().begin(); matrix_.lduAddr().ownerStartAddr().begin();
// Parallel boundary initialisation. The parallel boundary is treated // Parallel boundary initialisation. The parallel boundary is treated
@ -160,11 +160,11 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
cmpt cmpt
); );
register scalar curPsi; scalar curPsi;
register label fStart; label fStart;
register label fEnd = ownStartPtr[0]; label fEnd = ownStartPtr[0];
for (register label cellI=0; cellI<blockStart; cellI++) for (label cellI=0; cellI<blockStart; cellI++)
{ {
// Start and end of this row // Start and end of this row
fStart = fEnd; fStart = fEnd;
@ -174,7 +174,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
curPsi = bPrimePtr[cellI]; curPsi = bPrimePtr[cellI];
// Accumulate the owner product side // Accumulate the owner product side
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]]; curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]];
} }
@ -183,7 +183,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
curPsi /= diagPtr[cellI]; curPsi /= diagPtr[cellI];
// Distribute the neighbour side using current psi // Distribute the neighbour side using current psi
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi;
} }
@ -211,7 +211,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
curPsi = bPrimePtr[cellI]; curPsi = bPrimePtr[cellI];
// Accumulate the owner product side // Accumulate the owner product side
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]]; curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]];
} }
@ -220,7 +220,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
curPsi /= diagPtr[cellI]; curPsi /= diagPtr[cellI];
// Distribute the neighbour side using current psi // Distribute the neighbour side using current psi
for (register label curFace=fStart; curFace<fEnd; curFace++) for (label curFace=fStart; curFace<fEnd; curFace++)
{ {
bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,23 +75,23 @@ void Foam::symGaussSeidelSmoother::smooth
const label nSweeps 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); scalarField bPrime(nCells);
register scalar* __restrict__ bPrimePtr = bPrime.begin(); scalar* __restrict__ bPrimePtr = bPrime.begin();
register const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
register const scalar* const __restrict__ upperPtr = const scalar* const __restrict__ upperPtr =
matrix_.upper().begin(); matrix_.upper().begin();
register const scalar* const __restrict__ lowerPtr = const scalar* const __restrict__ lowerPtr =
matrix_.lower().begin(); matrix_.lower().begin();
register const label* const __restrict__ uPtr = const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin(); matrix_.lduAddr().upperAddr().begin();
register const label* const __restrict__ ownStartPtr = const label* const __restrict__ ownStartPtr =
matrix_.lduAddr().ownerStartAddr().begin(); matrix_.lduAddr().ownerStartAddr().begin();
@ -144,11 +144,11 @@ void Foam::symGaussSeidelSmoother::smooth
cmpt cmpt
); );
register scalar psii; scalar psii;
register label fStart; label fStart;
register label fEnd = ownStartPtr[0]; label fEnd = ownStartPtr[0];
for (register label celli=0; celli<nCells; celli++) for (label celli=0; celli<nCells; celli++)
{ {
// Start and end of this row // Start and end of this row
fStart = fEnd; fStart = fEnd;
@ -158,7 +158,7 @@ void Foam::symGaussSeidelSmoother::smooth
psii = bPrimePtr[celli]; psii = bPrimePtr[celli];
// Accumulate the owner product side // Accumulate the owner product side
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
} }
@ -167,7 +167,7 @@ void Foam::symGaussSeidelSmoother::smooth
psii /= diagPtr[celli]; psii /= diagPtr[celli];
// Distribute the neighbour side using current psi // Distribute the neighbour side using current psi
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
} }
@ -177,7 +177,7 @@ void Foam::symGaussSeidelSmoother::smooth
fStart = ownStartPtr[nCells]; fStart = ownStartPtr[nCells];
for (register label celli=nCells-1; celli>=0; celli--) for (label celli=nCells-1; celli>=0; celli--)
{ {
// Start and end of this row // Start and end of this row
fEnd = fStart; fEnd = fStart;
@ -187,7 +187,7 @@ void Foam::symGaussSeidelSmoother::smooth
psii = bPrimePtr[celli]; psii = bPrimePtr[celli];
// Accumulate the owner product side // Accumulate the owner product side
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
} }
@ -196,7 +196,7 @@ void Foam::symGaussSeidelSmoother::smooth
psii /= diagPtr[celli]; psii /= diagPtr[celli];
// Distribute the neighbour side using psi for this cell // Distribute the neighbour side using psi for this cell
for (register label facei=fStart; facei<fEnd; facei++) for (label facei=fStart; facei<fEnd; facei++)
{ {
bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,8 +58,8 @@ void Foam::GAMGSolver::interpolate
cmpt cmpt
); );
register const label nFaces = m.upper().size(); const label nFaces = m.upper().size();
for (register label face=0; face<nFaces; face++) for (label face=0; face<nFaces; face++)
{ {
ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]]; ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]];
ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]]; ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]];
@ -74,8 +74,8 @@ void Foam::GAMGSolver::interpolate
cmpt cmpt
); );
register const label nCells = m.diag().size(); const label nCells = m.diag().size();
for (register label celli=0; celli<nCells; celli++) for (label celli=0; celli<nCells; celli++)
{ {
psiPtr[celli] = -ApsiPtr[celli]/(diagPtr[celli]); psiPtr[celli] = -ApsiPtr[celli]/(diagPtr[celli]);
} }
@ -104,26 +104,26 @@ void Foam::GAMGSolver::interpolate
cmpt cmpt
); );
register const label nCells = m.diag().size(); const label nCells = m.diag().size();
scalar* __restrict__ psiPtr = psi.begin(); scalar* __restrict__ psiPtr = psi.begin();
const scalar* const __restrict__ diagPtr = m.diag().begin(); const scalar* const __restrict__ diagPtr = m.diag().begin();
register const label nCCells = psiC.size(); const label nCCells = psiC.size();
scalarField corrC(nCCells, 0); scalarField corrC(nCCells, 0);
scalarField diagC(nCCells, 0); scalarField diagC(nCCells, 0);
for (register label celli=0; celli<nCells; celli++) for (label celli=0; celli<nCells; celli++)
{ {
corrC[restrictAddressing[celli]] += diagPtr[celli]*psiPtr[celli]; corrC[restrictAddressing[celli]] += diagPtr[celli]*psiPtr[celli];
diagC[restrictAddressing[celli]] += diagPtr[celli]; diagC[restrictAddressing[celli]] += diagPtr[celli];
} }
for (register label ccelli=0; ccelli<nCCells; ccelli++) for (label ccelli=0; ccelli<nCCells; ccelli++)
{ {
corrC[ccelli] = psiC[ccelli] - corrC[ccelli]/diagC[ccelli]; corrC[ccelli] = psiC[ccelli] - corrC[ccelli]/diagC[ccelli];
} }
for (register label celli=0; celli<nCells; celli++) for (label celli=0; celli<nCells; celli++)
{ {
psiPtr[celli] += corrC[restrictAddressing[celli]]; psiPtr[celli] += corrC[restrictAddressing[celli]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,7 @@ Foam::solverPerformance Foam::PBiCG::solve
fieldName_ fieldName_
); );
register label nCells = psi.size(); label nCells = psi.size();
scalar* __restrict__ psiPtr = psi.begin(); scalar* __restrict__ psiPtr = psi.begin();
@ -149,7 +149,7 @@ Foam::solverPerformance Foam::PBiCG::solve
if (solverPerf.nIterations() == 0) if (solverPerf.nIterations() == 0)
{ {
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell]; pAPtr[cell] = wAPtr[cell];
pTPtr[cell] = wTPtr[cell]; pTPtr[cell] = wTPtr[cell];
@ -159,7 +159,7 @@ Foam::solverPerformance Foam::PBiCG::solve
{ {
scalar beta = wArT/wArTold; scalar beta = wArT/wArTold;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell]; pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell];
pTPtr[cell] = wTPtr[cell] + beta*pTPtr[cell]; pTPtr[cell] = wTPtr[cell] + beta*pTPtr[cell];
@ -184,7 +184,7 @@ Foam::solverPerformance Foam::PBiCG::solve
scalar alpha = wArT/wApT; scalar alpha = wArT/wApT;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
psiPtr[cell] += alpha*pAPtr[cell]; psiPtr[cell] += alpha*pAPtr[cell];
rAPtr[cell] -= alpha*wAPtr[cell]; rAPtr[cell] -= alpha*wAPtr[cell];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,7 +76,7 @@ Foam::solverPerformance Foam::PCG::solve
fieldName_ fieldName_
); );
register label nCells = psi.size(); label nCells = psi.size();
scalar* __restrict__ psiPtr = psi.begin(); scalar* __restrict__ psiPtr = psi.begin();
@ -139,7 +139,7 @@ Foam::solverPerformance Foam::PCG::solve
if (solverPerf.nIterations() == 0) if (solverPerf.nIterations() == 0)
{ {
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell]; pAPtr[cell] = wAPtr[cell];
} }
@ -148,7 +148,7 @@ Foam::solverPerformance Foam::PCG::solve
{ {
scalar beta = wArA/wArAold; scalar beta = wArA/wArAold;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell]; pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell];
} }
@ -169,7 +169,7 @@ Foam::solverPerformance Foam::PCG::solve
scalar alpha = wArA/wApA; scalar alpha = wArA/wApA;
for (register label cell=0; cell<nCells; cell++) for (label cell=0; cell<nCells; cell++)
{ {
psiPtr[cell] += alpha*pAPtr[cell]; psiPtr[cell] += alpha*pAPtr[cell];
rAPtr[cell] -= alpha*wAPtr[cell]; rAPtr[cell] -= alpha*wAPtr[cell];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,13 +50,13 @@ void Foam::LUDecompose
scalar vv[n]; scalar vv[n];
sign = 1; sign = 1;
for (register label i=0; i<n; i++) for (label i=0; i<n; i++)
{ {
scalar largestCoeff = 0.0; scalar largestCoeff = 0.0;
scalar temp; scalar temp;
const scalar* __restrict__ matrixi = matrix[i]; const scalar* __restrict__ matrixi = matrix[i];
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
if ((temp = mag(matrixi[j])) > largestCoeff) if ((temp = mag(matrixi[j])) > largestCoeff)
{ {
@ -76,16 +76,16 @@ void Foam::LUDecompose
vv[i] = 1.0/largestCoeff; vv[i] = 1.0/largestCoeff;
} }
for (register label j=0; j<n; j++) for (label j=0; j<n; j++)
{ {
scalar* __restrict__ matrixj = matrix[j]; scalar* __restrict__ matrixj = matrix[j];
for (register label i=0; i<j; i++) for (label i=0; i<j; i++)
{ {
scalar* __restrict__ matrixi = matrix[i]; scalar* __restrict__ matrixi = matrix[i];
scalar sum = matrixi[j]; scalar sum = matrixi[j];
for (register label k=0; k<i; k++) for (label k=0; k<i; k++)
{ {
sum -= matrixi[k]*matrix[k][j]; sum -= matrixi[k]*matrix[k][j];
} }
@ -95,12 +95,12 @@ void Foam::LUDecompose
label iMax = 0; label iMax = 0;
scalar largestCoeff = 0.0; scalar largestCoeff = 0.0;
for (register label i=j; i<n; i++) for (label i=j; i<n; i++)
{ {
scalar* __restrict__ matrixi = matrix[i]; scalar* __restrict__ matrixi = matrix[i];
scalar sum = matrixi[j]; scalar sum = matrixi[j];
for (register label k=0; k<j; k++) for (label k=0; k<j; k++)
{ {
sum -= matrixi[k]*matrix[k][j]; sum -= matrixi[k]*matrix[k][j];
} }
@ -121,7 +121,7 @@ void Foam::LUDecompose
{ {
scalar* __restrict__ matrixiMax = matrix[iMax]; scalar* __restrict__ matrixiMax = matrix[iMax];
for (register label k=0; k<n; k++) for (label k=0; k<n; k++)
{ {
Swap(matrixj[k], matrixiMax[k]); Swap(matrixj[k], matrixiMax[k]);
} }
@ -139,7 +139,7 @@ void Foam::LUDecompose
{ {
scalar rDiag = 1.0/matrixj[j]; scalar rDiag = 1.0/matrixj[j];
for (register label i=j+1; i<n; i++) for (label i=j+1; i<n; i++)
{ {
matrix[i][j] *= rDiag; matrix[i][j] *= rDiag;
} }
@ -238,14 +238,14 @@ void Foam::multiply
ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0)); ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
for (register label i = 0; i < A.n(); i++) for (label i = 0; i < A.n(); i++)
{ {
for (register label g = 0; g < C.m(); g++) for (label g = 0; g < C.m(); g++)
{ {
for (register label l = 0; l < C.n(); l++) for (label l = 0; l < C.n(); l++)
{ {
scalar ab = 0; scalar ab = 0;
for (register label j = 0; j < A.m(); j++) for (label j = 0; j < A.m(); j++)
{ {
ab += A[i][j]*B[j][l]; ab += A[i][j]*B[j][l];
} }
@ -294,11 +294,11 @@ void Foam::multiply
ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0)); ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
for (register label i = 0; i < A.n(); i++) for (label i = 0; i < A.n(); i++)
{ {
for (register label g = 0; g < C.m(); g++) for (label g = 0; g < C.m(); g++)
{ {
for (register label l = 0; l < C.n(); l++) for (label l = 0; l < C.n(); l++)
{ {
ans[i][g] += C[l][g] * A[i][l]*B[l]; ans[i][g] += C[l][g] * A[i][l]*B[l];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,13 +39,13 @@ void Foam::solve
label n = tmpMatrix.n(); label n = tmpMatrix.n();
// Elimination // Elimination
for (register label i=0; i<n; i++) for (label i=0; i<n; i++)
{ {
label iMax = i; label iMax = i;
scalar largestCoeff = mag(tmpMatrix[iMax][i]); scalar largestCoeff = mag(tmpMatrix[iMax][i]);
// Swap entries around to find a good pivot // Swap entries around to find a good pivot
for (register label j=i+1; j<n; j++) for (label j=i+1; j<n; j++)
{ {
if (mag(tmpMatrix[j][i]) > largestCoeff) if (mag(tmpMatrix[j][i]) > largestCoeff)
{ {
@ -58,7 +58,7 @@ void Foam::solve
{ {
//Info<< "Pivoted on " << i << " " << iMax << endl; //Info<< "Pivoted on " << i << " " << iMax << endl;
for (register label k=i; k<n; k++) for (label k=i; k<n; k++)
{ {
Swap(tmpMatrix[i][k], tmpMatrix[iMax][k]); Swap(tmpMatrix[i][k], tmpMatrix[iMax][k]);
} }
@ -74,11 +74,11 @@ void Foam::solve
} }
// Reduce to upper triangular form // Reduce to upper triangular form
for (register label j=i+1; j<n; j++) for (label j=i+1; j<n; j++)
{ {
sourceSol[j] -= sourceSol[i]*(tmpMatrix[j][i]/tmpMatrix[i][i]); sourceSol[j] -= sourceSol[i]*(tmpMatrix[j][i]/tmpMatrix[i][i]);
for (register label k=n-1; k>=i; k--) for (label k=n-1; k>=i; k--)
{ {
tmpMatrix[j][k] -= tmpMatrix[j][k] -=
tmpMatrix[i][k]*tmpMatrix[j][i]/tmpMatrix[i][i]; tmpMatrix[i][k]*tmpMatrix[j][i]/tmpMatrix[i][i];
@ -87,11 +87,11 @@ void Foam::solve
} }
// Back-substitution // Back-substitution
for (register label j=n-1; j>=0; j--) for (label j=n-1; j>=0; j--)
{ {
Type ntempvec = pTraits<Type>::zero; Type ntempvec = pTraits<Type>::zero;
for (register label k=j+1; k<n; k++) for (label k=j+1; k<n; k++)
{ {
ntempvec += tmpMatrix[j][k]*sourceSol[k]; ntempvec += tmpMatrix[j][k]*sourceSol[k];
} }
@ -127,7 +127,7 @@ void Foam::LUBacksubstitute
label ii = 0; label ii = 0;
for (register label i=0; i<n; i++) for (label i=0; i<n; i++)
{ {
label ip = pivotIndices[i]; label ip = pivotIndices[i];
Type sum = sourceSol[ip]; Type sum = sourceSol[ip];
@ -149,12 +149,12 @@ void Foam::LUBacksubstitute
sourceSol[i] = sum; sourceSol[i] = sum;
} }
for (register label i=n-1; i>=0; i--) for (label i=n-1; i>=0; i--)
{ {
Type sum = sourceSol[i]; Type sum = sourceSol[i];
const scalar* __restrict__ luMatrixi = luMatrix[i]; const scalar* __restrict__ luMatrixi = luMatrix[i];
for (register label j=i+1; j<n; j++) for (label j=i+1; j<n; j++)
{ {
sum -= luMatrixi[j]*sourceSol[j]; sum -= luMatrixi[j]*sourceSol[j];
} }
@ -175,7 +175,7 @@ void Foam::LUBacksubstitute
label ii = 0; label ii = 0;
for (register label i=0; i<n; i++) for (label i=0; i<n; i++)
{ {
Type sum = sourceSol[i]; Type sum = sourceSol[i];
const scalar* __restrict__ luMatrixi = luMatrix[i]; const scalar* __restrict__ luMatrixi = luMatrix[i];
@ -195,12 +195,12 @@ void Foam::LUBacksubstitute
sourceSol[i] = sum/luMatrixi[i]; sourceSol[i] = sum/luMatrixi[i];
} }
for (register label i=n-1; i>=0; i--) for (label i=n-1; i>=0; i--)
{ {
Type sum = sourceSol[i]; Type sum = sourceSol[i];
const scalar* __restrict__ luMatrixi = luMatrix[i]; const scalar* __restrict__ luMatrixi = luMatrix[i];
for (register label j=i+1; j<n; j++) for (label j=i+1; j<n; j++)
{ {
sum -= luMatrixi[j]*sourceSol[j]; sum -= luMatrixi[j]*sourceSol[j];
} }
@ -258,11 +258,11 @@ void Foam::multiply
ans = Matrix<Form, Type>(A.n(), B.m(), scalar(0)); ans = Matrix<Form, Type>(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]; ans[i][j] += A[i][l]*B[l][j];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -73,7 +73,7 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const
bool found = false; bool found = false;
for (register label checkI = 0; checkI < maxVert; checkI++) for (label checkI = 0; checkI < maxVert; checkI++)
{ {
if (curPoint == p[checkI]) if (curPoint == p[checkI])
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -468,7 +468,7 @@ Foam::point Foam::face::centre(const pointField& points) const
point centrePoint = point::zero; point centrePoint = point::zero;
for (register label pI=0; pI<nPoints; ++pI) for (label pI=0; pI<nPoints; ++pI)
{ {
centrePoint += points[operator[](pI)]; centrePoint += points[operator[](pI)];
} }
@ -477,7 +477,7 @@ Foam::point Foam::face::centre(const pointField& points) const
scalar sumA = 0; scalar sumA = 0;
vector sumAc = vector::zero; vector sumAc = vector::zero;
for (register label pI=0; pI<nPoints; ++pI) for (label pI=0; pI<nPoints; ++pI)
{ {
const point& nextPoint = points[operator[]((pI + 1) % nPoints)]; const point& nextPoint = points[operator[]((pI + 1) % nPoints)];
@ -532,7 +532,7 @@ Foam::vector Foam::face::normal(const pointField& p) const
).normal(); ).normal();
} }
register label pI; label pI;
point centrePoint = vector::zero; point centrePoint = vector::zero;
for (pI = 0; pI < nPoints; ++pI) for (pI = 0; pI < nPoints; ++pI)
@ -646,7 +646,7 @@ Foam::scalar Foam::face::sweptVol
label nPoints = size(); label nPoints = size();
for (register label pi=0; pi<nPoints-1; ++pi) for (label pi=0; pi<nPoints-1; ++pi)
{ {
// Note: for best accuracy, centre point always comes last // Note: for best accuracy, centre point always comes last
sv += triPointRef sv += triPointRef

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -73,7 +73,7 @@ Type Foam::face::average
point centrePoint = point::zero; point centrePoint = point::zero;
Type cf = pTraits<Type>::zero; Type cf = pTraits<Type>::zero;
for (register label pI=0; pI<nPoints; pI++) for (label pI=0; pI<nPoints; pI++)
{ {
centrePoint += meshPoints[operator[](pI)]; centrePoint += meshPoints[operator[](pI)];
cf += fld[operator[](pI)]; cf += fld[operator[](pI)];
@ -85,7 +85,7 @@ Type Foam::face::average
scalar sumA = 0; scalar sumA = 0;
Type sumAf = pTraits<Type>::zero; Type sumAf = pTraits<Type>::zero;
for (register label pI=0; pI<nPoints; pI++) for (label pI=0; pI<nPoints; pI++)
{ {
// Calculate 3*triangle centre field value // Calculate 3*triangle centre field value
Type ttcf = Type ttcf =

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -81,7 +81,7 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells
const label patchID const label patchID
) const ) const
{ {
register bool found; bool found;
labelList FaceCells(patchFaces.size()); labelList FaceCells(patchFaces.size());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -60,7 +60,7 @@ meshEdges
// create the storage // create the storage
labelList meshEdges(PatchEdges.size()); labelList meshEdges(PatchEdges.size());
register bool found = false; bool found = false;
// get reference to the points on the patch // get reference to the points on the patch
const labelList& pp = meshPoints(); const labelList& pp = meshPoints();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,8 +41,8 @@ const char* const Foam::pTraits<int32_t>::typeName = "int32";
Foam::label Foam::pow(label a, label b) Foam::label Foam::pow(label a, label b)
{ {
register label ans = 1; label ans = 1;
for (register label i=0; i<b; i++) for (label i=0; i<b; i++)
{ {
ans *= a; ans *= a;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,8 +41,8 @@ const char* const Foam::pTraits<uint32_t>::typeName = "uint32";
Foam::uLabel Foam::pow(uLabel a, uLabel b) Foam::uLabel Foam::pow(uLabel a, uLabel b)
{ {
register uLabel ans = 1; uLabel ans = 1;
for (register uLabel i=0; i<b; i++) for (uLabel i=0; i<b; i++)
{ {
ans *= a; ans *= a;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,7 +91,7 @@ Foam::fileName& Foam::fileName::toAbsolute()
bool Foam::fileName::clean() bool Foam::fileName::clean()
{ {
// the top slash - we are never allowed to go above it // the top slash - we are never allowed to go above it
register string::size_type top = this->find('/'); string::size_type top = this->find('/');
// no slashes - nothing to do // no slashes - nothing to do
if (top == string::npos) if (top == string::npos)
@ -100,18 +100,18 @@ bool Foam::fileName::clean()
} }
// start with the '/' found: // start with the '/' found:
register char prev = '/'; char prev = '/';
register string::size_type nChar = top+1; string::size_type nChar = top+1;
register string::size_type maxLen = this->size(); string::size_type maxLen = this->size();
for for
( (
register string::size_type src = nChar; string::size_type src = nChar;
src < maxLen; src < maxLen;
/*nil*/ /*nil*/
) )
{ {
register char c = operator[](src++); char c = operator[](src++);
if (prev == '/') if (prev == '/')
{ {
@ -132,7 +132,7 @@ bool Foam::fileName::clean()
// peek at the next character // peek at the next character
register char c1 = operator[](src); char c1 = operator[](src);
// found '/./' - skip it // found '/./' - skip it
if (c1 == '/') if (c1 == '/')

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,7 +39,7 @@ const Foam::string Foam::string::null;
// Count and return the number of a given character in the string // Count and return the number of a given character in the string
Foam::string::size_type Foam::string::count(const char c) const 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) for (const_iterator iter = begin(); iter != end(); ++iter)
{ {
@ -109,10 +109,10 @@ bool Foam::string::removeRepeated(const char character)
if (character && find(character) != npos) if (character && find(character) != npos)
{ {
register string::size_type nChar=0; string::size_type nChar=0;
iterator iter2 = begin(); iterator iter2 = begin();
register char prev = 0; char prev = 0;
for for
( (
@ -121,7 +121,7 @@ bool Foam::string::removeRepeated(const char character)
iter1++ iter1++
) )
{ {
register char c = *iter1; char c = *iter1;
if (prev == c && c == character) if (prev == c && c == character)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -79,7 +79,7 @@ inline bool Foam::string::stripInvalid(string& str)
{ {
if (!valid<String>(str)) if (!valid<String>(str))
{ {
register size_type nValid = 0; size_type nValid = 0;
iterator iter2 = str.begin(); iterator iter2 = str.begin();
for for
@ -89,7 +89,7 @@ inline bool Foam::string::stripInvalid(string& str)
iter1++ iter1++
) )
{ {
register char c = *iter1; char c = *iter1;
if (String::valid(c)) if (String::valid(c))
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,7 +51,7 @@ void Foam::enrichedPatch::calcPointPoints() const
const faceList& lf = localFaces(); const faceList& lf = localFaces();
register bool found = false; bool found = false;
forAll(lf, faceI) forAll(lf, faceI)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -89,8 +89,8 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad
forAll(own, facei) forAll(own, facei)
{ {
register label ownFaceI = own[facei]; label ownFaceI = own[facei];
register label neiFaceI = nei[facei]; label neiFaceI = nei[facei];
Type deltaVsf = vsf[neiFaceI] - vsf[ownFaceI]; Type deltaVsf = vsf[neiFaceI] - vsf[ownFaceI];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -72,7 +72,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -70,7 +70,7 @@ public:
const direction dim const direction dim
) )
{ {
register label curIdx = 0; label curIdx = 0;
coeffs[curIdx++] = weight; coeffs[curIdx++] = weight;
coeffs[curIdx++] = weight*d.x(); coeffs[curIdx++] = weight*d.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -208,7 +208,7 @@ surfaceInterpolationScheme<Type>::interpolate
Field<Type>& sfi = sf.internalField(); Field<Type>& sfi = sf.internalField();
for (register label fi=0; fi<P.size(); fi++) for (label fi=0; fi<P.size(); fi++)
{ {
sfi[fi] = lambda[fi]*vfi[P[fi]] + y[fi]*vfi[N[fi]]; sfi[fi] = lambda[fi]*vfi[P[fi]] + y[fi]*vfi[N[fi]];
} }
@ -290,7 +290,7 @@ surfaceInterpolationScheme<Type>::interpolate
Field<Type>& sfi = sf.internalField(); Field<Type>& sfi = sf.internalField();
for (register label fi=0; fi<P.size(); fi++) for (label fi=0; fi<P.size(); fi++)
{ {
sfi[fi] = lambda[fi]*(vfi[P[fi]] - vfi[N[fi]]) + vfi[N[fi]]; sfi[fi] = lambda[fi]*(vfi[P[fi]] - vfi[N[fi]]) + vfi[N[fi]];
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,7 +68,7 @@ void Foam::simpleGeomDecomp::assignToProcessorGroup
// one extra cell each // one extra cell each
for (j=0; j<fstProcessorGroup; j++) for (j=0; j<fstProcessorGroup; j++)
{ {
for (register label k=0; k<jumpb; k++) for (label k=0; k<jumpb; k++)
{ {
processorGroup[ind++] = j; processorGroup[ind++] = j;
} }
@ -77,7 +77,7 @@ void Foam::simpleGeomDecomp::assignToProcessorGroup
// and now to the `normal' processor groups // and now to the `normal' processor groups
for (; j<nProcGroup; j++) for (; j<nProcGroup; j++)
{ {
for (register label k=0; k<jump; k++) for (label k=0; k<jump; k++)
{ {
processorGroup[ind++] = j; processorGroup[ind++] = j;
} }

View File

@ -227,7 +227,7 @@ void Foam::meshToMesh0::cellAddresses
// point than the current cell // point than the current cell
// set curCell label to zero (start) // set curCell label to zero (start)
register label curCell = 0; label curCell = 0;
// set reference to cell to cell addressing // set reference to cell to cell addressing
const vectorField& centresFrom = fromMesh.cellCentres(); const vectorField& centresFrom = fromMesh.cellCentres();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -107,10 +107,10 @@ Foam::Ostream& Foam::OBJstream::write(const string& str)
{ {
OFstream::write(token::BEGIN_STRING); OFstream::write(token::BEGIN_STRING);
register int backslash = 0; int backslash = 0;
for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter) for (string::const_iterator iter = str.begin(); iter != str.end(); ++iter)
{ {
register char c = *iter; char c = *iter;
if (c == '\\') if (c == '\\')
{ {
@ -156,7 +156,7 @@ Foam::Ostream& Foam::OBJstream::writeQuoted
{ {
OFstream::write(token::BEGIN_STRING); OFstream::write(token::BEGIN_STRING);
register int backslash = 0; int backslash = 0;
for for
( (
string::const_iterator iter = str.begin(); string::const_iterator iter = str.begin();
@ -164,7 +164,7 @@ Foam::Ostream& Foam::OBJstream::writeQuoted
++iter ++iter
) )
{ {
register char c = *iter; char c = *iter;
if (c == '\\') if (c == '\\')
{ {

View File

@ -64,7 +64,7 @@ void Foam::ode<ChemistryModel>::solve
label nSpecie = this->nSpecie(); label nSpecie = this->nSpecie();
// Copy the concentration, T and P to the total solve-vector // Copy the concentration, T and P to the total solve-vector
for (register int i=0; i<nSpecie; i++) for (int i=0; i<nSpecie; i++)
{ {
cTp_[i] = c[i]; cTp_[i] = c[i];
} }
@ -73,7 +73,7 @@ void Foam::ode<ChemistryModel>::solve
odeSolver_->solve(0, deltaT, cTp_, subDeltaT); odeSolver_->solve(0, deltaT, cTp_, subDeltaT);
for (register int i=0; i<nSpecie; i++) for (int i=0; i<nSpecie; i++)
{ {
c[i] = max(0.0, cTp_[i]); c[i] = max(0.0, cTp_[i]);
} }

View File

@ -44,7 +44,7 @@ inline Foam::janafThermo<EquationOfState>::janafThermo
Thigh_(Thigh), Thigh_(Thigh),
Tcommon_(Tcommon) Tcommon_(Tcommon)
{ {
for (register label coefLabel=0; coefLabel<nCoeffs_; coefLabel++) for (label coefLabel=0; coefLabel<nCoeffs_; coefLabel++)
{ {
highCpCoeffs_[coefLabel] = highCpCoeffs[coefLabel]; highCpCoeffs_[coefLabel] = highCpCoeffs[coefLabel];
lowCpCoeffs_[coefLabel] = lowCpCoeffs[coefLabel]; lowCpCoeffs_[coefLabel] = lowCpCoeffs[coefLabel];
@ -84,7 +84,7 @@ inline Foam::janafThermo<EquationOfState>::janafThermo
Thigh_(jt.Thigh_), Thigh_(jt.Thigh_),
Tcommon_(jt.Tcommon_) Tcommon_(jt.Tcommon_)
{ {
for (register label coefLabel=0; coefLabel<nCoeffs_; coefLabel++) for (label coefLabel=0; coefLabel<nCoeffs_; coefLabel++)
{ {
highCpCoeffs_[coefLabel] = jt.highCpCoeffs_[coefLabel]; highCpCoeffs_[coefLabel] = jt.highCpCoeffs_[coefLabel];
lowCpCoeffs_[coefLabel] = jt.lowCpCoeffs_[coefLabel]; lowCpCoeffs_[coefLabel] = jt.lowCpCoeffs_[coefLabel];
@ -260,7 +260,7 @@ inline void Foam::janafThermo<EquationOfState>::operator+=
for for
( (
register label coefLabel=0; label coefLabel=0;
coefLabel<janafThermo<EquationOfState>::nCoeffs_; coefLabel<janafThermo<EquationOfState>::nCoeffs_;
coefLabel++ coefLabel++
) )
@ -307,7 +307,7 @@ inline void Foam::janafThermo<EquationOfState>::operator-=
for for
( (
register label coefLabel=0; label coefLabel=0;
coefLabel<janafThermo<EquationOfState>::nCoeffs_; coefLabel<janafThermo<EquationOfState>::nCoeffs_;
coefLabel++ coefLabel++
) )
@ -343,7 +343,7 @@ inline Foam::janafThermo<EquationOfState> Foam::operator+
for for
( (
register label coefLabel=0; label coefLabel=0;
coefLabel<janafThermo<EquationOfState>::nCoeffs_; coefLabel<janafThermo<EquationOfState>::nCoeffs_;
coefLabel++ coefLabel++
) )
@ -405,7 +405,7 @@ inline Foam::janafThermo<EquationOfState> Foam::operator-
for for
( (
register label coefLabel=0; label coefLabel=0;
coefLabel<janafThermo<EquationOfState>::nCoeffs_; coefLabel<janafThermo<EquationOfState>::nCoeffs_;
coefLabel++ coefLabel++
) )