Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
henry
2009-08-18 17:18:09 +01:00
122 changed files with 813 additions and 1010 deletions

View File

@ -345,6 +345,9 @@ $(globalMeshData)/globalIndex.C
$(polyMesh)/syncTools/syncTools.C $(polyMesh)/syncTools/syncTools.C
zone = $(polyMesh)/zones/zone
$(zone)/zone.C
cellZone = $(polyMesh)/zones/cellZone cellZone = $(polyMesh)/zones/cellZone
$(cellZone)/cellZone.C $(cellZone)/cellZone.C
$(cellZone)/newCellZone.C $(cellZone)/newCellZone.C

View File

@ -114,6 +114,7 @@ public:
return index_ > -1; return index_ > -1;
} }
// Edit // Edit
//- Update //- Update

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh cells.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellZone.H" #include "cellZone.H"
@ -45,59 +42,9 @@ namespace Foam
addToRunTimeSelectionTable(cellZone, cellZone, dictionary); addToRunTimeSelectionTable(cellZone, cellZone, dictionary);
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
const Foam::Map<Foam::label>& Foam::cellZone::cellLookupMap() const
{
if (!cellLookupMapPtr_)
{
calcCellLookupMap();
}
return *cellLookupMapPtr_;
}
void Foam::cellZone::calcCellLookupMap() const
{
if (debug)
{
Info<< "void cellZone::calcCellLookupMap() const : "
<< "Calculating cell lookup map"
<< endl;
}
if (cellLookupMapPtr_)
{
FatalErrorIn
(
"void cellZone::calcCellLookupMap() const"
) << "cell lookup map already calculated"
<< abort(FatalError);
}
const labelList& addr = *this;
cellLookupMapPtr_ = new Map<label>(2*addr.size());
Map<label>& clm = *cellLookupMapPtr_;
forAll (addr, cellI)
{
clm.insert(addr[cellI], cellI);
}
if (debug)
{
Info<< "void cellZone::calcCellLookupMap() const : "
<< "Finished calculating cell lookup map"
<< endl;
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::cellZone::cellZone Foam::cellZone::cellZone
( (
const word& name, const word& name,
@ -106,11 +53,8 @@ Foam::cellZone::cellZone
const cellZoneMesh& zm const cellZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
cellLookupMapPtr_(NULL)
{} {}
@ -122,15 +66,11 @@ Foam::cellZone::cellZone
const cellZoneMesh& zm const cellZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
cellLookupMapPtr_(NULL)
{} {}
// Construct from dictionary
Foam::cellZone::cellZone Foam::cellZone::cellZone
( (
const word& name, const word& name,
@ -139,16 +79,11 @@ Foam::cellZone::cellZone
const cellZoneMesh& zm const cellZoneMesh& zm
) )
: :
labelList(dict.lookup("cellLabels")), zone("cell", name, dict, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
cellLookupMapPtr_(NULL)
{} {}
// Construct given the original zone and resetting the
// cell list and zone mesh information
Foam::cellZone::cellZone Foam::cellZone::cellZone
( (
const cellZone& cz, const cellZone& cz,
@ -157,11 +92,8 @@ Foam::cellZone::cellZone
const cellZoneMesh& zm const cellZoneMesh& zm
) )
: :
labelList(addr), zone(cz, addr, index),
name_(cz.name()), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
cellLookupMapPtr_(NULL)
{} {}
Foam::cellZone::cellZone Foam::cellZone::cellZone
@ -172,38 +104,22 @@ Foam::cellZone::cellZone
const cellZoneMesh& zm const cellZoneMesh& zm
) )
: :
labelList(addr), zone(cz, addr, index),
name_(cz.name()), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
cellLookupMapPtr_(NULL)
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::cellZone::~cellZone() Foam::cellZone::~cellZone()
{ {}
clearAddressing();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::cellZone::whichCell(const label globalCellID) const Foam::label Foam::cellZone::whichCell(const label globalCellID) const
{ {
const Map<label>& clm = cellLookupMap(); return zone::localID(globalCellID);
Map<label>::const_iterator clmIter = clm.find(globalCellID);
if (clmIter == clm.end())
{
return -1;
}
else
{
return clmIter();
}
} }
@ -213,45 +129,9 @@ const Foam::cellZoneMesh& Foam::cellZone::zoneMesh() const
} }
void Foam::cellZone::clearAddressing()
{
deleteDemandDrivenData(cellLookupMapPtr_);
}
bool Foam::cellZone::checkDefinition(const bool report) const bool Foam::cellZone::checkDefinition(const bool report) const
{ {
const labelList& addr = *this; return zone::checkDefinition(zoneMesh_.mesh().nCells(), report);
bool boundaryError = false;
forAll(addr, i)
{
if (addr[i] < 0 || addr[i] >= zoneMesh_.mesh().nCells())
{
boundaryError = true;
if (report)
{
SeriousErrorIn
(
"bool cellZone::checkDefinition("
"const bool report) const"
) << "Zone " << name()
<< " contains invalid cell label " << addr[i] << nl
<< "Valid cell labels are 0.."
<< zoneMesh_.mesh().nCells()-1 << endl;
}
}
}
return boundaryError;
}
void Foam::cellZone::write(Ostream& os) const
{
os << nl << name()
<< nl << static_cast<const labelList&>(*this);
} }
@ -284,10 +164,10 @@ void Foam::cellZone::operator=(const labelList& addr)
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const cellZone& p) Foam::Ostream& Foam::operator<<(Ostream& os, const cellZone& cz)
{ {
p.write(os); cz.write(os);
os.check("Ostream& operator<<(Ostream& f, const cellZone& p"); os.check("Ostream& operator<<(Ostream& os, const cellZone& cz");
return os; return os;
} }

View File

@ -42,12 +42,8 @@ SourceFiles
#ifndef cellZone_H #ifndef cellZone_H
#define cellZone_H #define cellZone_H
#include "labelList.H" #include "zone.H"
#include "typeInfo.H"
#include "dictionary.H"
#include "cellZoneMeshFwd.H" #include "cellZoneMeshFwd.H"
#include "pointFieldFwd.H"
#include "Map.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,36 +62,22 @@ Ostream& operator<<(Ostream&, const cellZone&);
class cellZone class cellZone
: :
public labelList public zone
{ {
// Private data
//- Name of zone protected:
word name_;
//- Index of zone // Protected data
label index_;
//- Reference to zone list //- Reference to zone list
const cellZoneMesh& zoneMesh_; const cellZoneMesh& zoneMesh_;
// Demand-driven private data
//- Map of cell labels in zone for fast location lookup
mutable Map<label>* cellLookupMapPtr_;
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
cellZone(const cellZone&); cellZone(const cellZone&);
//- Return map of local cell indices
const Map<label>& cellLookupMap() const;
//- Build map of local cell indices
void calcCellLookupMap() const;
public: public:
@ -208,45 +190,19 @@ public:
//- Destructor //- Destructor
virtual ~cellZone(); virtual ~cellZone();
// Member Functions // Member Functions
//- Return name //- Helper function to re-direct to zone::localID(...)
const word& name() const
{
return name_;
}
//- Map storing the local cell index for every global cell
// index. Used to find out the index of cell in the zone from
// the known global cell index. If the cell is not in the
// zone, returns -1
label whichCell(const label globalCellID) const; label whichCell(const label globalCellID) const;
//- Return the index of this zone in zone list
label index() const
{
return index_;
}
//- Return zoneMesh reference //- Return zoneMesh reference
const cellZoneMesh& zoneMesh() const; const cellZoneMesh& zoneMesh() const;
//- Clear addressing
void clearAddressing();
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
bool checkDefinition(const bool report = false) const; virtual bool checkDefinition(const bool report = false) const;
//- Correct patch after moving points
virtual void movePoints(const pointField&)
{}
//- Write
virtual void write(Ostream&) const;
//- Write dictionary //- Write dictionary
virtual void writeDict(Ostream&) const; virtual void writeDict(Ostream&) const;
@ -261,8 +217,9 @@ public:
void operator=(const labelList&); void operator=(const labelList&);
// Ostream Operator // I-O
//- Ostream Operator
friend Ostream& operator<<(Ostream&, const cellZone&); friend Ostream& operator<<(Ostream&, const cellZone&);
}; };

View File

@ -22,15 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellZone.H" #include "cellZone.H"
#include "dictionary.H" #include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::cellZone> Foam::cellZone::New Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
@ -61,7 +57,7 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
"const label, const cellZoneMesh&)", "const label, const cellZoneMesh&)",
dict dict
) << "Unknown cellZone type " << zoneType << endl << endl ) << "Unknown cellZone type " << zoneType << endl << endl
<< "Valid cellZone types are :" << endl << "Valid cellZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -70,6 +66,4 @@ Foam::autoPtr<Foam::cellZone> Foam::cellZone::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh faces.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "faceZone.H" #include "faceZone.H"
@ -100,54 +97,6 @@ void Foam::faceZone::calcFaceZonePatch() const
} }
const Foam::Map<Foam::label>& Foam::faceZone::faceLookupMap() const
{
if (!faceLookupMapPtr_)
{
calcFaceLookupMap();
}
return *faceLookupMapPtr_;
}
void Foam::faceZone::calcFaceLookupMap() const
{
if (debug)
{
Info<< "void faceZone::calcFaceLookupMap() const : "
<< "Calculating face lookup map"
<< endl;
}
if (faceLookupMapPtr_)
{
FatalErrorIn
(
"void faceZone::calcFaceLookupMap() const"
) << "face lookup map already calculated"
<< abort(FatalError);
}
const labelList& addr = *this;
faceLookupMapPtr_ = new Map<label>(2*addr.size());
Map<label>& flm = *faceLookupMapPtr_;
forAll (addr, faceI)
{
flm.insert(addr[faceI], faceI);
}
if (debug)
{
Info<< "void faceZone::calcFaceLookupMap() const : "
<< "Finished calculating face lookup map"
<< endl;
}
}
void Foam::faceZone::calcCellLayers() const void Foam::faceZone::calcCellLayers() const
{ {
if (debug) if (debug)
@ -228,16 +177,13 @@ Foam::faceZone::faceZone
const faceZoneMesh& zm const faceZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name),
flipMap_(fm), flipMap_(fm),
index_(index),
zoneMesh_(zm), zoneMesh_(zm),
patchPtr_(NULL), patchPtr_(NULL),
masterCellsPtr_(NULL), masterCellsPtr_(NULL),
slaveCellsPtr_(NULL), slaveCellsPtr_(NULL),
mePtr_(NULL), mePtr_(NULL)
faceLookupMapPtr_(NULL)
{ {
checkAddressing(); checkAddressing();
} }
@ -252,22 +198,18 @@ Foam::faceZone::faceZone
const faceZoneMesh& zm const faceZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name),
flipMap_(fm), flipMap_(fm),
index_(index),
zoneMesh_(zm), zoneMesh_(zm),
patchPtr_(NULL), patchPtr_(NULL),
masterCellsPtr_(NULL), masterCellsPtr_(NULL),
slaveCellsPtr_(NULL), slaveCellsPtr_(NULL),
mePtr_(NULL), mePtr_(NULL)
faceLookupMapPtr_(NULL)
{ {
checkAddressing(); checkAddressing();
} }
// Construct from dictionary
Foam::faceZone::faceZone Foam::faceZone::faceZone
( (
const word& name, const word& name,
@ -276,23 +218,18 @@ Foam::faceZone::faceZone
const faceZoneMesh& zm const faceZoneMesh& zm
) )
: :
labelList(dict.lookup("faceLabels")), zone("face", name, dict, index),
name_(name),
flipMap_(dict.lookup("flipMap")), flipMap_(dict.lookup("flipMap")),
index_(index),
zoneMesh_(zm), zoneMesh_(zm),
patchPtr_(NULL), patchPtr_(NULL),
masterCellsPtr_(NULL), masterCellsPtr_(NULL),
slaveCellsPtr_(NULL), slaveCellsPtr_(NULL),
mePtr_(NULL), mePtr_(NULL)
faceLookupMapPtr_(NULL)
{ {
checkAddressing(); checkAddressing();
} }
// Construct given the original zone and resetting the
// face list and zone mesh information
Foam::faceZone::faceZone Foam::faceZone::faceZone
( (
const faceZone& fz, const faceZone& fz,
@ -302,16 +239,13 @@ Foam::faceZone::faceZone
const faceZoneMesh& zm const faceZoneMesh& zm
) )
: :
labelList(addr), zone(fz, addr, index),
name_(fz.name()),
flipMap_(fm), flipMap_(fm),
index_(index),
zoneMesh_(zm), zoneMesh_(zm),
patchPtr_(NULL), patchPtr_(NULL),
masterCellsPtr_(NULL), masterCellsPtr_(NULL),
slaveCellsPtr_(NULL), slaveCellsPtr_(NULL),
mePtr_(NULL), mePtr_(NULL)
faceLookupMapPtr_(NULL)
{ {
checkAddressing(); checkAddressing();
} }
@ -326,16 +260,13 @@ Foam::faceZone::faceZone
const faceZoneMesh& zm const faceZoneMesh& zm
) )
: :
labelList(addr), zone(fz, addr, index),
name_(fz.name()),
flipMap_(fm), flipMap_(fm),
index_(index),
zoneMesh_(zm), zoneMesh_(zm),
patchPtr_(NULL), patchPtr_(NULL),
masterCellsPtr_(NULL), masterCellsPtr_(NULL),
slaveCellsPtr_(NULL), slaveCellsPtr_(NULL),
mePtr_(NULL), mePtr_(NULL)
faceLookupMapPtr_(NULL)
{ {
checkAddressing(); checkAddressing();
} }
@ -351,29 +282,18 @@ Foam::faceZone::~faceZone()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::faceZone::whichFace(const label globalFaceID) const
{
const Map<label>& flm = faceLookupMap();
Map<label>::const_iterator flmIter = flm.find(globalFaceID);
if (flmIter == flm.end())
{
return -1;
}
else
{
return flmIter();
}
}
const Foam::faceZoneMesh& Foam::faceZone::zoneMesh() const const Foam::faceZoneMesh& Foam::faceZone::zoneMesh() const
{ {
return zoneMesh_; return zoneMesh_;
} }
Foam::label Foam::faceZone::whichFace(const label globalFaceID) const
{
return zone::localID(globalFaceID);
}
const Foam::primitiveFacePatch& Foam::faceZone::operator()() const const Foam::primitiveFacePatch& Foam::faceZone::operator()() const
{ {
if (!patchPtr_) if (!patchPtr_)
@ -450,13 +370,14 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
void Foam::faceZone::clearAddressing() void Foam::faceZone::clearAddressing()
{ {
zone::clearAddressing();
deleteDemandDrivenData(patchPtr_); deleteDemandDrivenData(patchPtr_);
deleteDemandDrivenData(masterCellsPtr_); deleteDemandDrivenData(masterCellsPtr_);
deleteDemandDrivenData(slaveCellsPtr_); deleteDemandDrivenData(slaveCellsPtr_);
deleteDemandDrivenData(mePtr_); deleteDemandDrivenData(mePtr_);
deleteDemandDrivenData(faceLookupMapPtr_);
} }
@ -504,30 +425,7 @@ void Foam::faceZone::updateMesh(const mapPolyMesh& mpm)
bool Foam::faceZone::checkDefinition(const bool report) const bool Foam::faceZone::checkDefinition(const bool report) const
{ {
const labelList& addr = *this; return zone::checkDefinition(zoneMesh().mesh().faces().size(), report);
bool boundaryError = false;
forAll(addr, i)
{
if (addr[i] < 0 || addr[i] >= zoneMesh().mesh().faces().size())
{
boundaryError = true;
if (report)
{
SeriousErrorIn
(
"bool faceZone::checkDefinition("
"const bool report) const"
) << "Zone " << name()
<< " contains invalid face label " << addr[i] << nl
<< "Valid face labels are 0.."
<< zoneMesh().mesh().faces().size()-1 << endl;
}
}
}
return boundaryError;
} }
@ -642,10 +540,10 @@ void Foam::faceZone::writeDict(Ostream& os) const
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const faceZone& p) Foam::Ostream& Foam::operator<<(Ostream& os, const faceZone& fz)
{ {
p.write(os); fz.write(os);
os.check("Ostream& operator<<(Ostream& f, const faceZone& p"); os.check("Ostream& operator<<(Ostream& os, const faceZone& fz");
return os; return os;
} }

View File

@ -41,13 +41,10 @@ SourceFiles
#ifndef faceZone_H #ifndef faceZone_H
#define faceZone_H #define faceZone_H
#include "typeInfo.H" #include "zone.H"
#include "dictionary.H"
#include "labelList.H"
#include "faceZoneMeshFwd.H" #include "faceZoneMeshFwd.H"
#include "boolList.H" #include "boolList.H"
#include "primitiveFacePatch.H" #include "primitiveFacePatch.H"
#include "Map.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,20 +65,17 @@ Ostream& operator<<(Ostream&, const faceZone&);
class faceZone class faceZone
: :
public labelList public zone
{ {
// Private data
//- Name of zone protected:
word name_;
// Protected data
//- Flip map for all faces in the zone. Set to true if the //- Flip map for all faces in the zone. Set to true if the
// face needs to be flipped to achieve the correct orientation. // face needs to be flipped to achieve the correct orientation.
boolList flipMap_; boolList flipMap_;
//- Index of zone
label index_;
//- Reference to zone list //- Reference to zone list
const faceZoneMesh& zoneMesh_; const faceZoneMesh& zoneMesh_;
@ -100,9 +94,6 @@ class faceZone
//- Global edge addressing //- Global edge addressing
mutable labelList* mePtr_; mutable labelList* mePtr_;
//- Map of face labels in zone for fast location lookup
mutable Map<label>* faceLookupMapPtr_;
// Private Member Functions // Private Member Functions
@ -118,9 +109,6 @@ class faceZone
//- Return map of local face indices //- Return map of local face indices
const Map<label>& faceLookupMap() const; const Map<label>& faceLookupMap() const;
//- Build map of local face indices
void calcFaceLookupMap() const;
//- Calculate master and slave face layer //- Calculate master and slave face layer
void calcCellLayers() const; void calcCellLayers() const;
@ -244,38 +232,23 @@ public:
//- Destructor //- Destructor
virtual ~faceZone(); virtual ~faceZone();
// Member Functions // Member Functions
//- Return name
const word& name() const
{
return name_;
}
//- Return face flip map //- Return face flip map
const boolList& flipMap() const const boolList& flipMap() const
{ {
return flipMap_; return flipMap_;
} }
//- Map storing the local face index for every global face index. //- Helper function to re-direct to zone::localID(...)
// Used to find out the index of face in the zone from the known global label whichFace(const label globalCellID) const;
// face index. If the face is not in the zone, returns -1
label whichFace(const label globalFaceID) const;
//- Return reference to primitive patch //- Return reference to primitive patch
const primitiveFacePatch& operator()() const; const primitiveFacePatch& operator()() const;
//- Return the index of this zone in zone list
label index() const
{
return index_;
}
//- Return zoneMesh reference //- Return zoneMesh reference
const faceZoneMesh& zoneMesh() const; const faceZoneMesh& zoneMesh() const;
@ -294,23 +267,23 @@ public:
//- Clear addressing //- Clear addressing
void clearAddressing(); virtual void clearAddressing();
//- Reset addressing and flip map (clearing demand-driven data) //- Reset addressing and flip map (clearing demand-driven data)
void resetAddressing(const labelList&, const boolList&); virtual void resetAddressing(const labelList&, const boolList&);
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
bool checkDefinition(const bool report = false) const; virtual bool checkDefinition(const bool report = false) const;
//- Check whether all procs have faces synchronised. Return //- Check whether all procs have faces synchronised. Return
// true if in error. // true if in error.
bool checkParallelSync(const bool report = false) const; virtual bool checkParallelSync(const bool report = false) const;
//- Correct patch after moving points //- Correct patch after moving points
virtual void movePoints(const pointField&); virtual void movePoints(const pointField&);
//- Update for changes in topology //- Update for changes in topology
void updateMesh(const mapPolyMesh& mpm); virtual void updateMesh(const mapPolyMesh& mpm);
//- Write //- Write
virtual void write(Ostream&) const; virtual void write(Ostream&) const;
@ -319,8 +292,9 @@ public:
virtual void writeDict(Ostream&) const; virtual void writeDict(Ostream&) const;
// Ostream Operator // I-O
//- Ostream Operator
friend Ostream& operator<<(Ostream&, const faceZone&); friend Ostream& operator<<(Ostream&, const faceZone&);
}; };

View File

@ -22,15 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "faceZone.H" #include "faceZone.H"
#include "dictionary.H" #include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::faceZone> Foam::faceZone::New Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
@ -61,7 +57,7 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
"const label, const faceZoneMesh&)", "const label, const faceZoneMesh&)",
dict dict
) << "Unknown faceZone type " << zoneType << endl << endl ) << "Unknown faceZone type " << zoneType << endl << endl
<< "Valid faceZone types are :" << endl << "Valid faceZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -70,6 +66,4 @@ Foam::autoPtr<Foam::faceZone> Foam::faceZone::New
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,15 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointZone.H" #include "pointZone.H"
#include "dictionary.H" #include "dictionary.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::pointZone> Foam::pointZone::New Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
@ -61,7 +57,7 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
"const label, const pointZoneMesh&)", "const label, const pointZoneMesh&)",
dict dict
) << "Unknown pointZone type " << zoneType << endl << endl ) << "Unknown pointZone type " << zoneType << endl << endl
<< "Valid pointZone types are :" << endl << "Valid pointZone types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError); << exit(FatalIOError);
} }
@ -69,6 +65,5 @@ Foam::autoPtr<Foam::pointZone> Foam::pointZone::New
return autoPtr<pointZone>(cstrIter()(name, dict, index, zm)); return autoPtr<pointZone>(cstrIter()(name, dict, index, zm));
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
A subset of mesh points.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointZone.H" #include "pointZone.H"
@ -43,59 +40,9 @@ namespace Foam
addToRunTimeSelectionTable(pointZone, pointZone, dictionary); addToRunTimeSelectionTable(pointZone, pointZone, dictionary);
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
const Foam::Map<Foam::label>& Foam::pointZone::pointLookupMap() const
{
if (!pointLookupMapPtr_)
{
calcPointLookupMap();
}
return *pointLookupMapPtr_;
}
void Foam::pointZone::calcPointLookupMap() const
{
if (debug)
{
Info<< "void pointZone::calcPointLookupMap() const : "
<< "Calculating point lookup map"
<< endl;
}
if (pointLookupMapPtr_)
{
FatalErrorIn
(
"void pointZone::calcPointLookupMap() const"
) << "point lookup map already calculated"
<< abort(FatalError);
}
const labelList& addr = *this;
pointLookupMapPtr_ = new Map<label>(2*addr.size());
Map<label>& plm = *pointLookupMapPtr_;
forAll (addr, pointI)
{
plm.insert(addr[pointI], pointI);
}
if (debug)
{
Info<< "void pointZone::calcPointLookupMap() const : "
<< "Finished calculating point lookup map"
<< endl;
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::pointZone::pointZone Foam::pointZone::pointZone
( (
const word& name, const word& name,
@ -104,11 +51,8 @@ Foam::pointZone::pointZone
const pointZoneMesh& zm const pointZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
pointLookupMapPtr_(NULL)
{} {}
@ -120,15 +64,11 @@ Foam::pointZone::pointZone
const pointZoneMesh& zm const pointZoneMesh& zm
) )
: :
labelList(addr), zone(name, addr, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
pointLookupMapPtr_(NULL)
{} {}
// Construct from dictionary
Foam::pointZone::pointZone Foam::pointZone::pointZone
( (
const word& name, const word& name,
@ -137,16 +77,11 @@ Foam::pointZone::pointZone
const pointZoneMesh& zm const pointZoneMesh& zm
) )
: :
labelList(dict.lookup("pointLabels")), zone("point", name, dict, index),
name_(name), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
pointLookupMapPtr_(NULL)
{} {}
// Construct given the original zone and resetting the
// point list and zone mesh information
Foam::pointZone::pointZone Foam::pointZone::pointZone
( (
const pointZone& pz, const pointZone& pz,
@ -155,11 +90,8 @@ Foam::pointZone::pointZone
const pointZoneMesh& zm const pointZoneMesh& zm
) )
: :
labelList(addr), zone(pz, addr, index),
name_(pz.name()), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
pointLookupMapPtr_(NULL)
{} {}
@ -171,92 +103,40 @@ Foam::pointZone::pointZone
const pointZoneMesh& zm const pointZoneMesh& zm
) )
: :
labelList(addr), zone(pz, addr, index),
name_(pz.name()), zoneMesh_(zm)
index_(index),
zoneMesh_(zm),
pointLookupMapPtr_(NULL)
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::pointZone::~pointZone() Foam::pointZone::~pointZone()
{ {}
clearAddressing();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::pointZone::whichPoint(const label globalPointID) const
{
const Map<label>& plm = pointLookupMap();
Map<label>::const_iterator plmIter = plm.find(globalPointID);
if (plmIter == plm.end())
{
return -1;
}
else
{
return plmIter();
}
}
const Foam::pointZoneMesh& Foam::pointZone::zoneMesh() const const Foam::pointZoneMesh& Foam::pointZone::zoneMesh() const
{ {
return zoneMesh_; return zoneMesh_;
} }
void Foam::pointZone::clearAddressing() Foam::label Foam::pointZone::whichPoint(const label globalPointID) const
{ {
deleteDemandDrivenData(pointLookupMapPtr_); return zone::localID(globalPointID);
} }
bool Foam::pointZone::checkDefinition(const bool report) const bool Foam::pointZone::checkDefinition(const bool report) const
{ {
const labelList& addr = *this; return zone::checkDefinition(zoneMesh_.mesh().points().size(), report);
bool boundaryError = false;
forAll(addr, i)
{
if (addr[i] < 0 || addr[i] >= zoneMesh_.mesh().points().size())
{
boundaryError = true;
if (report)
{
SeriousErrorIn
(
"bool pointZone::checkDefinition("
"const bool report) const"
) << "Zone " << name()
<< " contains invalid point label " << addr[i] << nl
<< "Valid point labels are 0.."
<< zoneMesh_.mesh().points().size()-1 << endl;
}
}
}
return boundaryError;
}
void Foam::pointZone::write(Ostream& os) const
{
os << nl << name()
<< nl << static_cast<const labelList&>(*this);
} }
void Foam::pointZone::writeDict(Ostream& os) const void Foam::pointZone::writeDict(Ostream& os) const
{ {
os << nl << name() << nl << token::BEGIN_BLOCK << nl os << nl << name_ << nl << token::BEGIN_BLOCK << nl
<< " type " << type() << token::END_STATEMENT << nl; << " type " << type() << token::END_STATEMENT << nl;
writeEntry("pointLabels", os); writeEntry("pointLabels", os);
@ -267,10 +147,10 @@ void Foam::pointZone::writeDict(Ostream& os) const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void Foam::pointZone::operator=(const pointZone& cz) void Foam::pointZone::operator=(const pointZone& pz)
{ {
clearAddressing(); clearAddressing();
labelList::operator=(cz); labelList::operator=(pz);
} }
@ -283,10 +163,10 @@ void Foam::pointZone::operator=(const labelList& addr)
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const pointZone& p) Foam::Ostream& Foam::operator<<(Ostream& os, const pointZone& pz)
{ {
p.write(os); pz.write(os);
os.check("Ostream& operator<<(Ostream& f, const pointZone& p"); os.check("Ostream& operator<<(Ostream& os, const pointZone& pz");
return os; return os;
} }

View File

@ -43,12 +43,8 @@ SourceFiles
#ifndef pointZone_H #ifndef pointZone_H
#define pointZone_H #define pointZone_H
#include "labelList.H" #include "zone.H"
#include "typeInfo.H"
#include "dictionary.H"
#include "pointZoneMeshFwd.H" #include "pointZoneMeshFwd.H"
#include "Map.H"
#include "pointField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,37 +63,22 @@ Ostream& operator<<(Ostream&, const pointZone&);
class pointZone class pointZone
: :
public labelList public zone
{ {
protected:
// Private data // Private data
//- Name of zone
word name_;
//- Index of zone
label index_;
//- Reference to zone list //- Reference to zone list
const pointZoneMesh& zoneMesh_; const pointZoneMesh& zoneMesh_;
// Demand-driven private data
//- Map of point labels in zone for fast location lookup
mutable Map<label>* pointLookupMapPtr_;
// Private Member Functions // Private Member Functions
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
pointZone(const pointZone&); pointZone(const pointZone&);
//- Return map of local point indices
const Map<label>& pointLookupMap() const;
//- Build map of local point indices
void calcPointLookupMap() const;
public: public:
@ -210,46 +191,24 @@ public:
//- Destructor //- Destructor
virtual ~pointZone(); virtual ~pointZone();
// Member Functions // Member Functions
//- Return name
const word& name() const
{
return name_;
}
//- Map storing the local point index for every global point
// index. Used to find out the index of point in the zone from
// the known global point index. If the point is not in the
// zone, returns -1
label whichPoint(const label globalPointID) const;
//- Return the index of this zone in zone list
label index() const
{
return index_;
}
//- Return zoneMesh reference //- Return zoneMesh reference
const pointZoneMesh& zoneMesh() const; const pointZoneMesh& zoneMesh() const;
//- Clear addressing //- Helper function to re-direct to zone::localID(...)
void clearAddressing(); label whichPoint(const label globalPointID) const;
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
bool checkDefinition(const bool report = false) const; virtual bool checkDefinition(const bool report = false) const;
//- Correct patch after moving points //- Correct patch after moving points
virtual void movePoints(const pointField&) virtual void movePoints(const pointField&)
{} {}
//- Write
virtual void write(Ostream&) const;
//- Write dictionary //- Write dictionary
virtual void writeDict(Ostream&) const; virtual void writeDict(Ostream&) const;
@ -263,8 +222,9 @@ public:
void operator=(const labelList&); void operator=(const labelList&);
// Ostream Operator // I-O
//- Ostream Operator
friend Ostream& operator<<(Ostream&, const pointZone&); friend Ostream& operator<<(Ostream&, const pointZone&);
}; };

View File

@ -0,0 +1,239 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "zone.H"
#include "IOstream.H"
#include "demandDrivenData.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(zone, 0);
}
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
const Foam::Map<Foam::label>& Foam::zone::lookupMap() const
{
if (!lookupMapPtr_)
{
calcLookupMap();
}
return *lookupMapPtr_;
}
void Foam::zone::calcLookupMap() const
{
if (debug)
{
Info<< "void zone::calcLookupMap() const: "
<< "Calculating lookup map"
<< endl;
}
if (lookupMapPtr_)
{
FatalErrorIn("void zone::calcLookupMap() const")
<< "Lookup map already calculated" << nl
<< abort(FatalError);
}
const labelList& addr = *this;
lookupMapPtr_ = new Map<label>(2*addr.size());
Map<label>& lm = *lookupMapPtr_;
forAll(addr, i)
{
lm.insert(addr[i], i);
}
if (debug)
{
Info<< "void zone::calcLookupMap() const: "
<< "Finished calculating lookup map"
<< endl;
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::zone::zone
(
const word& name,
const labelList& addr,
const label index
)
:
labelList(addr),
name_(name),
index_(index),
lookupMapPtr_(NULL)
{}
Foam::zone::zone
(
const word& name,
const Xfer<labelList>& addr,
const label index
)
:
labelList(addr),
name_(name),
index_(index),
lookupMapPtr_(NULL)
{}
Foam::zone::zone
(
const word& zoneType,
const word& name,
const dictionary& dict,
const label index
)
:
labelList(dict.lookup(zoneType + "Labels")),
name_(name),
index_(index),
lookupMapPtr_(NULL)
{}
Foam::zone::zone
(
const zone& z,
const labelList& addr,
const label index
)
:
labelList(addr),
name_(z.name()),
index_(index),
lookupMapPtr_(NULL)
{}
Foam::zone::zone
(
const zone& z,
const Xfer<labelList>& addr,
const label index
)
:
labelList(addr),
name_(z.name()),
index_(index),
lookupMapPtr_(NULL)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::zone::~zone()
{
clearAddressing();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::label Foam::zone::localID(const label globalCellID) const
{
const Map<label>& lm = lookupMap();
Map<label>::const_iterator lmIter = lm.find(globalCellID);
if (lmIter == lm.end())
{
return -1;
}
else
{
return lmIter();
}
}
void Foam::zone::clearAddressing()
{
deleteDemandDrivenData(lookupMapPtr_);
}
bool Foam::zone::checkDefinition(const label maxSize, const bool report) const
{
const labelList& addr = *this;
bool boundaryError = false;
forAll(addr, i)
{
if (addr[i] < 0 || addr[i] >= maxSize)
{
boundaryError = true;
if (report)
{
SeriousErrorIn
(
"bool zone::checkDefinition("
"const label maxSize, const bool report) const"
) << "Zone " << name_
<< " contains invalid index label " << addr[i] << nl
<< "Valid index labels are 0.."
<< maxSize-1 << endl;
}
}
}
return boundaryError;
}
void Foam::zone::write(Ostream& os) const
{
os << nl << name_
<< nl << static_cast<const labelList&>(*this);
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<<(Ostream& os, const zone& z)
{
z.write(os);
os.check("Ostream& operator<<(Ostream& f, const zone& z");
return os;
}
// ************************************************************************* //

View File

@ -0,0 +1,207 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cellZone
Description
Base class for zones
SourceFiles
zone.C
\*---------------------------------------------------------------------------*/
#ifndef zone_H
#define zone_H
#include "labelList.H"
#include "typeInfo.H"
#include "dictionary.H"
#include "Map.H"
#include "pointFieldFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of friend functions and operators
class zone;
Ostream& operator<<(Ostream&, const zone&);
/*---------------------------------------------------------------------------*\
Class zone Declaration
\*---------------------------------------------------------------------------*/
class zone
:
public labelList
{
protected:
// Protected data
//- Name of zone
word name_;
//- Index of zone
label index_;
// Demand-driven private data
//- Map of labels in zone for fast location lookup
mutable Map<label>* lookupMapPtr_;
// Protected Member Functions
//- Return a reference to the look-up map
const Map<label>& lookupMap() const;
//- Construct the look-up map
void calcLookupMap() const;
//- Disallow default bitwise copy construct
zone(const zone&);
public:
//- Runtime type information
TypeName("zone");
// Constructors
//- Construct from components
zone
(
const word& name,
const labelList& addr,
const label index
);
//- Construct from components, transferring contents
zone
(
const word& name,
const Xfer<labelList>& addr,
const label index
);
//- Construct from dictionary
zone
(
const word& zoneType,
const word& name,
const dictionary&,
const label index
);
//- Construct given the original zone and resetting the
// cell list and zone mesh information
zone
(
const zone&,
const labelList& addr,
const label index
);
//- Construct given the original zone, resetting the
// cell list and zone mesh information
zone
(
const zone&,
const Xfer<labelList>& addr,
const label index
);
//- Destructor
virtual ~zone();
// Member Functions
//- Return name
const word& name() const
{
return name_;
}
//- Map storing the local index for every global index. Used to find
// the index of the item in the zone from the known global index. If
// the item is not in the zone, returns -1
label localID(const label globalID) const;
//- Return the index of this zone in zone list
label index() const
{
return index_;
}
//- Clear addressing
virtual void clearAddressing();
//- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const = 0;
//- Check zone definition with max size given. Return true if in error.
virtual bool checkDefinition
(
const label maxSize,
const bool report = false
) const;
//- Correct patch after moving points
virtual void movePoints(const pointField&)
{}
//- Write
virtual void write(Ostream&) const;
//- Write dictionary
virtual void writeDict(Ostream&) const = 0;
// I-O
//- Ostream Operator
friend Ostream& operator<<(Ostream&, const zone&);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DispersionModel.H" #include "DispersionModel.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cloudAbsorptionEmission.H" #include "cloudAbsorptionEmission.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cloudScatter.H" #include "cloudScatter.H"

View File

@ -244,6 +244,7 @@ class PointEdgeWave
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const PointEdgeWave&); void operator=(const PointEdgeWave&);
public: public:
// Static Functions // Static Functions
@ -261,7 +262,6 @@ public:
} }
// Constructors // Constructors
//- Construct from mesh, list of changed points with the Type //- Construct from mesh, list of changed points with the Type

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "PointEdgeWave.H" #include "PointEdgeWave.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointEdgePoint.H" #include "pointEdgePoint.H"
@ -32,8 +30,6 @@ Description
Foam::point Foam::pointEdgePoint::greatPoint(GREAT, GREAT, GREAT); Foam::point Foam::pointEdgePoint::greatPoint(GREAT, GREAT, GREAT);
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
Foam::Ostream& Foam::operator<< Foam::Ostream& Foam::operator<<
@ -45,9 +41,11 @@ Foam::Ostream& Foam::operator<<
return os << wDist.origin() << wDist.distSqr(); return os << wDist.origin() << wDist.distSqr();
} }
Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::pointEdgePoint& wDist) Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::pointEdgePoint& wDist)
{ {
return is >> wDist.origin_ >> wDist.distSqr_; return is >> wDist.origin_ >> wDist.distSqr_;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -45,7 +45,6 @@ SourceFiles
#include "tensor.H" #include "tensor.H"
#include "pTraits.H" #include "pTraits.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -69,6 +68,7 @@ class pointEdgePoint
//- normal distance (squared) from point to origin //- normal distance (squared) from point to origin
scalar distSqr_; scalar distSqr_;
// Private Member Functions // Private Member Functions
//- Evaluate distance to point. Update distSqr, origin from whomever //- Evaluate distance to point. Update distSqr, origin from whomever
@ -89,6 +89,7 @@ class pointEdgePoint
const scalar tol const scalar tol
); );
public: public:
// Static data members // Static data members
@ -96,6 +97,7 @@ public:
//- initial point far away. //- initial point far away.
static point greatPoint; static point greatPoint;
// Constructors // Constructors
//- Construct null //- Construct null

