Commit 47f4e8a7 authored by Franjo's avatar Franjo

Merge branch 'defect-release-v1.1' into release

parents c50d952d 3bd5dcdc
*.dep
**/lnInclude/*
**/Make/**/*
...@@ -30,7 +30,6 @@ Description ...@@ -30,7 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "Time.H"
#include "cartesian2DMeshGenerator.H" #include "cartesian2DMeshGenerator.H"
using namespace Foam; using namespace Foam;
......
...@@ -30,7 +30,6 @@ Description ...@@ -30,7 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "Time.H"
#include "voronoiMeshGenerator.H" #include "voronoiMeshGenerator.H"
using namespace Foam; using namespace Foam;
......
...@@ -30,7 +30,6 @@ Description ...@@ -30,7 +30,6 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "argList.H" #include "argList.H"
#include "Time.H"
#include "tetMeshGenerator.H" #include "tetMeshGenerator.H"
using namespace Foam; using namespace Foam;
......
...@@ -176,7 +176,7 @@ void boxScaling::boundingPlanes(PtrList<plane>&pl) const ...@@ -176,7 +176,7 @@ void boxScaling::boundingPlanes(PtrList<plane>&pl) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary boxScaling::dict(bool ignoreType) const dictionary boxScaling::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;
......
...@@ -46,7 +46,7 @@ coordinateModification::coordinateModification() ...@@ -46,7 +46,7 @@ coordinateModification::coordinateModification()
coordinateModification::coordinateModification coordinateModification::coordinateModification
( (
const word& name, const word& name,
const dictionary& dict const dictionary& /*dict*/
) )
: :
name_(name) name_(name)
......
...@@ -39,7 +39,6 @@ SourceFiles ...@@ -39,7 +39,6 @@ SourceFiles
#include "word.H" #include "word.H"
#include "point.H" #include "point.H"
#include "coordinateModificationList.H" #include "coordinateModificationList.H"
#include "Time.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -153,7 +153,7 @@ void planeScaling::boundingPlanes(PtrList<plane>& pl) const ...@@ -153,7 +153,7 @@ void planeScaling::boundingPlanes(PtrList<plane>& pl) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionary planeScaling::dict(bool ignoreType) const dictionary planeScaling::dict(bool /*ignoreType*/) const
{ {
dictionary dict; dictionary dict;
......
...@@ -686,7 +686,7 @@ void boundaryLayers::createNewPartitionVerticesParallel ...@@ -686,7 +686,7 @@ void boundaryLayers::createNewPartitionVerticesParallel
( (
const labelLongList& procPoints, const labelLongList& procPoints,
const List<direction>& pVertices, const List<direction>& pVertices,
const boolList& treatPatches const boolList& /*treatPatches*/
) )
{ {
if( !Pstream::parRun() ) if( !Pstream::parRun() )
......
...@@ -860,7 +860,7 @@ void checkMeshDict::updatePatchCellSize ...@@ -860,7 +860,7 @@ void checkMeshDict::updatePatchCellSize
void checkMeshDict::updateSubsetCellSize void checkMeshDict::updateSubsetCellSize
( (
const std::map<word, wordList>& patchesFromPatch const std::map<word, wordList>& /*patchesFromPatch*/
) )
{ {
...@@ -1028,7 +1028,7 @@ void checkMeshDict::updateRemoveCellsIntersectingPatches ...@@ -1028,7 +1028,7 @@ void checkMeshDict::updateRemoveCellsIntersectingPatches
void checkMeshDict::updateObjectRefinements void checkMeshDict::updateObjectRefinements
( (
const std::map<word, wordList>& patchesFromPatch const std::map<word, wordList>& /*patchesFromPatch*/
) )
{ {
......
...@@ -34,15 +34,34 @@ Foam::Ostream& Foam::operator<< ...@@ -34,15 +34,34 @@ Foam::Ostream& Foam::operator<<
const Foam::FRWGraph<T, width>& DL const Foam::FRWGraph<T, width>& DL
) )
{ {
os << DL.size() << "(" << endl; os << DL.size() << "(" << nl;
for(register label i=0;i<DL.size();++i)
for(label i=0;i<DL.size();++i)
{ {
os << width << "("; os << width << "(";
for(label j=0;j<width;++j) for(label j=0;j<width;++j)
os << DL(i, j) << " " << endl; {
os << ")" << endl; if( j )
{
os << " ";
}
os << DL(i, j);
}
os << ")" << nl;
} }
os << ")"; os << ")";
// Check state of IOstream
os.check
(
"template<class T, Foam::label width>Foam::Ostream& Foam::operator<<"
"(Foam::Ostream& os, const Foam::FRWGraph<T, width>&)"
);
return os; return os;
} }
......
...@@ -36,7 +36,7 @@ void Foam::FRWGraph<T, width>::checkIndex(const label i, const label j) const ...@@ -36,7 +36,7 @@ void Foam::FRWGraph<T, width>::checkIndex(const label i, const label j) const
<< " is not in range " << 0 << " is not in range " << 0
<< " and " << nRows_ << abort(FatalError); << " and " << nRows_ << abort(FatalError);
} }
if( (j < 0) || (j >= width) ) if( (j < 0) || (j >= width) )
FatalErrorIn FatalErrorIn
( (
...@@ -105,7 +105,7 @@ inline Foam::label Foam::FRWGraph<T,width>::size() const ...@@ -105,7 +105,7 @@ inline Foam::label Foam::FRWGraph<T,width>::size() const
} }
template<class T, Foam::label width> template<class T, Foam::label width>
inline Foam::label Foam::FRWGraph<T,width>::sizeOfRow(const label rowI) const inline Foam::label Foam::FRWGraph<T,width>::sizeOfRow(const label) const
{ {
return width; return width;
} }
...@@ -155,10 +155,11 @@ inline bool Foam::FRWGraph<T,width>::contains ...@@ -155,10 +155,11 @@ inline bool Foam::FRWGraph<T,width>::contains
) const ) const
{ {
const label start = rowI * width; const label start = rowI * width;
for(register label i=0;i<width;++i)
for(label i=0;i<width;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return true; return true;
return false; return false;
} }
...@@ -170,10 +171,11 @@ inline Foam::label Foam::FRWGraph<T,width>::containsAtPosition ...@@ -170,10 +171,11 @@ inline Foam::label Foam::FRWGraph<T,width>::containsAtPosition
) const ) const
{ {
const label start = rowI * width; const label start = rowI * width;
for(register label i=0;i<width;++i)
for(label i=0;i<width;++i)
if( data_[start+i] == e ) if( data_[start+i] == e )
return i; return i;
return -1; return -1;
} }
...@@ -188,7 +190,7 @@ inline const T& Foam::FRWGraph<T,width>::operator() ...@@ -188,7 +190,7 @@ inline const T& Foam::FRWGraph<T,width>::operator()
#ifdef FULLDEBUG #ifdef FULLDEBUG
checkIndex(i, j); checkIndex(i, j);
#endif #endif
return data_[i * width + j]; return data_[i * width + j];
} }
...@@ -201,7 +203,7 @@ inline T& Foam::FRWGraph<T,width>::operator() ...@@ -201,7 +203,7 @@ inline T& Foam::FRWGraph<T,width>::operator()
#ifdef FULLDEBUG #ifdef FULLDEBUG
checkIndex(i, j); checkIndex(i, j);
#endif #endif
return data_[i * width + j]; return data_[i * width + j];
} }
......
...@@ -202,7 +202,7 @@ Foam::Istream& Foam::operator>> ...@@ -202,7 +202,7 @@ Foam::Istream& Foam::operator>>
if( listDelimiter == token::BEGIN_LIST ) if( listDelimiter == token::BEGIN_LIST )
{ {
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
is >> DL[i]; is >> DL[i];
...@@ -223,7 +223,7 @@ Foam::Istream& Foam::operator>> ...@@ -223,7 +223,7 @@ Foam::Istream& Foam::operator>>
"reading the single entry" "reading the single entry"
); );
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
DL[i] = element; DL[i] = element;
} }
...@@ -306,7 +306,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is) ...@@ -306,7 +306,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
if( listDelimiter == token::BEGIN_LIST ) if( listDelimiter == token::BEGIN_LIST )
{ {
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
is >> this->operator[](origSize); is >> this->operator[](origSize);
++origSize; ++origSize;
...@@ -328,7 +328,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is) ...@@ -328,7 +328,7 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
"reading the single entry" "reading the single entry"
); );
for(register label i=0;i<size;++i) for(label i=0;i<size;++i)
{ {
this->operator[](origSize) = element; this->operator[](origSize) = element;
++origSize; ++origSize;
...@@ -346,31 +346,6 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is) ...@@ -346,31 +346,6 @@ void Foam::LongList<T, Offset>::appendFromStream(Istream& is)
forAll(buf, i) forAll(buf, i)
this->operator[](origSize++) = buf[i]; this->operator[](origSize++) = buf[i];
/*const label blockSize = 1<<shift_;
Info << "nextFree_ " << nextFree_ << endl;
//- append elements by reading binary block
while( origSize < nextFree_ )
{
const label currBlock = origSize >> shift_;
const label currPos = origSize & mask_;
Info << "Orig size " << origSize
<< nl << "currBlock " << currBlock
<< nl << "currPos " << currPos << endl;
T* data = &dataPtr_[currBlock][currPos];
label bs = Foam::min(nextFree_-origSize, blockSize);
bs = Foam::min(blockSize - currPos, bs);
Info << "bs " << bs << endl;
is.read(reinterpret_cast<char*>(data), bs * sizeof(T));
origSize += bs;
} */
is.fatalCheck is.fatalCheck
( (
"appendFromStream(Istream& is)" "appendFromStream(Istream& is)"
......
...@@ -41,7 +41,6 @@ SourceFiles ...@@ -41,7 +41,6 @@ SourceFiles
#define LongList_H #define LongList_H
#include "label.H" #include "label.H"
#include "longLong.H"
#include "bool.H" #include "bool.H"
#include "IOstreams.H" #include "IOstreams.H"
#include "error.H" #include "error.H"
......
...@@ -78,7 +78,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s) ...@@ -78,7 +78,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
if( numblock1 < numBlocks_ ) if( numblock1 < numBlocks_ )
{ {
for(register label i=numblock1;i<numBlocks_;++i) for(label i=numblock1;i<numBlocks_;++i)
delete [] dataPtr_[i]; delete [] dataPtr_[i];
} }
else if( numblock1 > numBlocks_ ) else if( numblock1 > numBlocks_ )
...@@ -91,7 +91,8 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s) ...@@ -91,7 +91,8 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
} while( numblock1 > numAllocatedBlocks_ ); } while( numblock1 > numAllocatedBlocks_ );
T** dataptr1 = new T*[numAllocatedBlocks_]; T** dataptr1 = new T*[numAllocatedBlocks_];
for(register label i=0;i<numBlocks_;++i)
for(label i=0;i<numBlocks_;++i)
dataptr1[i] = dataPtr_[i]; dataptr1[i] = dataPtr_[i];
if( dataPtr_ ) if( dataPtr_ )
...@@ -99,7 +100,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s) ...@@ -99,7 +100,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
dataPtr_ = dataptr1; dataPtr_ = dataptr1;
} }
for(register label i=numBlocks_;i<numblock1;++i) for(label i=numBlocks_;i<numblock1;++i)
dataPtr_[i] = new T[blockSize]; dataPtr_[i] = new T[blockSize];
} }
...@@ -110,7 +111,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s) ...@@ -110,7 +111,7 @@ inline void Foam::LongList<T, Offset>::allocateSize(const label s)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
void Foam::LongList<T, Offset>::clearOut() void Foam::LongList<T, Offset>::clearOut()
{ {
for(register label i=0;i<numBlocks_;++i) for(label i=0;i<numBlocks_;++i)
delete [] dataPtr_[i]; delete [] dataPtr_[i];
if( dataPtr_ ) if( dataPtr_ )
...@@ -281,7 +282,7 @@ inline void Foam::LongList<T, Offset>::appendIfNotIn(const T& e) ...@@ -281,7 +282,7 @@ inline void Foam::LongList<T, Offset>::appendIfNotIn(const T& e)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
inline bool Foam::LongList<T, Offset>::contains(const T& e) const inline bool Foam::LongList<T, Offset>::contains(const T& e) const
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
if( (*this)[i] == e ) if( (*this)[i] == e )
return true; return true;
...@@ -294,7 +295,7 @@ inline Foam::label Foam::LongList<T, Offset>::containsAtPosition ...@@ -294,7 +295,7 @@ inline Foam::label Foam::LongList<T, Offset>::containsAtPosition
const T& e const T& e
) const ) const
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
if( (*this)[i] == e ) if( (*this)[i] == e )
return i; return i;
...@@ -376,7 +377,7 @@ inline T& Foam::LongList<T, Offset>::newElmt(const label i) ...@@ -376,7 +377,7 @@ inline T& Foam::LongList<T, Offset>::newElmt(const label i)
template<class T, Foam::label Offset> template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const T& t) inline void Foam::LongList<T, Offset>::operator=(const T& t)
{ {
for(register label i=0;i<nextFree_;++i) for(label i=0;i<nextFree_;++i)
operator[](i) = t; operator[](i) = t;
} }
...@@ -384,7 +385,8 @@ template<class T, Foam::label Offset> ...@@ -384,7 +385,8 @@ template<class T, Foam::label Offset>
inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l) inline void Foam::LongList<T, Offset>::operator=(const LongList<T, Offset>& l)
{ {
setSize(l.size()); setSize(l.size());
for(register label i=0;i<l.nextFree_;++i)
for(label i=0;i<l.nextFree_;++i)
operator[](i) = l[i]; operator[](i) = l[i];
} }
......
...@@ -35,22 +35,29 @@ Foam::Ostream& Foam::operator<< ...@@ -35,22 +35,29 @@ Foam::Ostream& Foam::operator<<
const Foam::VRWGraph& DL const Foam::VRWGraph& DL
) )
{ {
os << DL.size() << nl << token::BEGIN_LIST; os << DL.size() << nl << token::BEGIN_LIST << nl;
for(register label i=0;i<DL.size();++i) for(label i=0;i<DL.size();++i)
{ {
os << nl << DL.sizeOfRow(i) << token::BEGIN_LIST; os << DL.sizeOfRow(i) << token::BEGIN_LIST;
for(label j=0;j<DL.sizeOfRow(i);++j) for(label j=0;j<DL.sizeOfRow(i);++j)
{ {
if( j > 0 ) os << token::SPACE; if( j ) os << token::SPACE;
os << DL(i, j); os << DL(i, j);
} }
os << token::END_LIST; os << token::END_LIST << nl;
} }
os << nl << token::END_LIST; os << token::END_LIST;
// Check state of IOstream
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, const Foam::VRWGraph&)"
);
return os; return os;
} }
...@@ -90,14 +97,14 @@ void Foam::VRWGraph::optimizeMemoryUsage() ...@@ -90,14 +97,14 @@ void Foam::VRWGraph::optimizeMemoryUsage()
{ {
newPosForNode[elI] = -1; newPosForNode[elI] = -1;
} }
//- create new data //- create new data
for(label elI=0;elI<nElements;++elI) for(label elI=0;elI<nElements;++elI)
if( (newPosForNode[elI] != -1) && (newPosForNode[elI] < elI) ) if( (newPosForNode[elI] != -1) && (newPosForNode[elI] < elI) )
data_[newPosForNode[elI]] = data_[elI]; data_[newPosForNode[elI]] = data_[elI];
data_.setSize(pos); data_.setSize(pos);
//- renumber rows