Info -> InfoInFunction and updated comments

This commit is contained in:
Henry Weller
2016-01-20 10:18:13 +00:00
parent 1bd1a49306
commit 68e86f97fe
45 changed files with 234 additions and 495 deletions

View File

@ -121,13 +121,12 @@ bool Foam::HashTable<T, Key, Hash>::found(const Key& key) const
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::found(const Key& key) : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return false;
}
@ -153,13 +152,12 @@ Foam::HashTable<T, Key, Hash>::find
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::find(const Key& key) : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return iterator();
}
@ -185,13 +183,12 @@ Foam::HashTable<T, Key, Hash>::find
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::find(const Key& key) const : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return const_iterator();
}
@ -250,7 +247,7 @@ bool Foam::HashTable<T, Key, Hash>::set
prev = ep;
}
// not found, insert it at the head
// Not found, insert it at the head
if (!existing)
{
table_[hashIdx] = new hashedEntry(key, table_[hashIdx], newEntry);
@ -258,39 +255,36 @@ bool Foam::HashTable<T, Key, Hash>::set
if (double(nElmts_)/tableSize_ > 0.8 && tableSize_ < maxTableSize)
{
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::set"
"(const Key& key, T newEntry) : "
"Doubling table size\n";
InfoInFunction << "Doubling table size\n";
}
# endif
#endif
resize(2*tableSize_);
}
}
else if (protect)
{
// found - but protected from overwriting
// Found - but protected from overwriting
// this corresponds to the STL 'insert' convention
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::set"
"(const Key& key, T newEntry, true) : "
"Cannot insert " << key << " already in hash table\n";
InfoInFunction
<< "Cannot insert " << key << " already in hash table\n";
}
# endif
#endif
return false;
}
else
{
// found - overwrite existing entry
// Found - overwrite existing entry
// this corresponds to the Perl convention
hashedEntry* ep = new hashedEntry(key, existing->next_, newEntry);
// replace existing element - within list or insert at the head
// Replace existing element - within list or insert at the head
if (prev)
{
prev->next_ = ep;
@ -310,7 +304,7 @@ bool Foam::HashTable<T, Key, Hash>::set
template<class T, class Key, class Hash>
bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
{
// note: entryPtr_ is NULL for end(), so this catches that too
// Note: entryPtr_ is NULL for end(), so this catches that too
if (entryPtr_)
{
// Search element before entryPtr_
@ -332,7 +326,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
if (prev)
{
// has an element before entryPtr - reposition to there
// Has an element before entryPtr - reposition to there
prev->next_ = entryPtr_->next_;
delete entryPtr_;
entryPtr_ = prev;
@ -343,7 +337,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
hashTable_->table_[hashIndex_] = entryPtr_->next_;
delete entryPtr_;
// assign any non-NULL pointer value so it doesn't look
// Assign any non-NULL pointer value so it doesn't look
// like end()/cend()
entryPtr_ = reinterpret_cast<hashedEntry*>(this);
@ -378,7 +372,7 @@ bool Foam::HashTable<T, Key, Hash>::iteratorBase::erase()
template<class T, class Key, class Hash>
bool Foam::HashTable<T, Key, Hash>::erase(const iterator& iter)
{
// adjust iterator after erase
// Adjust iterator after erase
return const_cast<iterator&>(iter).erase();
}
@ -439,13 +433,12 @@ void Foam::HashTable<T, Key, Hash>::resize(const label sz)
if (newSize == tableSize_)
{
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "HashTable<T, Key, Hash>::resize(const label) : "
<< "new table size == old table size\n";
InfoInFunction << "New table size == old table size\n";
}
# endif
#endif
return;
}
@ -508,7 +501,7 @@ void Foam::HashTable<T, Key, Hash>::shrink()
if (newSize < tableSize_)
{
// avoid having the table disappear on us
// Avoid having the table disappear on us
resize(newSize ? newSize : 2);
}
}
@ -517,7 +510,7 @@ void Foam::HashTable<T, Key, Hash>::shrink()
template<class T, class Key, class Hash>
void Foam::HashTable<T, Key, Hash>::transfer(HashTable<T, Key, Hash>& ht)
{
// as per the Destructor
// As per the Destructor
if (table_)
{
clear();
@ -551,7 +544,7 @@ void Foam::HashTable<T, Key, Hash>::operator=
<< abort(FatalError);
}
// could be zero-sized from a previous transfer()
// Could be zero-sized from a previous transfer()
if (!tableSize_)
{
resize(rhs.tableSize_);
@ -574,7 +567,7 @@ bool Foam::HashTable<T, Key, Hash>::operator==
const HashTable<T, Key, Hash>& rhs
) const
{
// sizes (number of keys) must match
// Sizes (number of keys) must match
if (size() != rhs.size())
{
return false;

View File

@ -39,12 +39,12 @@ Foam::label Foam::StaticHashTableCore::canonicalSize(const label size)
return 0;
}
// enforce power of two
// Enforce power of two
unsigned int goodSize = size;
if (goodSize & (goodSize - 1))
{
// brute-force is fast enough
// Brute-force is fast enough
goodSize = 1;
while (goodSize < unsigned(size))
{
@ -58,7 +58,6 @@ Foam::label Foam::StaticHashTableCore::canonicalSize(const label size)
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct given initial table size
template<class T, class Key, class Hash>
Foam::StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)
:
@ -78,7 +77,6 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable(const label size)
}
// Construct as copy
template<class T, class Key, class Hash>
Foam::StaticHashTable<T, Key, Hash>::StaticHashTable
(
@ -137,13 +135,12 @@ bool Foam::StaticHashTable<T, Key, Hash>::found(const Key& key) const
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::found(const Key&) : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return false;
}
@ -170,13 +167,12 @@ Foam::StaticHashTable<T, Key, Hash>::find
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::find(const Key&) : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return end();
}
@ -203,19 +199,17 @@ Foam::StaticHashTable<T, Key, Hash>::find
}
}
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::find(const Key&) const : "
<< "Entry " << key << " not found in hash table\n";
InfoInFunction << "Entry " << key << " not found in hash table\n";
}
# endif
#endif
return cend();
}
// Return the table of contents
template<class T, class Key, class Hash>
Foam::List<Key> Foam::StaticHashTable<T, Key, Hash>::toc() const
{
@ -254,7 +248,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::set
if (existing == localKeys.size())
{
// not found, append
// Not found, append
List<T>& localObjects = objects_[hashIdx];
localKeys.setSize(existing+1);
@ -267,21 +261,20 @@ bool Foam::StaticHashTable<T, Key, Hash>::set
}
else if (protect)
{
// found - but protected from overwriting
// Found - but protected from overwriting
// this corresponds to the STL 'insert' convention
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::set"
"(const Key& key, T newEntry, true) : "
"Cannot insert " << key << " already in hash table\n";
InfoInFunction
<< "Cannot insert " << key << " already in hash table\n";
}
# endif
#endif
return false;
}
else
{
// found - overwrite existing entry
// Found - overwrite existing entry
// this corresponds to the Perl convention
objects_[hashIdx][existing] = newEntry;
}
@ -307,7 +300,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::erase(const iterator& cit)
localKeys.setSize(localKeys.size()-1);
localObjects.setSize(localObjects.size()-1);
// adjust iterator after erase
// Adjust iterator after erase
iterator& it = const_cast<iterator&>(cit);
it.elemIndex_--;
@ -321,25 +314,24 @@ bool Foam::StaticHashTable<T, Key, Hash>::erase(const iterator& cit)
nElmts_--;
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::erase(iterator&) : "
<< "hashedEntry removed.\n";
InfoInFunction << "hashedEntry removed.\n";
}
# endif
#endif
return true;
}
else
{
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::erase(iterator&) : "
<< "cannot remove hashedEntry from hash table\n";
InfoInFunction
<< "Cannot remove hashedEntry from hash table\n";
}
# endif
#endif
return false;
}
@ -391,13 +383,12 @@ void Foam::StaticHashTable<T, Key, Hash>::resize(const label sz)
if (newSize == keys_.size())
{
# ifdef FULLDEBUG
#ifdef FULLDEBUG
if (debug)
{
Info<< "StaticHashTable<T, Key, Hash>::resize(const label) : "
<< "new table size == old table size\n";
InfoInFunction << "New table size == old table size\n";
}
# endif
#endif
return;
}
@ -517,7 +508,7 @@ bool Foam::StaticHashTable<T, Key, Hash>::operator==
const StaticHashTable<T, Key, Hash>& rhs
) const
{
// sizes (number of keys) must match
// Sizes (number of keys) must match
for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(IFstream, 0);
defineTypeNameAndDebug(IFstream, 0);
}
@ -46,8 +46,7 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
{
if (IFstream::debug)
{
Info<< "IFstreamAllocator::IFstreamAllocator(const fileName&) : "
"cannot open null file " << endl;
InfoInFunction << "Cannot open null file " << endl;
}
}
@ -58,8 +57,7 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
{
if (IFstream::debug)
{
Info<< "IFstreamAllocator::IFstreamAllocator(const fileName&) : "
"decompressing " << pathname + ".gz" << endl;
InfoInFunction << "Decompressing " << pathname + ".gz" << endl;
}
delete ifPtr_;
@ -108,11 +106,8 @@ Foam::IFstream::IFstream
{
if (debug)
{
Info<< "IFstream::IFstream(const fileName&,"
"streamFormat=ASCII,"
"versionNumber=currentVersion) : "
"could not open file for input"
<< endl << info() << endl;
InfoInFunction
<< "Could not open file for input" << endl << info() << endl;
}
setBad();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,8 +49,7 @@ Foam::OFstreamAllocator::OFstreamAllocator
{
if (OFstream::debug)
{
Info<< "OFstreamAllocator::OFstreamAllocator(const fileName&) : "
"cannot open null file " << endl;
InfoInFunction << "Cannot open null file " << endl;
}
}

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,8 +42,7 @@ Foam::instantList Foam::Time::findTimes
{
if (debug)
{
Info<< "Time::findTimes(const fileName&): finding times in directory "
<< directory << endl;
InfoInFunction << "Finding times in directory " << directory << endl;
}
// Read directory entries into a list

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,7 +112,7 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader)
if (is.bad())
{
Info<< "dictionary::read(Istream&, bool) : "
InfoInFunction
<< "Istream not OK after reading dictionary " << name()
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,8 +61,8 @@ Foam::dlLibraryTable::~dlLibraryTable()
{
if (debug)
{
Info<< "dlLibraryTable::~dlLibraryTable() : closing "
<< libNames_[i]
InfoInFunction
<< "Closing " << libNames_[i]
<< " with handle " << uintptr_t(libPtrs_[i]) << endl;
}
dlClose(libPtrs_[i]);
@ -85,7 +85,8 @@ bool Foam::dlLibraryTable::open
if (debug)
{
Info<< "dlLibraryTable::open : opened " << functionLibName
InfoInFunction
<< "Opened " << functionLibName
<< " resulting in handle " << uintptr_t(functionLibPtr) << endl;
}
@ -134,7 +135,8 @@ bool Foam::dlLibraryTable::close
{
if (debug)
{
Info<< "dlLibraryTable::close : closing " << functionLibName
InfoInFunction
<< "Closing " << functionLibName
<< " with handle " << uintptr_t(libPtrs_[index]) << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,15 +28,14 @@ License
#include "Time.H"
#include "Pstream.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::Istream& Foam::regIOobject::readStream()
{
if (IFstream::debug)
{
Info<< "regIOobject::readStream() : "
<< "reading object " << name()
InfoInFunction
<< "Reading object " << name()
<< " from file " << objectPath()
<< endl;
}
@ -112,8 +111,8 @@ Foam::Istream& Foam::regIOobject::readStream(const word& expectName)
{
if (IFstream::debug)
{
Info<< "regIOobject::readStream(const word&) : "
<< "reading object " << name()
InfoInFunction
<< "Reading object " << name()
<< " from file " << objectPath()
<< endl;
}
@ -149,8 +148,8 @@ void Foam::regIOobject::close()
{
if (IFstream::debug)
{
Info<< "regIOobject::close() : "
<< "finished reading " << filePath()
InfoInFunction
<< "Finished reading " << filePath()
<< endl;
}
@ -288,7 +287,8 @@ bool Foam::regIOobject::readIfModified()
if (modified())
{
const fileName& fName = time().getFile(watchIndex_);
Info<< "regIOobject::readIfModified() : " << nl
InfoInFunction
<< nl
<< " Re-reading object " << name()
<< " from file " << fName << endl;
return read();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,8 +74,7 @@ bool Foam::regIOobject::writeObject
if (OFstream::debug)
{
Info<< "regIOobject::write() : "
<< "writing file " << objectPath();
InfoInFunction << "Writing file " << objectPath();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1051,8 +1051,8 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
{
if (debug)
{
Info<< "tmp<scalarField> polyMesh::movePoints(const pointField&) : "
<< " Moving points for time " << time().value()
InfoInFunction
<< "Moving points for time " << time().value()
<< " index " << time().timeIndex() << endl;
}
@ -1077,8 +1077,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
{
moveError = true;
Info<< "tmp<scalarField> polyMesh::movePoints"
<< "(const pointField&) : "
InfoInFunction
<< "Moving the mesh with given points will "
<< "invalidate the mesh." << nl
<< "Mesh motion should not be executed." << endl;

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,9 +37,7 @@ void Foam::polyMesh::removeBoundary()
{
if (debug)
{
Info<< "void polyMesh::removeBoundary(): "
<< "Removing boundary patches."
<< endl;
InfoInFunction << "Removing boundary patches." << endl;
}
// Remove the point zones
@ -56,9 +54,7 @@ void Foam::polyMesh::clearGeom()
{
if (debug)
{
Info<< "void polyMesh::clearGeom() : "
<< "clearing geometric data"
<< endl;
InfoInFunction << "Clearing geometric data" << endl;
}
// Clear all geometric mesh objects
@ -84,9 +80,7 @@ void Foam::polyMesh::clearAdditionalGeom()
{
if (debug)
{
Info<< "void polyMesh::clearAdditionalGeom() : "
<< "clearing additional geometric data"
<< endl;
InfoInFunction << "Clearing additional geometric data" << endl;
}
// Remove the stored tet base points
@ -100,9 +94,8 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
{
if (debug)
{
Info<< "void polyMesh::clearAddressing() : "
<< "clearing topology isMeshUpdate:" << isMeshUpdate
<< endl;
InfoInFunction
<< "Clearing topology isMeshUpdate:" << isMeshUpdate << endl;
}
if (isMeshUpdate)
@ -181,9 +174,7 @@ void Foam::polyMesh::clearCellTree()
{
if (debug)
{
Info<< "void polyMesh::clearCellTree() : "
<< "clearing cell tree"
<< endl;
InfoInFunction << "Clearing cell tree" << endl;
}
cellTreePtr_.clear();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,8 +33,7 @@ void Foam::polyMesh::setInstance(const fileName& inst)
{
if (debug)
{
Info<< "void polyMesh::setInstance(const fileName& inst) : "
<< "Resetting file instance to " << inst << endl;
InfoInFunction << "Resetting file instance to " << inst << endl;
}
points_.writeOpt() = IOobject::AUTO_WRITE;
@ -67,8 +66,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
{
if (debug)
{
Info<< "polyMesh::readUpdateState polyMesh::readUpdate() : "
<< "Updating mesh based on saved data." << endl;
InfoInFunction << "Updating mesh based on saved data." << endl;
}
// Find the point and cell instance
@ -80,8 +78,6 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
{
Info<< "Faces instance: old = " << facesInstance()
<< " new = " << facesInst << nl
//<< "Boundary instance: old = " << boundary_.instance()
//<< " new = " << boundaryInst << nl
<< "Points instance: old = " << pointsInstance()
<< " new = " << pointsInst << endl;
}
@ -449,50 +445,6 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
//if (boundaryInst != boundary_.instance())
//{
// // Boundary file but no topology change
// if (debug)
// {
// Info<< "Boundary state change" << endl;
// }
//
// // Reset the boundary patches
// polyBoundaryMesh newBoundary
// (
// IOobject
// (
// "boundary",
// facesInst,
// meshSubDir,
// *this,
// IOobject::MUST_READ,
// IOobject::NO_WRITE,
// false
// ),
// *this
// );
//
//
//
//
// boundary_.clear();
// boundary_.setSize(newBoundary.size());
//
// forAll(newBoundary, patchI)
// {
// boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
// }
// // Calculate topology for the patches (processor-processor comms
// // etc.)
// boundary_.updateMesh();
//
// // Calculate the geometry for the patches (transformation tensors
// // etc.)
// boundary_.calcGeometry();
//}
return polyMesh::POINTS_MOVED;
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,8 +31,7 @@ void Foam::polyMesh::initMesh()
{
if (debug)
{
Info<< "void polyMesh::initMesh() : "
<< "initialising primitiveMesh" << endl;
InfoInFunction << "initialising primitiveMesh" << endl;
}
// For backward compatibility check if the neighbour array is the same
@ -109,8 +108,7 @@ void Foam::polyMesh::initMesh(cellList& c)
{
if (debug)
{
Info<< "void polyMesh::initMesh(cellList& c) : "
<< "calculating owner-neighbour arrays" << endl;
InfoInFunction << "Calculating owner-neighbour arrays" << endl;
}
owner_.setSize(faces_.size(), -1);
@ -175,4 +173,5 @@ void Foam::polyMesh::initMesh(cellList& c)
neighbour_.note() = meshInfo;
}
// ************************************************************************* //

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,8 +40,8 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
{
if (debug)
{
Info<< "void polyMesh::updateMesh(const mapPolyMesh&) : "
<< "updating addressing and (optional) pointMesh/pointFields"
InfoInFunction
<< "Updating addressing and (optional) pointMesh/pointFields"
<< endl;
}

View File

@ -362,7 +362,7 @@ Foam::label Foam::ZoneMesh<ZoneType, MeshType>::findZoneID
// Zone not found
if (debug)
{
Info<< "label ZoneMesh<ZoneType>::findZoneID(const word&) const : "
InfoInFunction
<< "Zone named " << zoneName << " not found. "
<< "List of available zone names: " << names() << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,9 +49,7 @@ void Foam::faceZone::calcFaceZonePatch() const
{
if (debug)
{
Info<< "void faceZone::calcFaceZonePatch() const : "
<< "Calculating primitive patch"
<< endl;
InfoInFunction << "Calculating primitive patch" << endl;
}
if (patchPtr_)
@ -89,9 +87,7 @@ void Foam::faceZone::calcFaceZonePatch() const
if (debug)
{
Info<< "void faceZone::calcFaceZonePatch() const : "
<< "Finished calculating primitive patch"
<< endl;
InfoInFunction << "Finished calculating primitive patch" << endl;
}
}
@ -100,9 +96,7 @@ void Foam::faceZone::calcCellLayers() const
{
if (debug)
{
Info<< "void Foam::faceZone::calcCellLayers() const : "
<< "calculating master cells"
<< endl;
InfoInFunction << "Calculating master cells" << endl;
}
// It is an error to attempt to recalculate edgeCells
@ -153,8 +147,6 @@ void Foam::faceZone::calcCellLayers() const
sc[faceI] = neiCellI;
}
}
//Info<< "masterCells: " << mc << endl;
//Info<< "slaveCells: " << sc << endl;
}
}
@ -190,7 +182,6 @@ void Foam::faceZone::checkAddressing() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::faceZone::faceZone
(
const word& name,
@ -354,28 +345,6 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
{
if (!mePtr_)
{
//labelList faceCells(size());
//
//const labelList& own = zoneMesh().mesh().faceOwner();
//
//const labelList& faceLabels = *this;
//
//forAll(faceCells, faceI)
//{
// faceCells[faceI] = own[faceLabels[faceI]];
//}
//
//mePtr_ =
// new labelList
// (
// operator()().meshEdges
// (
// zoneMesh().mesh().edges(),
// zoneMesh().mesh().cellEdges(),
// faceCells
// )
// );
mePtr_ =
new labelList
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(zone, 0);
defineTypeNameAndDebug(zone, 0);
}
@ -53,9 +53,7 @@ void Foam::zone::calcLookupMap() const
{
if (debug)
{
Info<< "void zone::calcLookupMap() const: "
<< "Calculating lookup map"
<< endl;
InfoInFunction << "Calculating lookup map" << endl;
}
if (lookupMapPtr_)
@ -77,9 +75,7 @@ void Foam::zone::calcLookupMap() const
if (debug)
{
Info<< "void zone::calcLookupMap() const: "
<< "Finished calculating lookup map"
<< endl;
InfoInFunction << "Finished calculating lookup map" << endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,9 +51,8 @@ bool Foam::primitiveMesh::checkClosedBoundary
{
if (debug)
{
Info<< "bool primitiveMesh::checkClosedBoundary("
<< "const bool) const: "
<< "checking whether the boundary is closed" << endl;
InfoInFunction
<< "Checking whether the boundary is closed" << endl;
}
// Loop through all boundary faces and sum up the face area vectors.
@ -112,10 +111,8 @@ bool Foam::primitiveMesh::checkClosedCells
{
if (debug)
{
Info<< "bool primitiveMesh::checkClosedCells("
<< "const bool, labelHashSet*, labelHashSet*"
<< ", const Vector<label>&) const: "
<< "checking whether cells are closed" << endl;
InfoInFunction
<< "Checking whether cells are closed" << endl;
}
// Check that all cells labels are valid
@ -244,9 +241,7 @@ bool Foam::primitiveMesh::checkFaceAreas
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceAreas("
<< "const bool, labelHashSet*) const: "
<< "checking face area magnitudes" << endl;
InfoInFunction << "Checking face area magnitudes" << endl;
}
const scalarField magFaceAreas(mag(faceAreas));
@ -324,9 +319,7 @@ bool Foam::primitiveMesh::checkCellVolumes
{
if (debug)
{
Info<< "bool primitiveMesh::checkCellVolumes("
<< "const bool, labelHashSet*) const: "
<< "checking cell volumes" << endl;
InfoInFunction << "Checking cell volumes" << endl;
}
scalar minVolume = GREAT;
@ -396,9 +389,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceOrthogonality("
<< "const bool, labelHashSet*) const: "
<< "checking mesh non-orthogonality" << endl;
InfoInFunction << "Checking mesh non-orthogonality" << endl;
}
@ -510,9 +501,7 @@ bool Foam::primitiveMesh::checkFacePyramids
{
if (debug)
{
Info<< "bool primitiveMesh::checkFacePyramids("
<< "const bool, const scalar, labelHashSet*) const: "
<< "checking face orientation" << endl;
InfoInFunction << "Checking face orientation" << endl;
}
const labelList& own = faceOwner();
@ -614,9 +603,7 @@ bool Foam::primitiveMesh::checkFaceSkewness
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceSkewnesss("
<< "const bool, labelHashSet*) const: "
<< "checking face skewness" << endl;
InfoInFunction << "Checking face skewness" << endl;
}
// Warn if the skew correction vector is more than skewWarning times
@ -692,9 +679,7 @@ bool Foam::primitiveMesh::checkFaceAngles
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceAngles"
<< "(const bool, const scalar, labelHashSet*) const: "
<< "checking face angles" << endl;
InfoInFunction << "Checking face angles" << endl;
}
if (maxDeg < -SMALL || maxDeg > 180+SMALL)
@ -775,9 +760,7 @@ bool Foam::primitiveMesh::checkFaceFlatness
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceFlatness"
<< "(const bool, const scalar, labelHashSet*) const: "
<< "checking face flatness" << endl;
InfoInFunction << "Checking face flatness" << endl;
}
if (warnFlatness < 0 || warnFlatness > 1)
@ -880,9 +863,7 @@ bool Foam::primitiveMesh::checkConcaveCells
{
if (debug)
{
Info<< "bool primitiveMesh::checkConcaveCells(const bool"
<< ", labelHashSet*) const: "
<< "checking for concave cells" << endl;
InfoInFunction << "Checking for concave cells" << endl;
}
const cellList& c = cells();
@ -995,9 +976,7 @@ bool Foam::primitiveMesh::checkUpperTriangular
{
if (debug)
{
Info<< "bool primitiveMesh::checkUpperTriangular("
<< "const bool, labelHashSet*) const: "
<< "checking face ordering" << endl;
InfoInFunction << "Checking face ordering" << endl;
}
// Check whether internal faces are ordered in the upper triangular order
@ -1160,9 +1139,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
{
if (debug)
{
Info<< "bool primitiveMesh::checkCellsZipUp("
<< "const bool, labelHashSet*) const: "
<< "checking topological cell openness" << endl;
InfoInFunction << "Checking topological cell openness" << endl;
}
label nOpenCells = 0;
@ -1261,9 +1238,7 @@ bool Foam::primitiveMesh::checkFaceVertices
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceVertices("
<< "const bool, labelHashSet*) const: "
<< "checking face vertices" << endl;
InfoInFunction << "Checking face vertices" << endl;
}
// Check that all vertex labels are valid
@ -1336,9 +1311,7 @@ bool Foam::primitiveMesh::checkPoints
{
if (debug)
{
Info<< "bool primitiveMesh::checkPoints"
<< "(const bool, labelHashSet*) const: "
<< "checking points" << endl;
InfoInFunction << "Checking points" << endl;
}
label nFaceErrors = 0;
@ -1616,8 +1589,7 @@ bool Foam::primitiveMesh::checkFaceFaces
{
if (debug)
{
Info<< "bool primitiveMesh::checkFaceFaces(const bool, labelHashSet*)"
<< " const: " << "checking face-face connectivity" << endl;
InfoInFunction << "Checking face-face connectivity" << endl;
}
const labelListList& pf = pointFaces();
@ -1954,8 +1926,7 @@ bool Foam::primitiveMesh::checkMesh(const bool report) const
{
if (debug)
{
Info<< "bool primitiveMesh::checkMesh(const bool report) const: "
<< "checking primitiveMesh" << endl;
InfoInFunction << "Checking primitiveMesh" << endl;
}
label noFailedChecks = checkTopology(report) + checkGeometry(report);

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ void Foam::meshReader::addPolyBoundaryFace
// Debugging
if (cellPolys_[cellId][cellFaceId] > nInternalFaces_)
{
Info<< "meshReader::createPolyBoundary(): "
InfoInFunction
<< "Problem with face: " << thisFace << endl
<< "Probably multiple definitions "
<< "of a single boundary face." << endl
@ -70,7 +70,7 @@ void Foam::meshReader::addPolyBoundaryFace
}
else if (cellPolys_[cellId][cellFaceId] >= 0)
{
Info<< "meshReader::createPolyBoundary(): "
InfoInFunction
<< "Problem with face: " << thisFace << endl
<< "Probably trying to define a boundary face "
<< "on a previously matched internal face." << endl
@ -340,8 +340,8 @@ void Foam::meshReader::createPolyBoundary()
{
const face& problemFace = meshFaces_[faceI];
Info<< "meshReader::createPolyBoundary() : "
<< "problem with face " << faceI << ": addressed "
InfoInFunction
<< "Problem with face " << faceI << ": addressed "
<< markupFaces[faceI] << " times (should be 2!). Face: "
<< problemFace << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1041,8 +1041,6 @@ void Foam::meshReaders::STARCD::cullPoints()
bool Foam::meshReaders::STARCD::readGeometry(const scalar scaleFactor)
{
// Info<< "called meshReaders::STARCD::readGeometry" << endl;
readPoints(geometryFile_ + ".vrt", scaleFactor);
readCells(geometryFile_ + ".cel");
cullPoints();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,8 +93,7 @@ Foam::septernion Foam::solidBodyMotionFunctions::SDA::transformation() const
quaternion R(rollA*sin(wr*time + phr), 0, 0);
septernion TR(septernion(CofG_ + T)*R*septernion(-CofG_));
Info<< "solidBodyMotionFunctions::SDA::transformation(): "
<< "Time = " << time << " transformation: " << TR << endl;
InfoInFunction << "Time = " << time << " transformation: " << TR << endl;
return TR;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,8 +85,7 @@ Foam::solidBodyMotionFunctions::axisRotationMotion::transformation() const
quaternion R(omega/magOmega, magOmega);
septernion TR(septernion(origin_)*R*septernion(-origin_));
Info<< "solidBodyMotionFunctions::axisRotationMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -105,4 +104,5 @@ bool Foam::solidBodyMotionFunctions::axisRotationMotion::read
return true;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,8 +76,7 @@ Foam::solidBodyMotionFunctions::linearMotion::transformation() const
quaternion R(0, 0, 0);
septernion TR(septernion(displacement)*R);
Info<< "solidBodyMotionFunctions::linearMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -95,4 +94,5 @@ bool Foam::solidBodyMotionFunctions::linearMotion::read
return true;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -77,8 +77,7 @@ Foam::solidBodyMotionFunctions::multiMotion::transformation() const
TR *= SBMFs_[i].transformation();
}
Info<< "solidBodyMotionFunctions::multiMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -116,4 +115,5 @@ bool Foam::solidBodyMotionFunctions::multiMotion::read
return true;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,9 +76,7 @@ Foam::solidBodyMotionFunctions::oscillatingLinearMotion::transformation() const
quaternion R(0, 0, 0);
septernion TR(septernion(displacement)*R);
Info<< "solidBodyMotionFunctions::oscillatingLinearMotion::"
<< "transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -97,4 +95,5 @@ bool Foam::solidBodyMotionFunctions::oscillatingLinearMotion::read
return true;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,9 +84,7 @@ transformation() const
quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z());
septernion TR(septernion(origin_)*R*septernion(-origin_));
Info<< "solidBodyMotionFunctions::oscillatingRotatingMotion::"
<< "transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -106,4 +104,5 @@ bool Foam::solidBodyMotionFunctions::oscillatingRotatingMotion::read
return true;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,8 +80,7 @@ Foam::solidBodyMotionFunctions::rotatingMotion::transformation() const
quaternion R(axis_, angle);
septernion TR(septernion(origin_)*R*septernion(-origin_));
Info<< "solidBodyMotionFunctions::rotatingMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}
@ -102,4 +101,5 @@ bool Foam::solidBodyMotionFunctions::rotatingMotion::read
return true;
}
// ************************************************************************* //

View File

@ -107,8 +107,7 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
quaternion R(TRV[1].x(), TRV[1].y(), TRV[1].z());
septernion TR(septernion(CofG_ + TRV[0])*R*septernion(-CofG_));
Info<< "solidBodyMotionFunctions::tabulated6DoFMotion::transformation(): "
<< "Time = " << t << " transformation: " << TR << endl;
InfoInFunction << "Time = " << t << " transformation: " << TR << endl;
return TR;
}

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,14 +29,11 @@ License
#include "wallNormalInfo.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(wallLayerCells, 0);
defineTypeNameAndDebug(wallLayerCells, 0);
}
@ -64,7 +61,6 @@ bool Foam::wallLayerCells::usesCoupledPatch(const label cellI) const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::wallLayerCells::wallLayerCells
(
const polyMesh& mesh,
@ -160,8 +156,7 @@ Foam::wallLayerCells::wallLayerCells
if (debug)
{
Info<< "wallLayerCells::getRefinement : dumping selected faces to "
<< "selectedFaces.obj" << endl;
InfoInFunction << "Dumping selected faces to selectedFaces.obj" << endl;
OFstream fcStream("selectedFaces.obj");

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,15 +36,13 @@ License
namespace Foam
{
defineTypeNameAndDebug(faceCoupleInfo, 0);
const scalar faceCoupleInfo::angleTol_ = 1e-3;
defineTypeNameAndDebug(faceCoupleInfo, 0);
const scalar faceCoupleInfo::angleTol_ = 1e-3;
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
//- Write edges
void Foam::faceCoupleInfo::writeOBJ
(
const fileName& fName,
@ -97,7 +95,6 @@ void Foam::faceCoupleInfo::writeOBJ
}
//- Writes edges.
void Foam::faceCoupleInfo::writeOBJ
(
const fileName& fName,
@ -122,7 +119,6 @@ void Foam::faceCoupleInfo::writeOBJ
}
//- Writes face and point connectivity as .obj files.
void Foam::faceCoupleInfo::writePointsFaces() const
{
const indirectPrimitivePatch& m = masterPatch();
@ -303,8 +299,6 @@ void Foam::faceCoupleInfo::writeEdges
}
// Given an edgelist and a map for the points on the edges it tries to find
// the corresponding patch edges.
Foam::labelList Foam::faceCoupleInfo::findMappedEdges
(
const edgeList& edges,
@ -334,8 +328,6 @@ Foam::labelList Foam::faceCoupleInfo::findMappedEdges
}
// Detect a cut edge which originates from two boundary faces having different
// polyPatches.
bool Foam::faceCoupleInfo::regionEdge
(
const polyMesh& slaveMesh,
@ -377,9 +369,6 @@ bool Foam::faceCoupleInfo::regionEdge
}
// Find edge using pointI that is most aligned with vector between
// master points. Patchdivision tells us whether or not to use
// patch information to match edges.
Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
(
const bool report,
@ -392,6 +381,10 @@ Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
const label edgeEnd
) const
{
// Find edge using pointI that is most aligned with vector between master
// points. Patchdivision tells us whether or not to use patch information to
// match edges.
const pointField& localPoints = cutFaces().localPoints();
const labelList& pEdges = cutFaces().pointEdges()[pointI];
@ -499,7 +492,6 @@ Foam::label Foam::faceCoupleInfo::mostAlignedCutEdge
}
// Construct points to split points map (in cut addressing)
void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges)
{
labelListList masterToCutEdges
@ -632,8 +624,6 @@ void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges)
}
// Determines rotation for f1 to match up with f0, i.e. the index in f0 of
// the first point of f1.
Foam::label Foam::faceCoupleInfo::matchFaces
(
const scalar absTol,
@ -713,11 +703,6 @@ Foam::label Foam::faceCoupleInfo::matchFaces
}
// Find correspondence from patch points to cut points. This might
// detect shared points so the output is a patch-to-cut point list
// and a compaction list for the cut points (which will always be equal or more
// connected than the patch).
// Returns true if there are any duplicates.
bool Foam::faceCoupleInfo::matchPointsThroughFaces
(
const scalar absTol,
@ -732,6 +717,10 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces
labelList& compactToCut // inverse ,,
)
{
// Find correspondence from patch points to cut points. This might detect
// shared points so the output is a patch-to-cut point list and a compaction
// list for the cut points (which will always be equal or more connected
// than the patch). Returns true if there are any duplicates.
// From slave to cut point
patchToCutPoints.setSize(patchPoints.size());
@ -865,7 +854,6 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces
}
// Return max distance from any point on cutF to masterF
Foam::scalar Foam::faceCoupleInfo::maxDistance
(
const face& cutF,
@ -943,8 +931,7 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces
if (matchedAllFaces)
{
Warning
<< "faceCoupleInfo::faceCoupleInfo : "
WarningInFunction
<< "Matched ALL " << fc1.size()
<< " boundary faces of mesh0 to boundary faces of mesh1." << endl
<< "This is only valid if the mesh to add is fully"
@ -1073,7 +1060,6 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
}
// Grow cutToMasterFace across 'internal' edges.
Foam::label Foam::faceCoupleInfo::growCutFaces
(
const labelList& cutToMasterEdges,
@ -1243,15 +1229,16 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const
}
// Extends matching information by elimination across cutFaces using more
// than one region edge. Updates cutToMasterFaces_ and sets candidates
// which is for every cutface on a region edge the possible master faces.
Foam::label Foam::faceCoupleInfo::matchEdgeFaces
(
const labelList& cutToMasterEdges,
Map<labelList>& candidates
)
{
// Extends matching information by elimination across cutFaces using more
// than one region edge. Updates cutToMasterFaces_ and sets candidates which
// is for every cutface on a region edge the possible master faces.
// For every unassigned cutFaceI the possible list of master faces.
candidates.clear();
candidates.resize(cutFaces().size());
@ -1348,9 +1335,6 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces
}
// Gets a list of cutFaces (that use a master edge) and the candidate
// master faces.
// Finds most aligned master face.
Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
(
Map<labelList>& candidates
@ -1438,14 +1422,15 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
}
// Calculate the set of cut faces inbetween master and slave patch
// assuming perfect match (and optional face ordering on slave)
void Foam::faceCoupleInfo::perfectPointMatch
(
const scalar absTol,
const bool slaveFacesOrdered
)
{
// Calculate the set of cut faces inbetween master and slave patch assuming
// perfect match (and optional face ordering on slave)
if (debug)
{
Pout<< "perfectPointMatch :"
@ -1568,8 +1553,6 @@ void Foam::faceCoupleInfo::perfectPointMatch
}
// Calculate the set of cut faces inbetween master and slave patch
// assuming that slave patch is subdivision of masterPatch.
void Foam::faceCoupleInfo::subDivisionMatch
(
const polyMesh& slaveMesh,
@ -1881,7 +1864,6 @@ void Foam::faceCoupleInfo::subDivisionMatch
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from mesh data
Foam::faceCoupleInfo::faceCoupleInfo
(
const polyMesh& masterMesh,
@ -1970,8 +1952,6 @@ Foam::faceCoupleInfo::faceCoupleInfo
}
// Slave is subdivision of master patch.
// (so -both cover the same area -all of master points are present in slave)
Foam::faceCoupleInfo::faceCoupleInfo
(
const polyMesh& masterMesh,

View File

@ -278,9 +278,9 @@ class faceCoupleInfo
// Face matching
//- Matches two faces.Determines rotation for f1 to match up
// with f0, i.e. the index in f0 of
// the first point of f1.
//- Matches two faces.
// Determines rotation for f1 to match up with f0,
// i.e. the index in f0 of the first point of f1.
static label matchFaces
(
const scalar absTol,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,7 +26,6 @@ License
#include "patchProbes.H"
#include "volFields.H"
#include "IOmanip.H"
// For 'nearInfo' helper class only
#include "mappedPatchBase.H"
#include "treeBoundBox.H"
#include "treeDataFace.H"
@ -152,7 +151,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
if (debug)
{
Info<< "patchProbes::findElements" << " : " << endl;
InfoInFunction << endl;
forAll(nearest, sampleI)
{
label procI = nearest[sampleI].second().second();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,7 +119,7 @@ Foam::scalar Foam::sampledSet::calcSign
if (magVec < VSMALL)
{
// sample on face centre. Regard as inside
// Sample on face centre. Regard as inside
return -1;
}
@ -133,7 +133,6 @@ Foam::scalar Foam::sampledSet::calcSign
}
// Return face (or -1) of face which is within smallDist of sample
Foam::label Foam::sampledSet::findNearFace
(
const label cellI,
@ -169,8 +168,6 @@ Foam::label Foam::sampledSet::findNearFace
}
// 'Pushes' point facePt (which is almost on face) in direction of cell centre
// so it is clearly inside.
Foam::point Foam::sampledSet::pushIn
(
const point& facePt,
@ -224,16 +221,10 @@ Foam::point Foam::sampledSet::pushIn
<< abort(FatalError);
}
//Info<< "pushIn : moved " << facePt << " to " << newPosition
// << endl;
return newPosition;
}
// Calculates start of tracking given samplePt and first boundary intersection
// (bPoint, bFaceI). bFaceI == -1 if no boundary intersection.
// Returns true if trackPt is sampling point
bool Foam::sampledSet::getTrackingPoint
(
const vector& offset,
@ -268,9 +259,6 @@ bool Foam::sampledSet::getTrackingPoint
{
// Line samplePt - end_ does not intersect domain at all.
// (or is along edge)
//Info<< "getTrackingPoint : samplePt outside domain : "
// << " samplePt:" << samplePt
// << endl;
trackCellI = -1;
trackFaceI = -1;
@ -279,11 +267,7 @@ bool Foam::sampledSet::getTrackingPoint
}
else
{
// start is inside. Use it as tracking point
//Info<< "getTrackingPoint : samplePt inside :"
// << " samplePt:" << samplePt
// << " trackCellI:" << trackCellI
// << endl;
// Start is inside. Use it as tracking point
trackPt = samplePt;
trackFaceI = -1;
@ -293,10 +277,6 @@ bool Foam::sampledSet::getTrackingPoint
}
else if (mag(samplePt - bPoint) < smallDist)
{
//Info<< "getTrackingPoint : samplePt:" << samplePt
// << " close to bPoint:"
// << bPoint << endl;
// samplePt close to bPoint. Snap to it
trackPt = pushIn(bPoint, bFaceI);
trackFaceI = bFaceI;
@ -330,7 +310,7 @@ bool Foam::sampledSet::getTrackingPoint
if (debug)
{
Info<< "sampledSet::getTrackingPoint :"
InfoInFunction
<< " offset:" << offset
<< " samplePt:" << samplePt
<< " bPoint:" << bPoint

View File

@ -119,10 +119,7 @@ void Foam::MeshedSurface<Face>::write
{
if (debug)
{
Info<< "MeshedSurface::write"
"(const fileName&, const MeshedSurface&) : "
"writing to " << name
<< endl;
InfoInFunction << "Writing to " << name << endl;
}
const word ext = name.ext();

View File

@ -28,16 +28,13 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Face>
Foam::autoPtr<Foam::MeshedSurface<Face>>
Foam::MeshedSurface<Face>::New(const fileName& name, const word& ext)
{
if (debug)
{
Info<< "MeshedSurface::New(const fileName&, const word&) : "
"constructing MeshedSurface"
<< endl;
InfoInFunction << "Constructing MeshedSurface" << endl;
}
typename fileExtensionConstructorTable::iterator cstrIter =
@ -82,4 +79,5 @@ Foam::MeshedSurface<Face>::New(const fileName& name)
return New(name, ext);
}
// ************************************************************************* //

View File

@ -33,9 +33,7 @@ Foam::UnsortedMeshedSurface<Face>::New(const fileName& name, const word& ext)
{
if (debug)
{
Info<< "UnsortedMeshedSurface::New(const fileName&, const word&) : "
"constructing UnsortedMeshedSurface"
<< endl;
InfoInFunction << "Constructing UnsortedMeshedSurface" << endl;
}
typename fileExtensionConstructorTable::iterator cstrIter =

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,9 +33,7 @@ void Foam::surfMesh::removeZones()
{
if (debug)
{
Info<< "void surfMesh::removeZones(): "
<< "Removing surface zones."
<< endl;
InfoInFunction << "Removing surface zones." << endl;
}
// Remove the surface zones
@ -51,9 +49,7 @@ void Foam::surfMesh::clearGeom()
{
if (debug)
{
Info<< "void surfMesh::clearGeom() : "
<< "clearing geometric data"
<< endl;
InfoInFunction << "Clearing geometric data" << endl;
}
MeshReference::clearGeom();
@ -64,9 +60,7 @@ void Foam::surfMesh::clearAddressing()
{
if (debug)
{
Info<< "void surfMesh::clearAddressing() : "
<< "clearing topology"
<< endl;
InfoInFunction << "clearing topology" << endl;
}
MeshReference::clearPatchMeshAddr();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,8 +32,7 @@ void Foam::surfMesh::setInstance(const fileName& inst)
{
if (debug)
{
Info<< "void surfMesh::setInstance(const fileName& inst) : "
<< "Resetting file instance to " << inst << endl;
InfoInFunction << "Resetting file instance to " << inst << endl;
}
instance() = inst;
@ -53,8 +52,7 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
{
if (debug)
{
Info<< "surfMesh::readUpdateState surfMesh::readUpdate() : "
<< "Updating mesh based on saved data." << endl;
InfoInFunction << "Updating mesh based on saved data." << endl;
}
// Find point and face instances

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,8 +122,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New(Istream& is)
{
if (debug)
{
Info<< "liquidProperties::New(Istream&): "
<< "constructing liquidProperties" << endl;
InfoInFunction << "Constructing liquidProperties" << endl;
}
const word liquidPropertiesType(is);
@ -170,8 +169,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New
{
if (debug)
{
Info<< "liquidProperties::New(const dictionary&):"
<< "constructing liquidProperties" << endl;
InfoInFunction << "Constructing liquidProperties" << endl;
}
const word& liquidPropertiesTypeName = dict.dictName();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,8 +32,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New(Istream& is)
{
if (debug)
{
Info<< "solidProperties::New(Istream&): constructing solid"
<< endl;
InfoInFunction << "Constructing solid" << endl;
}
const word solidType(is);
@ -79,8 +78,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
{
if (debug)
{
Info<< "solidProperties::New(const dictionary&): constructing solid"
<< endl;
InfoInFunction << "Constructing solid" << endl;
}
const word solidType(dict.dictName());
@ -115,4 +113,4 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,8 +23,6 @@ License
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "thermophysicalFunction.H"
#include "HashTable.H"
@ -47,8 +45,8 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
{
if (debug)
{
Info<< "thermophysicalFunction::New(Istream&) : "
<< "constructing thermophysicalFunction"
InfoInFunction
<< "Constructing thermophysicalFunction"
<< endl;
}
@ -79,8 +77,8 @@ Foam::autoPtr<Foam::thermophysicalFunction> Foam::thermophysicalFunction::New
{
if (debug)
{
Info<< "thermophysicalFunction::New(const dictionary&) : "
<< "constructing thermophysicalFunction"
InfoInFunction
<< "Constructing thermophysicalFunction"
<< endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
|| topoChanger_.size()
)
{
Info<< "void linearValveFvMesh::addZonesAndModifiers() : "
InfoInFunction
<< "Zones and modifiers already present. Skipping."
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers()
|| topoChanger_.size()
)
{
Info<< "void linearValveLayersFvMesh::addZonesAndModifiers() : "
InfoInFunction
<< "Zones and modifiers already present. Skipping."
<< endl;
@ -417,13 +417,12 @@ void Foam::linearValveLayersFvMesh::update()
setMorphTimeIndex(3*time().timeIndex() + 2);
updateMesh();
Info<< "Moving points post slider attach" << endl;
// const pointField p = allPoints();
// movePoints(p);
//Info<< "Moving points post slider attach" << endl;
//const pointField p = allPoints();
//movePoints(p);
Info<< "Sliding interfaces coupled: " << attached() << endl;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
|| topoChanger_.size()
)
{
Info<< "void mixerFvMesh::addZonesAndModifiers() : "
InfoInFunction
<< "Zones and modifiers already present. Skipping."
<< endl;
@ -196,7 +196,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const
{
if (debug)
{
Info<< "void mixerFvMesh::calcMovingMasks() const : "
InfoInFunction
<< "Calculating point and cell masks"
<< endl;
}
@ -356,7 +356,7 @@ bool Foam::mixerFvMesh::update()
{
if (debug)
{
Info<< "Mesh topology is changing" << endl;
InfoInFunction << "Mesh topology is changing" << endl;
}
deleteDemandDrivenData(movingPointsMaskPtr_);

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,7 +93,7 @@ void Foam::movingConeTopoFvMesh::addZonesAndModifiers()
|| topoChanger_.size()
)
{
Info<< "void movingConeTopoFvMesh::addZonesAndModifiers() : "
InfoInFunction
<< "Zones and modifiers already present. Skipping."
<< endl;
@ -337,48 +337,6 @@ bool Foam::movingConeTopoFvMesh::update()
if (topoChangeMap().hasMotionPoints())
{
Info<< "Topology change. Has premotion points" << endl;
//Info<< "preMotionPoints:" << topoChangeMap().preMotionPoints()
// << endl;
//mkDir(time().timePath());
//{
// OFstream str(time().timePath()/"meshPoints.obj");
// Pout<< "Writing mesh with meshPoints to " << str.name()
// << endl;
//
// const pointField& currentPoints = points();
// label vertI = 0;
// forAll(currentPoints, pointI)
// {
// meshTools::writeOBJ(str, currentPoints[pointI]);
// vertI++;
// }
// forAll(edges(), edgeI)
// {
// const edge& e = edges()[edgeI];
// str << "l " << e[0]+1 << ' ' << e[1]+1 << nl;
// }
//}
//{
// OFstream str(time().timePath()/"preMotionPoints.obj");
// Pout<< "Writing mesh with preMotionPoints to " << str.name()
// << endl;
//
// const pointField& newPoints =
// topoChangeMap().preMotionPoints();
// label vertI = 0;
// forAll(newPoints, pointI)
// {
// meshTools::writeOBJ(str, newPoints[pointI]);
// vertI++;
// }
// forAll(edges(), edgeI)
// {
// const edge& e = edges()[edgeI];
// str << "l " << e[0]+1 << ' ' << e[1]+1 << nl;
// }
//}
motionMask_ =
vertexMarkup