View File

@ -111,6 +111,7 @@ inline bool Foam::pointEdgePoint::update
} }
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Null constructor // Null constructor

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellClassification.H" #include "cellClassification.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellInfo.H" #include "cellInfo.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellDistFuncs.H" #include "cellDistFuncs.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "wallPoint.H" #include "wallPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "wallPointData.H" #include "wallPointData.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellFeatures.H" #include "cellFeatures.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Class calculates cell quality measures.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -111,10 +111,7 @@ Foam::coordinateSystem::coordinateSystem
} }
Foam::coordinateSystem::coordinateSystem Foam::coordinateSystem::coordinateSystem(const dictionary& dict)
(
const dictionary& dict
)
: :
name_(type()), name_(type()),
note_(), note_(),
@ -332,6 +329,7 @@ void Foam::coordinateSystem::writeDict(Ostream& os, bool subDict) const
} }
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
void Foam::coordinateSystem::operator=(const dictionary& rhs) void Foam::coordinateSystem::operator=(const dictionary& rhs)

View File

@ -166,6 +166,7 @@ class coordinateSystem
//- Global-to-Local transformation tensor //- Global-to-Local transformation tensor
tensor Rtr_; tensor Rtr_;
protected: protected:
// Protected Member Functions // Protected Member Functions
@ -194,6 +195,7 @@ protected:
bool translate bool translate
) const; ) const;
public: public:
//- Runtime type information //- Runtime type information
@ -249,6 +251,7 @@ public:
return autoPtr<coordinateSystem>(new coordinateSystem(*this)); return autoPtr<coordinateSystem>(new coordinateSystem(*this));
} }
// Declare run-time constructor selection table // Declare run-time constructor selection table
declareRunTimeSelectionTable declareRunTimeSelectionTable
@ -276,6 +279,7 @@ public:
(name, origin, cr) (name, origin, cr)
); );
// Selectors // Selectors
//- Select constructed from dictionary //- Select constructed from dictionary
@ -297,8 +301,8 @@ public:
//- Select constructed from Istream //- Select constructed from Istream
static autoPtr<coordinateSystem> New(Istream& is); static autoPtr<coordinateSystem> New(Istream& is);
// Destructor
//- Destructor
virtual ~coordinateSystem(); virtual ~coordinateSystem();
@ -394,6 +398,7 @@ public:
return origin_; return origin_;
} }
// Write // Write
//- Write //- Write
@ -402,51 +407,60 @@ public:
//- Write dictionary //- Write dictionary
virtual void writeDict(Ostream&, bool subDict=true) const; virtual void writeDict(Ostream&, bool subDict=true) const;
// Transformations // Transformations
//- Convert from position in local coordinate system to global Cartesian position //- Convert from position in local coordinate system to global
// Cartesian position
point globalPosition(const point& local) const point globalPosition(const point& local) const
{ {
return localToGlobal(local, true); return localToGlobal(local, true);
} }
//- Convert from position in local coordinate system to global Cartesian position //- Convert from position in local coordinate system to global
// Cartesian position
tmp<pointField> globalPosition(const pointField& local) const tmp<pointField> globalPosition(const pointField& local) const
{ {
return localToGlobal(local, true); return localToGlobal(local, true);
} }
//- Convert from vector components in local coordinate system to global Cartesian vector //- Convert from vector components in local coordinate system to
// global Cartesian vector
vector globalVector(const vector& local) const vector globalVector(const vector& local) const
{ {
return localToGlobal(local, false); return localToGlobal(local, false);
} }
//- Convert from vector components in local coordinate system to global Cartesian vector //- Convert from vector components in local coordinate system to
// global Cartesian vector
tmp<vectorField> globalVector(const vectorField& local) const tmp<vectorField> globalVector(const vectorField& local) const
{ {
return localToGlobal(local, false); return localToGlobal(local, false);
} }
//- Convert from global Cartesian position to position in local coordinate system //- Convert from global Cartesian position to position in local
// coordinate system
point localPosition(const point& global) const point localPosition(const point& global) const
{ {
return globalToLocal(global, true); return globalToLocal(global, true);
} }
//- Convert from global Cartesian position to position in local coordinate system //- Convert from global Cartesian position to position in local
// coordinate system
tmp<pointField> localPosition(const pointField& global) const tmp<pointField> localPosition(const pointField& global) const
{ {
return globalToLocal(global, true); return globalToLocal(global, true);
} }
//- Convert from global Cartesian vector to components in local coordinate system //- Convert from global Cartesian vector to components in local
// coordinate system
vector localVector(const vector& global) const vector localVector(const vector& global) const
{ {
return globalToLocal(global, false); return globalToLocal(global, false);
} }
//- Convert from global Cartesian vector to components in local coordinate system //- Convert from global Cartesian vector to components in local
// coordinate system
tmp<vectorField> localVector(const vectorField& global) const tmp<vectorField> localVector(const vectorField& global) const
{ {
return globalToLocal(global, false); return globalToLocal(global, false);
@ -467,6 +481,7 @@ public:
const coordinateSystem& const coordinateSystem&
); );
// IOstream Operators // IOstream Operators
friend Ostream& operator<<(Ostream&, const coordinateSystem&); friend Ostream& operator<<(Ostream&, const coordinateSystem&);

