STYLE: use fully-scoped names in meshTools, sampling

This commit is contained in:
Mark Olesen
2017-11-19 11:34:41 +01:00
parent 6fd27353e4
commit a573e0e1aa
6 changed files with 56 additions and 105 deletions

View File

@ -29,23 +29,20 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(cellZoneSet, 0); defineTypeNameAndDebug(cellZoneSet, 0);
addToRunTimeSelectionTable(topoSet, cellZoneSet, word); addToRunTimeSelectionTable(topoSet, cellZoneSet, word);
addToRunTimeSelectionTable(topoSet, cellZoneSet, size); addToRunTimeSelectionTable(topoSet, cellZoneSet, size);
addToRunTimeSelectionTable(topoSet, cellZoneSet, set); addToRunTimeSelectionTable(topoSet, cellZoneSet, set);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void cellZoneSet::updateSet() void Foam::cellZoneSet::updateSet()
{ {
labelList order; labelList order;
sortedOrder(addressing_, order); sortedOrder(addressing_, order);
@ -60,9 +57,9 @@ void cellZoneSet::updateSet()
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
cellZoneSet::cellZoneSet Foam::cellZoneSet::cellZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -94,7 +91,7 @@ cellZoneSet::cellZoneSet
} }
cellZoneSet::cellZoneSet Foam::cellZoneSet::cellZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -110,7 +107,7 @@ cellZoneSet::cellZoneSet
} }
cellZoneSet::cellZoneSet Foam::cellZoneSet::cellZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -128,13 +125,13 @@ cellZoneSet::cellZoneSet
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
cellZoneSet::~cellZoneSet() Foam::cellZoneSet::~cellZoneSet()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void cellZoneSet::invert(const label maxLen) void Foam::cellZoneSet::invert(const label maxLen)
{ {
// Count // Count
label n = 0; label n = 0;
@ -164,7 +161,7 @@ void cellZoneSet::invert(const label maxLen)
} }
void cellZoneSet::subset(const topoSet& set) void Foam::cellZoneSet::subset(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_.size()); DynamicList<label> newAddressing(addressing_.size());
@ -185,7 +182,7 @@ void cellZoneSet::subset(const topoSet& set)
} }
void cellZoneSet::addSet(const topoSet& set) void Foam::cellZoneSet::addSet(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_); DynamicList<label> newAddressing(addressing_);
@ -206,7 +203,7 @@ void cellZoneSet::addSet(const topoSet& set)
} }
void cellZoneSet::deleteSet(const topoSet& set) void Foam::cellZoneSet::deleteSet(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_.size()); DynamicList<label> newAddressing(addressing_.size());
@ -228,7 +225,7 @@ void cellZoneSet::deleteSet(const topoSet& set)
} }
void cellZoneSet::sync(const polyMesh& mesh) void Foam::cellZoneSet::sync(const polyMesh& mesh)
{ {
cellSet::sync(mesh); cellSet::sync(mesh);
@ -238,13 +235,13 @@ void cellZoneSet::sync(const polyMesh& mesh)
} }
label cellZoneSet::maxSize(const polyMesh& mesh) const Foam::label Foam::cellZoneSet::maxSize(const polyMesh& mesh) const
{ {
return mesh.nCells(); return mesh.nCells();
} }
bool cellZoneSet::writeObject bool Foam::cellZoneSet::writeObject
( (
IOstream::streamFormat s, IOstream::streamFormat s,
IOstream::versionNumber v, IOstream::versionNumber v,
@ -289,7 +286,7 @@ bool cellZoneSet::writeObject
} }
void cellZoneSet::updateMesh(const mapPolyMesh& morphMap) void Foam::cellZoneSet::updateMesh(const mapPolyMesh& morphMap)
{ {
// cellZone // cellZone
labelList newAddressing(addressing_.size()); labelList newAddressing(addressing_.size());
@ -313,7 +310,7 @@ void cellZoneSet::updateMesh(const mapPolyMesh& morphMap)
} }
void cellZoneSet::writeDebug void Foam::cellZoneSet::writeDebug
( (
Ostream& os, Ostream& os,
const primitiveMesh& mesh, const primitiveMesh& mesh,
@ -324,8 +321,4 @@ void cellZoneSet::writeDebug
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -32,23 +32,20 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(faceZoneSet, 0); defineTypeNameAndDebug(faceZoneSet, 0);
addToRunTimeSelectionTable(topoSet, faceZoneSet, word); addToRunTimeSelectionTable(topoSet, faceZoneSet, word);
addToRunTimeSelectionTable(topoSet, faceZoneSet, size); addToRunTimeSelectionTable(topoSet, faceZoneSet, size);
addToRunTimeSelectionTable(topoSet, faceZoneSet, set); addToRunTimeSelectionTable(topoSet, faceZoneSet, set);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void faceZoneSet::updateSet() void Foam::faceZoneSet::updateSet()
{ {
labelList order; labelList order;
sortedOrder(addressing_, order); sortedOrder(addressing_, order);
@ -64,9 +61,9 @@ void faceZoneSet::updateSet()
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
faceZoneSet::faceZoneSet Foam::faceZoneSet::faceZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -100,7 +97,7 @@ faceZoneSet::faceZoneSet
} }
faceZoneSet::faceZoneSet Foam::faceZoneSet::faceZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -117,7 +114,7 @@ faceZoneSet::faceZoneSet
} }
faceZoneSet::faceZoneSet Foam::faceZoneSet::faceZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -136,13 +133,13 @@ faceZoneSet::faceZoneSet
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
faceZoneSet::~faceZoneSet() Foam::faceZoneSet::~faceZoneSet()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void faceZoneSet::invert(const label maxLen) void Foam::faceZoneSet::invert(const label maxLen)
{ {
// Count // Count
label n = 0; label n = 0;
@ -173,7 +170,7 @@ void faceZoneSet::invert(const label maxLen)
} }
void faceZoneSet::subset(const topoSet& set) void Foam::faceZoneSet::subset(const topoSet& set)
{ {
label nConflict = 0; label nConflict = 0;
@ -221,7 +218,7 @@ void faceZoneSet::subset(const topoSet& set)
} }
void faceZoneSet::addSet(const topoSet& set) void Foam::faceZoneSet::addSet(const topoSet& set)
{ {
label nConflict = 0; label nConflict = 0;
@ -272,7 +269,7 @@ void faceZoneSet::addSet(const topoSet& set)
} }
void faceZoneSet::deleteSet(const topoSet& set) void Foam::faceZoneSet::deleteSet(const topoSet& set)
{ {
label nConflict = 0; label nConflict = 0;
@ -324,7 +321,7 @@ void faceZoneSet::deleteSet(const topoSet& set)
} }
void faceZoneSet::sync(const polyMesh& mesh) void Foam::faceZoneSet::sync(const polyMesh& mesh)
{ {
// Make sure that the faceZone is consistent with the faceSet // Make sure that the faceZone is consistent with the faceSet
{ {
@ -453,13 +450,13 @@ void faceZoneSet::sync(const polyMesh& mesh)
} }
label faceZoneSet::maxSize(const polyMesh& mesh) const Foam::label Foam::faceZoneSet::maxSize(const polyMesh& mesh) const
{ {
return mesh.nFaces(); return mesh.nFaces();
} }
bool faceZoneSet::writeObject bool Foam::faceZoneSet::writeObject
( (
IOstream::streamFormat s, IOstream::streamFormat s,
IOstream::versionNumber v, IOstream::versionNumber v,
@ -505,7 +502,7 @@ bool faceZoneSet::writeObject
} }
void faceZoneSet::updateMesh(const mapPolyMesh& morphMap) void Foam::faceZoneSet::updateMesh(const mapPolyMesh& morphMap)
{ {
// faceZone // faceZone
labelList newAddressing(addressing_.size()); labelList newAddressing(addressing_.size());
@ -533,7 +530,7 @@ void faceZoneSet::updateMesh(const mapPolyMesh& morphMap)
} }
void faceZoneSet::writeDebug void Foam::faceZoneSet::writeDebug
( (
Ostream& os, Ostream& os,
const primitiveMesh& mesh, const primitiveMesh& mesh,
@ -544,8 +541,4 @@ void faceZoneSet::writeDebug
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -31,23 +31,20 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(pointZoneSet, 0); defineTypeNameAndDebug(pointZoneSet, 0);
addToRunTimeSelectionTable(topoSet, pointZoneSet, word); addToRunTimeSelectionTable(topoSet, pointZoneSet, word);
addToRunTimeSelectionTable(topoSet, pointZoneSet, size); addToRunTimeSelectionTable(topoSet, pointZoneSet, size);
addToRunTimeSelectionTable(topoSet, pointZoneSet, set); addToRunTimeSelectionTable(topoSet, pointZoneSet, set);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void pointZoneSet::updateSet() void Foam::pointZoneSet::updateSet()
{ {
labelList order; labelList order;
sortedOrder(addressing_, order); sortedOrder(addressing_, order);
@ -62,9 +59,9 @@ void pointZoneSet::updateSet()
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
pointZoneSet::pointZoneSet Foam::pointZoneSet::pointZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -96,7 +93,7 @@ pointZoneSet::pointZoneSet
} }
pointZoneSet::pointZoneSet Foam::pointZoneSet::pointZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -112,7 +109,7 @@ pointZoneSet::pointZoneSet
} }
pointZoneSet::pointZoneSet Foam::pointZoneSet::pointZoneSet
( (
const polyMesh& mesh, const polyMesh& mesh,
const word& name, const word& name,
@ -130,13 +127,13 @@ pointZoneSet::pointZoneSet
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
pointZoneSet::~pointZoneSet() Foam::pointZoneSet::~pointZoneSet()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void pointZoneSet::invert(const label maxLen) void Foam::pointZoneSet::invert(const label maxLen)
{ {
// Count // Count
label n = 0; label n = 0;
@ -165,7 +162,7 @@ void pointZoneSet::invert(const label maxLen)
} }
void pointZoneSet::subset(const topoSet& set) void Foam::pointZoneSet::subset(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_.size()); DynamicList<label> newAddressing(addressing_.size());
@ -186,7 +183,7 @@ void pointZoneSet::subset(const topoSet& set)
} }
void pointZoneSet::addSet(const topoSet& set) void Foam::pointZoneSet::addSet(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_); DynamicList<label> newAddressing(addressing_);
@ -207,7 +204,7 @@ void pointZoneSet::addSet(const topoSet& set)
} }
void pointZoneSet::deleteSet(const topoSet& set) void Foam::pointZoneSet::deleteSet(const topoSet& set)
{ {
DynamicList<label> newAddressing(addressing_.size()); DynamicList<label> newAddressing(addressing_.size());
@ -229,7 +226,7 @@ void pointZoneSet::deleteSet(const topoSet& set)
} }
void pointZoneSet::sync(const polyMesh& mesh) void Foam::pointZoneSet::sync(const polyMesh& mesh)
{ {
pointSet::sync(mesh); pointSet::sync(mesh);
@ -239,13 +236,13 @@ void pointZoneSet::sync(const polyMesh& mesh)
} }
label pointZoneSet::maxSize(const polyMesh& mesh) const Foam::label Foam::pointZoneSet::maxSize(const polyMesh& mesh) const
{ {
return mesh.nPoints(); return mesh.nPoints();
} }
bool pointZoneSet::writeObject bool Foam::pointZoneSet::writeObject
( (
IOstream::streamFormat s, IOstream::streamFormat s,
IOstream::versionNumber v, IOstream::versionNumber v,
@ -290,7 +287,7 @@ bool pointZoneSet::writeObject
} }
void pointZoneSet::updateMesh(const mapPolyMesh& morphMap) void Foam::pointZoneSet::updateMesh(const mapPolyMesh& morphMap)
{ {
// pointZone // pointZone
labelList newAddressing(addressing_.size()); labelList newAddressing(addressing_.size());
@ -314,7 +311,7 @@ void pointZoneSet::updateMesh(const mapPolyMesh& morphMap)
} }
void pointZoneSet::writeDebug void Foam::pointZoneSet::writeDebug
( (
Ostream& os, Ostream& os,
const primitiveMesh& mesh, const primitiveMesh& mesh,
@ -325,8 +322,4 @@ void pointZoneSet::writeDebug
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -38,12 +38,7 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam void Foam::makeGraph
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void makeGraph
( (
const scalarField& x, const scalarField& x,
const volScalarField& vsf, const volScalarField& vsf,
@ -54,7 +49,7 @@ void makeGraph
} }
void makeGraph void Foam::makeGraph
( (
const scalarField& x, const scalarField& x,
const volScalarField& vsf, const volScalarField& vsf,
@ -76,7 +71,7 @@ void makeGraph
} }
void makeGraph void Foam::makeGraph
( (
const scalarField& x, const scalarField& x,
const scalarField& sf, const scalarField& sf,
@ -96,8 +91,4 @@ void makeGraph
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -5,12 +5,7 @@
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam void Foam::writeCellGraph
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void writeCellGraph
( (
const volScalarField& vsf, const volScalarField& vsf,
const word& graphFormat const word& graphFormat
@ -30,8 +25,4 @@ void writeCellGraph
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //

View File

@ -3,15 +3,9 @@
#include "fvMesh.H" #include "fvMesh.H"
#include "graph.H" #include "graph.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam void Foam::writePatchGraph
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void writePatchGraph
( (
const volScalarField& vsf, const volScalarField& vsf,
const label patchLabel, const label patchLabel,
@ -30,8 +24,4 @@ void writePatchGraph
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //