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

View File

@ -26,7 +26,7 @@ int main()
label* redAddr = 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;
f2[i] = 1.0;
@ -36,12 +36,12 @@ int main()
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);
}
for (register label i=0; i<redSize; i++)
for (label i=0; i<redSize; i++)
{
fr[i] = 1.0;
}
@ -56,7 +56,7 @@ int main()
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];
}
@ -77,7 +77,7 @@ int main()
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]];
}
@ -99,7 +99,7 @@ int main()
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;
fr[j] += f1[i];
@ -122,7 +122,7 @@ int main()
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[redAddr2[i]] -= f2[i];
@ -143,15 +143,15 @@ int main()
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];
}
for (register label i=0; i<size; i++)
for (label i=0; i<size; i++)
{
f4[i] += f2[i];
}
for (register label i=0; i<size; i++)
for (label i=0; i<size; i++)
{
f4[i] -= f3[i];
}

View File

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

View File

@ -279,7 +279,7 @@ int main(int argc, char *argv[])
sqrMergeTol /= 10.0;
register bool found = false;
bool found = false;
// N-squared point search over all points of all faces of
// 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;
do

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -77,9 +77,9 @@ Foam::scalar Foam::Rosenbrock12::solve
{
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];
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,9 +90,9 @@ Foam::scalar Foam::Rosenbrock23::solve
{
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];
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -135,9 +135,9 @@ Foam::scalar Foam::Rosenbrock34::solve
{
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];
}

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,9 +81,9 @@ Foam::scalar Foam::rodas23::solve
{
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];
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -104,9 +104,9 @@ Foam::scalar Foam::rodas34::solve
{
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];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,15 +87,15 @@ void Foam::LduMatrix<Type, DType, LUType>::Amul
Apsi
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; cell++)
{
ApsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]);
}
register const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++)
const label nFaces = upper().size();
for (label face=0; face<nFaces; face++)
{
ApsiPtr[uPtr[face]] += dot(lowerPtr[face], psiPtr[lPtr[face]]);
ApsiPtr[lPtr[face]] += dot(upperPtr[face], psiPtr[uPtr[face]]);
@ -141,14 +141,14 @@ void Foam::LduMatrix<Type, DType, LUType>::Tmul
Tpsi
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; cell++)
{
TpsiPtr[cell] = dot(diagPtr[cell], psiPtr[cell]);
}
register const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++)
const label nFaces = upper().size();
for (label face=0; face<nFaces; face++)
{
TpsiPtr[uPtr[face]] += dot(upperPtr[face], psiPtr[lPtr[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__ upperPtr = upper().begin();
register const label nCells = diag().size();
register const label nFaces = upper().size();
const label nCells = diag().size();
const label nFaces = upper().size();
for (register label cell=0; cell<nCells; cell++)
for (label cell=0; cell<nCells; cell++)
{
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[lPtr[face]] += dot(upperPtr[face], pTraits<Type>::one);
@ -255,15 +255,15 @@ void Foam::LduMatrix<Type, DType, LUType>::residual
rA
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; cell++)
{
rAPtr[cell] = sourcePtr[cell] - dot(diagPtr[cell], psiPtr[cell]);
}
register const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++)
const label nFaces = upper().size();
for (label face=0; face<nFaces; face++)
{
rAPtr[uPtr[face]] -= dot(lowerPtr[face], psiPtr[lPtr[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& 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[u[face]] += Upper[face];
@ -55,7 +55,7 @@ void Foam::LduMatrix<Type, DType, LUType>::negSumDiag()
const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr();
for (register label face=0; face<l.size(); face++)
for (label face=0; face<l.size(); face++)
{
Diag[l[face]] -= Lower[face];
Diag[u[face]] -= Upper[face];
@ -75,7 +75,7 @@ void Foam::LduMatrix<Type, DType, LUType>::sumMagOffDiag
const unallocLabelList& l = lduAddr().lowerAddr();
const unallocLabelList& u = lduAddr().upperAddr();
for (register label face = 0; face < l.size(); face++)
for (label face = 0; face < l.size(); face++)
{
sumOff[u[face]] += cmptMag(Lower[face]);
sumOff[l[face]] += cmptMag(Upper[face]);
@ -106,9 +106,9 @@ Foam::LduMatrix<Type, DType, LUType>::H(const Field<Type>& psi) const
const LUType* __restrict__ lowerPtr = lower().begin();
const LUType* __restrict__ upperPtr = upper().begin();
register const label nFaces = upper().size();
const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++)
for (label face=0; face<nFaces; face++)
{
HpsiPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[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()));
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]];
}
@ -422,12 +422,12 @@ void Foam::LduMatrix<Type, DType, LUType>::operator*=
const unallocLabelList& l = lduAddr().lowerAddr();
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]];
}
for (register label face=0; face<lower.size(); face++)
for (label face=0; face<lower.size(); face++)
{
lower[face] *= sf[u[face]];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -151,7 +151,7 @@ void Foam::processorLduInterface::compressedSend
resizeBuf(sendBuf_, nBytes);
float *fArray = reinterpret_cast<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];
}
@ -249,7 +249,7 @@ void Foam::processorLduInterface::compressedReceive
scalar *sArray = reinterpret_cast<scalar*>(f.begin());
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];
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,16 +63,16 @@ void Foam::lduMatrix::Amul
cmpt
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; 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[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]];
@ -124,14 +124,14 @@ void Foam::lduMatrix::Tmul
cmpt
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; cell++)
{
TpsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
}
register const label nFaces = upper().size();
for (register label face=0; face<nFaces; face++)
const label nFaces = upper().size();
for (label face=0; face<nFaces; face++)
{
TpsiPtr[uPtr[face]] += upperPtr[face]*psiPtr[lPtr[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__ upperPtr = upper().begin();
register const label nCells = diag().size();
register const label nFaces = upper().size();
const label nCells = diag().size();
const label nFaces = upper().size();
for (register label cell=0; cell<nCells; cell++)
for (label cell=0; cell<nCells; 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[lPtr[face]] += upperPtr[face];
@ -253,16 +253,16 @@ void Foam::lduMatrix::residual
cmpt
);
register const label nCells = diag().size();
for (register label cell=0; cell<nCells; cell++)
const label nCells = diag().size();
for (label cell=0; cell<nCells; 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[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__ 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[lPtr[face]] -= upperPtr[face];

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -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__ 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[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()));
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]]

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,9 +65,9 @@ void Foam::noPreconditioner::precondition
scalar* __restrict__ wAPtr = wA.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];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,13 +39,13 @@ void Foam::solve
label n = tmpMatrix.n();
// Elimination
for (register label i=0; i<n; i++)
for (label i=0; i<n; i++)
{
label iMax = i;
scalar largestCoeff = mag(tmpMatrix[iMax][i]);
// 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)
{
@ -58,7 +58,7 @@ void Foam::solve
{
//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]);
}
@ -74,11 +74,11 @@ void Foam::solve
}
// 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]);
for (register label k=n-1; k>=i; k--)
for (label k=n-1; k>=i; k--)
{
tmpMatrix[j][k] -=
tmpMatrix[i][k]*tmpMatrix[j][i]/tmpMatrix[i][i];
@ -87,11 +87,11 @@ void Foam::solve
}
// Back-substitution
for (register label j=n-1; j>=0; j--)
for (label j=n-1; j>=0; j--)
{
Type ntempvec = pTraits<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];
}
@ -127,7 +127,7 @@ void Foam::LUBacksubstitute
label ii = 0;
for (register label i=0; i<n; i++)
for (label i=0; i<n; i++)
{
label ip = pivotIndices[i];
Type sum = sourceSol[ip];
@ -149,12 +149,12 @@ void Foam::LUBacksubstitute
sourceSol[i] = sum;
}
for (register label i=n-1; i>=0; i--)
for (label i=n-1; i>=0; i--)
{
Type sum = sourceSol[i];
const scalar* __restrict__ luMatrixi = luMatrix[i];
for (register label j=i+1; j<n; j++)
for (label j=i+1; j<n; j++)
{
sum -= luMatrixi[j]*sourceSol[j];
}
@ -175,7 +175,7 @@ void Foam::LUBacksubstitute
label ii = 0;
for (register label i=0; i<n; i++)
for (label i=0; i<n; i++)
{
Type sum = sourceSol[i];
const scalar* __restrict__ luMatrixi = luMatrix[i];
@ -195,12 +195,12 @@ void Foam::LUBacksubstitute
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];
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];
}
@ -258,11 +258,11 @@ void Foam::multiply
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];
}

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -73,7 +73,7 @@ Type Foam::face::average
point centrePoint = point::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)];
cf += fld[operator[](pI)];
@ -85,7 +85,7 @@ Type Foam::face::average
scalar sumA = 0;
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
Type ttcf =

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -208,7 +208,7 @@ surfaceInterpolationScheme<Type>::interpolate
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]];
}
@ -290,7 +290,7 @@ surfaceInterpolationScheme<Type>::interpolate
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]];
}

View File

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

View File

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

View File

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

View File

@ -64,7 +64,7 @@ void Foam::ode<ChemistryModel>::solve
label nSpecie = this->nSpecie();
// 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];
}
@ -73,7 +73,7 @@ void Foam::ode<ChemistryModel>::solve
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]);
}

View File

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