View File

@ -121,4 +121,5 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
return New(name, dict); return New(name, dict);
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -64,6 +64,7 @@ class coordinateSystems
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const coordinateSystems&); void operator=(const coordinateSystems&);
public: public:
//- Runtime type information //- Runtime type information
@ -88,11 +89,13 @@ public:
const Xfer<PtrList<coordinateSystem> >& const Xfer<PtrList<coordinateSystem> >&
); );
// Selectors // Selectors
//- Return previously registered or read construct from "constant" //- Return previously registered or read construct from "constant"
static const coordinateSystems& New(const objectRegistry&); static const coordinateSystems& New(const objectRegistry&);
// Member Functions // Member Functions
//- Find and return index for a given keyword, returns -1 if not found //- Find and return index for a given keyword, returns -1 if not found

View File

@ -86,6 +86,7 @@ protected:
bool translate bool translate
) const; ) const;
public: public:
//- Runtime type information //- Runtime type information
@ -142,7 +143,6 @@ public:
//- Non-const access to inDegrees //- Non-const access to inDegrees
bool& inDegrees(); bool& inDegrees();
}; };

View File

@ -159,6 +159,7 @@ Foam::vector Foam::parabolicCylindricalCS::globalToLocal
return vector::zero; return vector::zero;
} }
Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::globalToLocal Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::globalToLocal
( (
const vectorField& global, const vectorField& global,

View File

@ -85,6 +85,7 @@ protected:
bool translate bool translate
) const; ) const;
public: public:
//- Runtime type information //- Runtime type information
@ -106,7 +107,6 @@ public:
//- Construct from dictionary //- Construct from dictionary
parabolicCylindricalCS(const word&, const dictionary&); parabolicCylindricalCS(const word&, const dictionary&);
}; };

View File

@ -85,6 +85,7 @@ protected:
bool translate bool translate
) const; ) const;
public: public:
//- Runtime type information //- Runtime type information
@ -141,7 +142,6 @@ public:
//- Non-const access to inDegrees //- Non-const access to inDegrees
bool& inDegrees(); bool& inDegrees();
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -171,4 +171,5 @@ void Foam::toroidalCS::writeDict(Ostream& os, bool subDict) const
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -46,7 +46,6 @@ SourceFiles
namespace Foam namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class toroidalCS Declaration Class toroidalCS Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -86,6 +85,7 @@ class toroidalCS
bool translate bool translate
) const; ) const;
public: public:
//- Runtime type information //- Runtime type information
@ -103,7 +103,6 @@ public:
const scalar radius const scalar radius
); );
//- Construct from dictionary //- Construct from dictionary
toroidalCS(const word& name, const dictionary&); toroidalCS(const word& name, const dictionary&);

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "indexedOctree.H" #include "indexedOctree.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "treeDataPoint.H" #include "treeDataPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "octree.H" #include "octree.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "octreeDataCell.H" #include "octreeDataCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
//#include "octreeDataPointTreeLeaf.H" //#include "octreeDataPointTreeLeaf.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "octree.H" #include "octree.H"

View File

@ -22,9 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
IOList of pointIndexHits
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointIndexHitIOList.H" #include "pointIndexHitIOList.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "treeLeaf.H" #include "treeLeaf.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "treeLeaf.H" #include "treeLeaf.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "treeNode.H" #include "treeNode.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "treeNode.H" #include "treeNode.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boxToCell.H" #include "boxToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellToCell.H" #include "cellToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "faceToCell.H" #include "faceToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fieldToCell.H" #include "fieldToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "nearestToCell.H" #include "nearestToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointToCell.H" #include "pointToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "rotatedBoxToCell.H" #include "rotatedBoxToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "shapeToCell.H" #include "shapeToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceToCell.H" #include "surfaceToCell.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boundaryToFace.H" #include "boundaryToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boxToFace.H" #include "boxToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "faceToFace.H" #include "faceToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "labelToFace.H" #include "labelToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "normalToFace.H" #include "normalToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "patchToFace.H" #include "patchToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointToFace.H" #include "pointToFace.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boxToPoint.H" #include "boxToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellToPoint.H" #include "cellToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "faceToPoint.H" #include "faceToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "labelToPoint.H" #include "labelToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "pointToPoint.H" #include "pointToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceToPoint.H" #include "surfaceToPoint.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "topoSetSource.H" #include "topoSetSource.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceSets.H" #include "surfaceSets.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "booleanSurface.H" #include "booleanSurface.H"
@ -1098,7 +1096,4 @@ Foam::booleanSurface::booleanSurface
} }
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -82,6 +82,7 @@ class booleanSurface
INSIDE INSIDE
}; };
// Private data // Private data
//- From new to old face + surface: //- From new to old face + surface:
@ -90,6 +91,7 @@ class booleanSurface
// face2 (e.g. face2I = -faceMap[]-1) // face2 (e.g. face2I = -faceMap[]-1)
labelList faceMap_; labelList faceMap_;
// Private Member Functions // Private Member Functions
//- Check whether subset of faces (from markZones) reaches up to //- Check whether subset of faces (from markZones) reaches up to
@ -151,6 +153,7 @@ class booleanSurface
labelList& side labelList& side
); );
public: public:
ClassName("booleanSurface"); ClassName("booleanSurface");
@ -233,8 +236,6 @@ public:
} }
return -faceMap_[faceI]-1; return -faceMap_[faceI]-1;
} }
}; };

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "edgeSurface.H" #include "edgeSurface.H"

View File

@ -117,7 +117,6 @@ private:
void calcPointEdges(); void calcPointEdges();
public: public:
ClassName("edgeSurface"); ClassName("edgeSurface");

View File

@ -205,7 +205,6 @@ void Foam::intersectedSurface::printVisit
} }
// Check if the two vertices that f0 and f1 share are in the same order on // Check if the two vertices that f0 and f1 share are in the same order on
// both faces. // both faces.
bool Foam::intersectedSurface::sameEdgeOrder bool Foam::intersectedSurface::sameEdgeOrder

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "edgeIntersections.H" #include "edgeIntersections.H"
@ -721,13 +719,4 @@ Foam::label Foam::edgeIntersections::removeDegenerates
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// ************************************************************************* // // ************************************************************************* //

View File

@ -131,6 +131,7 @@ class edgeIntersections
boolList& affectedEdges boolList& affectedEdges
) const; ) const;
public: public:
ClassName("edgeIntersections"); ClassName("edgeIntersections");

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceIntersection.H" #include "surfaceIntersection.H"
@ -201,7 +199,6 @@ bool Foam::surfaceIntersection::excludeEdgeHit
//} //}
void Foam::surfaceIntersection::storeIntersection void Foam::surfaceIntersection::storeIntersection
( (
const bool isFirstSurf, const bool isFirstSurf,

View File

@ -233,6 +233,7 @@ class surfaceIntersection
List<DynamicList<label> >& surfEdgeCuts List<DynamicList<label> >& surfEdgeCuts
); );
public: public:
ClassName("surfaceIntersection"); ClassName("surfaceIntersection");
@ -284,7 +285,6 @@ public:
const labelListList& surf1EdgeCuts() const; const labelListList& surf1EdgeCuts() const;
const labelListList& surf2EdgeCuts() const; const labelListList& surf2EdgeCuts() const;
}; };

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceIntersection.H" #include "surfaceIntersection.H"
@ -37,9 +35,6 @@ Description
#include "octree.H" #include "octree.H"
#include "meshTools.H" #include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::surfaceIntersection::writeOBJ(const point& pt, Ostream& os) void Foam::surfaceIntersection::writeOBJ(const point& pt, Ostream& os)

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceIntersection.H" #include "surfaceIntersection.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "octreeDataTriSurface.H" #include "octreeDataTriSurface.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "octreeDataTriSurfaceTreeLeaf.H" #include "octreeDataTriSurfaceTreeLeaf.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "orientedSurface.H" #include "orientedSurface.H"

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "surfaceFeatures.H" #include "surfaceFeatures.H"

View File

@ -27,15 +27,6 @@ License
#include "surfaceLocation.H" #include "surfaceLocation.H"
#include "triSurface.H" #include "triSurface.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::vector Foam::surfaceLocation::normal(const triSurface& s) const Foam::vector Foam::surfaceLocation::normal(const triSurface& s) const
@ -72,12 +63,6 @@ Foam::vector Foam::surfaceLocation::normal(const triSurface& s) const
} }
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
void Foam::surfaceLocation::write(Ostream& os, const triSurface& s) const void Foam::surfaceLocation::write(Ostream& os, const triSurface& s) const

View File

@ -22,8 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "triSurfaceTools.H" #include "triSurfaceTools.H"

View File

@ -22,11 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation, along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Class applies a two-dimensional correction to mesh motion point field.
The correction guarantees that the mesh does not get twisted during motion
and thus introduce a third dimension into a 2-D problem.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "twoDPointCorrector.H" #include "twoDPointCorrector.H"

View File

@ -120,6 +120,7 @@ protected:
//- Prime-squared average //- Prime-squared average
static const word EXT_PRIME2MEAN; static const word EXT_PRIME2MEAN;
// Private data // Private data
//- Name of this set of field averages. //- Name of this set of field averages.
@ -144,6 +145,7 @@ protected:
// calculated and output // calculated and output
List<fieldAverageItem> faItems_; List<fieldAverageItem> faItems_;
// Lists of averages // Lists of averages
// Arithmetic mean fields // Arithmetic mean fields
@ -220,7 +222,7 @@ protected:
) const; ) const;
// IO // I-O
//- Write averages //- Write averages
virtual void writeAverages() const; virtual void writeAverages() const;
@ -272,7 +274,6 @@ public:
//- Destructor //- Destructor
virtual ~fieldAverage(); virtual ~fieldAverage();

View File

@ -116,8 +116,7 @@ public:
fieldAverageItem(const fieldAverageItem&); fieldAverageItem(const fieldAverageItem&);
// Destructor //- Destructor
~fieldAverageItem(); ~fieldAverageItem();
@ -166,6 +165,7 @@ public:
void operator=(const fieldAverageItem&); void operator=(const fieldAverageItem&);
// Friend Operators // Friend Operators
friend bool operator== friend bool operator==
@ -190,6 +190,7 @@ public:
return !(a == b); return !(a == b);
} }
// IOstream Operators // IOstream Operators
friend Istream& operator>>(Istream&, fieldAverageItem&); friend Istream& operator>>(Istream&, fieldAverageItem&);

View File

@ -140,8 +140,7 @@ public:
); );
// Destructor //- Destructor
virtual ~fieldMinMax(); virtual ~fieldMinMax();

View File

@ -116,8 +116,7 @@ public:
); );
// Destructor //- Destructor
virtual ~forceCoeffs(); virtual ~forceCoeffs();

View File

@ -196,8 +196,7 @@ public:
); );
// Destructor //- Destructor
virtual ~forces(); virtual ~forces();

View File

@ -101,8 +101,7 @@ public:
); );
// Destructor //- Destructor
virtual ~systemCall(); virtual ~systemCall();

View File

@ -98,8 +98,7 @@ public:
); );
// Destructor //- Destructor
virtual ~dsmcFields(); virtual ~dsmcFields();

View File

@ -106,8 +106,7 @@ public:
); );
// Destructor //- Destructor
virtual ~staticPressure(); virtual ~staticPressure();

View File

@ -57,7 +57,7 @@ Foam::faceZonesIntegration::faceZonesIntegration
log_(false), log_(false),
faceZonesSet_(), faceZonesSet_(),
fItems_(), fItems_(),
faceZonesIntegrationFilePtr_(NULL) filePtr_(NULL)
{ {
// Check if the available mesh is an fvMesh otherise deactivate // Check if the available mesh is an fvMesh otherise deactivate
if (!isA<fvMesh>(obr_)) if (!isA<fvMesh>(obr_))
@ -104,7 +104,7 @@ void Foam::faceZonesIntegration::read(const dictionary& dict)
void Foam::faceZonesIntegration::makeFile() void Foam::faceZonesIntegration::makeFile()
{ {
// Create the face Zone file if not already created // Create the face Zone file if not already created
if (faceZonesIntegrationFilePtr_.empty()) if (filePtr_.empty())
{ {
if (debug) if (debug)
{ {
@ -132,7 +132,7 @@ void Foam::faceZonesIntegration::makeFile()
mkDir(faceZonesIntegrationDir); mkDir(faceZonesIntegrationDir);
// Open new file at start up // Open new file at start up
faceZonesIntegrationFilePtr_.resize(fItems_.size()); filePtr_.resize(fItems_.size());
forAll(fItems_, Ifields) forAll(fItems_, Ifields)
{ {
@ -143,7 +143,7 @@ void Foam::faceZonesIntegration::makeFile()
faceZonesIntegrationDir/fieldName faceZonesIntegrationDir/fieldName
); );
faceZonesIntegrationFilePtr_.insert(fieldName, sPtr); filePtr_.insert(fieldName, sPtr);
} }
// Add headers to output data // Add headers to output data
@ -155,11 +155,11 @@ void Foam::faceZonesIntegration::makeFile()
void Foam::faceZonesIntegration::writeFileHeader() void Foam::faceZonesIntegration::writeFileHeader()
{ {
forAllIter(HashPtrTable<OFstream>, faceZonesIntegrationFilePtr_, iter) forAllIter(HashPtrTable<OFstream>, filePtr_, iter)
{ {
unsigned int w = IOstream::defaultPrecision() + 7; unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& os = *faceZonesIntegrationFilePtr_[iter.key()]; OFstream& os = *filePtr_[iter.key()];
os << "#Time " << setw(w); os << "#Time " << setw(w);
@ -196,10 +196,10 @@ void Foam::faceZonesIntegration::write()
{ {
const word& fieldName = fItems_[fieldI]; const word& fieldName = fItems_[fieldI];
const surfaceScalarField& fD = const surfaceScalarField& sField =
obr_.lookupObject<surfaceScalarField>(fieldName); obr_.lookupObject<surfaceScalarField>(fieldName);
const fvMesh& mesh = fD.mesh(); const fvMesh& mesh = sField.mesh();
// 1. integrate over all face zones // 1. integrate over all face zones
@ -211,11 +211,11 @@ void Foam::faceZonesIntegration::write()
label zoneID = mesh.faceZones().findZoneID(name); label zoneID = mesh.faceZones().findZoneID(name);
const faceZone& fz = mesh.faceZones()[zoneID]; const faceZone& fZone = mesh.faceZones()[zoneID];
integralVals[setI] = returnReduce integralVals[setI] = returnReduce
( (
calcFaceZonesIntegral(fD, fz), calcIntegral(sField, fZone),
sumOp<scalar>() sumOp<scalar>()
); );
} }
@ -225,13 +225,9 @@ void Foam::faceZonesIntegration::write()
// 2. Write only on master // 2. Write only on master
if if (Pstream::master() && filePtr_.found(fieldName))
(
Pstream::master()
&& faceZonesIntegrationFilePtr_.found(fieldName)
)
{ {
OFstream& os = *faceZonesIntegrationFilePtr_(fieldName); OFstream& os = *filePtr_(fieldName);
os << obr_.time().value(); os << obr_.time().value();
@ -242,7 +238,8 @@ void Foam::faceZonesIntegration::write()
if (log_) if (log_)
{ {
Info<< "faceZonesIntegration output:" << nl Info<< "faceZonesIntegration output:" << nl
<< " Integration" << integralVals[setI] << endl; << " Integration[" << setI << "] "
<< integralVals[setI] << endl;
} }
} }
@ -253,45 +250,47 @@ void Foam::faceZonesIntegration::write()
} }
Foam::scalar Foam::faceZonesIntegration::calcFaceZonesIntegral Foam::scalar Foam::faceZonesIntegration::calcIntegral
( (
const surfaceScalarField& fD, const surfaceScalarField& sField,
const faceZone& fz const faceZone& fZone
) const ) const
{ {
scalar dm = 0.0; scalar sum = 0.0;
const fvMesh& mesh = fD.mesh(); const fvMesh& mesh = sField.mesh();
forAll (fz, i) forAll (fZone, i)
{ {
label faceI = fz[i]; label faceI = fZone[i];
if (mesh.isInternalFace(faceI)) if (mesh.isInternalFace(faceI))
{ {
if (fz.flipMap()[i]) if (fZone.flipMap()[i])
{ {
dm -= fD[faceI]; sum -= sField[faceI];
} }
else else
{ {
dm += fD[faceI]; sum += sField[faceI];
} }
} }
else else
{ {
label patchI = mesh.boundaryMesh().whichPatch(faceI); label patchI = mesh.boundaryMesh().whichPatch(faceI);
const polyPatch& pp = mesh.boundaryMesh()[patchI]; const polyPatch& pp = mesh.boundaryMesh()[patchI];
const fvsPatchScalarField& bField = sField.boundaryField()[patchI];
if (isA<processorPolyPatch>(pp)) if (isA<processorPolyPatch>(pp))
{ {
if (refCast<const processorPolyPatch>(pp).owner()) if (refCast<const processorPolyPatch>(pp).owner())
{ {
if (fz.flipMap()[i]) label patchFaceI = pp.whichFace(faceI);
if (fZone.flipMap()[i])
{ {
dm -= fD.boundaryField()[patchI][pp.whichFace(faceI)]; sum -= bField[patchFaceI];
} }
else else
{ {
dm += fD.boundaryField()[patchI][pp.whichFace(faceI)]; sum += bField[patchFaceI];
} }
} }
} }
@ -300,32 +299,32 @@ Foam::scalar Foam::faceZonesIntegration::calcFaceZonesIntegral
label patchFaceI = faceI - pp.start(); label patchFaceI = faceI - pp.start();
if (patchFaceI < pp.size()/2) if (patchFaceI < pp.size()/2)
{ {
if (fz.flipMap()[i]) if (fZone.flipMap()[i])
{ {
dm -= fD.boundaryField()[patchI][patchFaceI]; sum -= bField[patchFaceI];
} }
else else
{ {
dm += fD.boundaryField()[patchI][patchFaceI]; sum += bField[patchFaceI];
} }
} }
} }
else if (!isA<emptyPolyPatch>(pp)) else if (!isA<emptyPolyPatch>(pp))
{ {
label patchFaceI = faceI - pp.start(); label patchFaceI = faceI - pp.start();
if (fz.flipMap()[i]) if (fZone.flipMap()[i])
{ {
dm -= fD.boundaryField()[patchI][patchFaceI]; sum -= bField[patchFaceI];
} }
else else
{ {
dm += fD.boundaryField()[patchI][patchFaceI]; sum += bField[patchFaceI];
} }
} }
} }
} }
return dm; return sum;
} }

Some files were not shown because too many files have changed in this diff Show More