Merge branch 'olesenm'

This commit is contained in:
andy
2010-04-16 18:55:27 +01:00
246 changed files with 538 additions and 578 deletions

View File

@ -6,7 +6,7 @@ ODESolversRK = ODESolvers/RK
ODESolversSIBS = ODESolvers/SIBS
$(ODESolversODESolver)/ODESolver.C
$(ODESolversODESolver)/newODESolver.C
$(ODESolversODESolver)/ODESolverNew.C
$(ODESolversRK)/RK.C

View File

@ -122,19 +122,18 @@ void printSourceFileAndLine
if (line == "")
{
os << " addr2line failed";
os << " addr2line failed";
}
else if (line == "??:0")
{
os << " in " << filename;
os << " in " << filename;
}
else
{
string cwdLine(line.replaceAll(cwd() + '/', ""));
string homeLine(cwdLine.replaceAll(home(), '~'));
os << " at " << homeLine.c_str();
os << " at " << homeLine.c_str();
}
}
}
@ -160,11 +159,11 @@ void getSymbolForRaw
if (fcnt != "")
{
os << fcnt.c_str();
os << fcnt.c_str();
return;
}
}
os << "Uninterpreted: " << raw.c_str();
os << "Uninterpreted: " << raw.c_str();
}
@ -210,8 +209,8 @@ void error::printStack(Ostream& os)
fileName programFile;
word address;
os << '#' << label(i) << " ";
//os << "Raw : " << msg << "\n\t";
os << '#' << label(i) << " ";
//os << "Raw : " << msg << "\n\t";
{
string::size_type lPos = msg.find('[');
string::size_type rPos = msg.find(']');
@ -263,12 +262,12 @@ void error::printStack(Ostream& os)
if (status == 0 && cplusNamePtr)
{
os << cplusNamePtr;
os << cplusNamePtr;
free(cplusNamePtr);
}
else
{
os << cName.c_str();
os << cName.c_str();
}
}
else
@ -279,7 +278,7 @@ void error::printStack(Ostream& os)
{
string fullName(msg.substr(start, endBracketPos-start));
os << fullName.c_str() << nl;
os << fullName.c_str() << nl;
}
else
{
@ -296,7 +295,7 @@ void error::printStack(Ostream& os)
printSourceFileAndLine(os, addressMap, programFile, address);
os << nl;
os << nl;
}
free(strings);

View File

@ -258,13 +258,13 @@ $(GAMG)/GAMGSolverSolve.C
GAMGInterfaces = $(GAMG)/interfaces
$(GAMGInterfaces)/GAMGInterface/GAMGInterface.C
$(GAMGInterfaces)/GAMGInterface/newGAMGInterface.C
$(GAMGInterfaces)/GAMGInterface/GAMGInterfaceNew.C
$(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C
$(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C
GAMGInterfaceFields = $(GAMG)/interfaceFields
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C
$(GAMGInterfaceFields)/GAMGInterfaceField/newGAMGInterfaceField.C
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceFieldNew.C
$(GAMGInterfaceFields)/processorGAMGInterfaceField/processorGAMGInterfaceField.C
$(GAMGInterfaceFields)/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
@ -328,7 +328,7 @@ polyMesh = meshes/polyMesh
polyPatches = $(polyMesh)/polyPatches
$(polyPatches)/polyPatch/polyPatch.C
$(polyPatches)/polyPatch/newPolyPatch.C
$(polyPatches)/polyPatch/polyPatchNew.C
basicPolyPatches = $(polyPatches)/basic
$(basicPolyPatches)/coupled/coupledPolyPatch.C
@ -362,15 +362,15 @@ $(zone)/zone.C
cellZone = $(polyMesh)/zones/cellZone
$(cellZone)/cellZone.C
$(cellZone)/newCellZone.C
$(cellZone)/cellZoneNew.C
faceZone = $(polyMesh)/zones/faceZone
$(faceZone)/faceZone.C
$(faceZone)/newFaceZone.C
$(faceZone)/faceZoneNew.C
pointZone = $(polyMesh)/zones/pointZone
$(pointZone)/pointZone.C
$(pointZone)/newPointZone.C
$(pointZone)/pointZoneNew.C
$(polyMesh)/polyMesh.C
$(polyMesh)/polyMeshFromShapeMesh.C
@ -438,7 +438,7 @@ $(pointMeshMapper)/pointPatchMapper.C
pointPatches = $(pointMesh)/pointPatches
$(pointPatches)/pointPatch/pointPatch.C
$(pointPatches)/facePointPatch/facePointPatch.C
$(pointPatches)/facePointPatch/newFacePointPatch.C
$(pointPatches)/facePointPatch/facePointPatchNew.C
basicPointPatches = $(pointPatches)/basic
$(basicPointPatches)/coupled/coupledPointPatch.C

View File

@ -61,9 +61,9 @@ Foam::IOstream::compressionType
Foam::IOstream::compressionEnum(const word& compression)
{
// get Switch (bool) value, but allow it to fail
Switch::switchType sw = Switch::asEnum(compression, true);
Switch sw(compression, true);
if (sw != Switch::INVALID)
if (sw.valid())
{
return sw ? IOstream::COMPRESSED : IOstream::UNCOMPRESSED;
}

View File

@ -346,6 +346,6 @@ Ostream& operator<<
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "newPointPatchField.C"
#include "pointPatchFieldNew.C"
// ************************************************************************* //

View File

@ -40,8 +40,8 @@ License
OpenFOAM comes with full commercial support from OpenCFD, including
<a href="http://www.openfoam.com/support/software.php">software support</a>,
<a href="http://www.openfoam.com/support/development.php">contracted developments</a>
and a programme of <a href="http://www.openfoam.com/training">training courses</a>.
<a href="http://www.openfoam.com/support/development.php">contracted developments</a>
and a programme of <a href="http://www.openfoam.com/training/">training courses</a>.
These activities fund the development, maintenance and release of
OpenFOAM to make it an extremely viable commercial open source product.

View File

@ -71,7 +71,7 @@ void Foam::coupledPolyPatch::writeOBJ
writeOBJ(os, p1);
vertI++;
os<< "l " << vertI-1 << ' ' << vertI << nl;
os << "l " << vertI-1 << ' ' << vertI << nl;
}

View File

@ -32,7 +32,7 @@ Description
SourceFiles
polyPatch.C
newPolyPatch.C
polyPatchNew.C
\*---------------------------------------------------------------------------*/

View File

@ -34,7 +34,7 @@ Description
SourceFiles
cellZone.C
newCellZone.C
cellZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -33,7 +33,7 @@ Description
SourceFiles
faceZone.C
newFaceZone.C
faceZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -35,7 +35,7 @@ Description
SourceFiles
pointZone.C
newPointZone.C
pointZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,23 +44,17 @@ const char* Foam::Switch::names[Foam::Switch::INVALID+1] =
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
Foam::Switch::switchType Foam::Switch::asEnum(const bool b)
{
return b ? Switch::TRUE : Switch::FALSE;
}
Foam::Switch::switchType Foam::Switch::asEnum
(
const std::string& str,
const bool allowInvalid
)
{
for (int sw = 0; sw < Switch::INVALID; sw++)
for (int sw = 0; sw < Switch::INVALID; ++sw)
{
if (str == names[sw])
{
// convert n/y to no/yes (perhaps should deprecate y/n)
// convert n/y to no/yes - perhaps should deprecate y/n
if (sw == Switch::NO_1 || sw == Switch::NONE)
{
return Switch::NO;
@ -78,57 +72,12 @@ Foam::Switch::switchType Foam::Switch::asEnum
if (!allowInvalid)
{
FatalErrorIn("Switch::asEnum(const std::string&)")
FatalErrorIn("Switch::asEnum(const std::string&, const bool)")
<< "unknown switch word " << str << nl
<< abort(FatalError);
}
return INVALID;
}
bool Foam::Switch::asBool(const switchType sw)
{
// relies on (INVALID & 0x1) evaluating to false
return (sw & 0x1);
}
bool Foam::Switch::asBool
(
const std::string& str,
const bool allowInvalid
)
{
// allow invalid values, but catch after for correct error message
switchType sw = asEnum(str, true);
if (sw == Switch::INVALID)
{
if (!allowInvalid)
{
FatalErrorIn("Switch::asBool(const std::string&)")
<< "unknown switch word " << str << nl
<< abort(FatalError);
}
return false;
}
return (sw & 0x1);
}
const char* Foam::Switch::asText(const bool b)
{
return b ? names[Switch::TRUE] : names[Switch::FALSE];
}
const char* Foam::Switch::asText(const switchType sw)
{
return names[sw];
return Switch::INVALID;
}
@ -145,6 +94,18 @@ Foam::Switch Foam::Switch::lookupOrAddToDict
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::Switch::valid() const
{
return switch_ <= Switch::NONE;
}
const char* Foam::Switch::asText() const
{
return names[switch_];
}
bool Foam::Switch::readIfPresent(const word& name, const dictionary& dict)
{
return dict.readIfPresent<Switch>(name, *this);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,11 +48,11 @@ namespace Foam
// Forward declaration of friend functions and operators
class Switch;
class dictionary;
Istream& operator>>(Istream&, Switch&);
Ostream& operator<<(Ostream&, const Switch&);
class dictionary;
/*---------------------------------------------------------------------------*\
Class Switch Declaration
@ -60,8 +60,6 @@ class dictionary;
class Switch
{
private:
// Private data
//- The logic and enumerated text representation stored as a single byte
@ -71,19 +69,21 @@ public:
// Public data types
// avoid issues with pre-processor defines
#undef FALSE
#undef TRUE
#undef OFF
#undef ON
#undef NO
#undef YES
#undef NO_1
#undef YES_1
#undef NONE
#undef PLACEHOLDER
#undef INVALID
//- The various text representations for a switch value.
// These also correspond to the entries in names.
# undef FALSE
# undef TRUE
# undef OFF
# undef ON
# undef NO
# undef YES
# undef NO_1
# undef YES_1
# undef NONE
# undef PLACEHOLDER
# undef INVALID
enum switchType
{
FALSE = 0, TRUE = 1,
@ -94,7 +94,6 @@ public:
INVALID
};
// Static data members
//- The set of names corresponding to the switchType enumeration
@ -102,36 +101,15 @@ public:
static const char* names[INVALID+1];
private:
// Static Member Functions
//- Return a switchType representation of a bool
static switchType asEnum(const bool);
//- Return a switchType representation of a word
// Optionally allow bad words, and catch the error elsewhere
static switchType asEnum
(
const std::string&,
const bool allowInvalid=false
);
static switchType asEnum(const std::string&, const bool allowInvalid);
//- Return a bool representation of a switchType
static bool asBool(const switchType);
//- Return a bool representation of a word
// Optionally allow bad words, and catch the error elsewhere
static bool asBool
(
const std::string&,
const bool allowInvalid=false
);
//- Return a text representation of a bool value
static const char* asText(const bool);
//- Return a text representation of a switchType
static const char* asText(const switchType);
public:
// Constructors
@ -141,28 +119,36 @@ public:
switch_(Switch::FALSE)
{}
//- Construct from bool
Switch(const bool value)
//- Construct from enumerated value
Switch(const switchType sw)
:
switch_(asEnum(value))
switch_(sw)
{}
//- Construct from bool
Switch(const bool b)
:
switch_(b ? Switch::TRUE : Switch::FALSE)
{}
//- Construct from integer values (treats integer as bool value)
Switch(const int value)
Switch(const int i)
:
switch_(asEnum(bool(value)))
switch_(i ? Switch::TRUE : Switch::FALSE)
{}
//- Construct from std::string, string, word
Switch(const std::string& value)
// Optionally allow bad words, and catch the error elsewhere
Switch(const std::string& str, const bool allowInvalid=false)
:
switch_(asEnum(value))
switch_(asEnum(str, allowInvalid))
{}
//- Construct from character array
Switch(const char* value)
// Optionally allow bad words, and catch the error elsewhere
Switch(const char* str, const bool allowInvalid=false)
:
switch_(asEnum(std::string(value)))
switch_(asEnum(std::string(str), allowInvalid))
{}
//- Construct from Istream
@ -178,6 +164,18 @@ public:
);
// Member Functions
//- Return true if the Switch has a valid value
bool valid() const;
//- Return a text representation of the Switch
const char* asText() const;
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// Member Operators
//- Conversion to bool
@ -186,6 +184,13 @@ public:
return (switch_ & 0x1);
}
//- Assignment from enumerated value
const Switch& operator=(const switchType sw)
{
switch_ = sw;
return *this;
}
//- Assignment from bool
const Switch& operator=(const bool b)
{
@ -194,12 +199,6 @@ public:
}
// Member fuctions
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// IOstream Operators
friend Istream& operator>>(Istream&, Switch&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,26 +48,26 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
if (t.isLabel())
{
s.switch_ = Switch::asEnum(bool(t.labelToken()));
s = bool(t.labelToken());
}
else if (t.isWord())
{
// allow invalid values, but catch after for correct error message
Switch::switchType sw = Switch::asEnum(t.wordToken(), true);
Switch sw(t.wordToken(), true);
if (sw == Switch::INVALID)
if (sw.valid())
{
s = sw;
}
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, Switch&)", is)
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is)
<< "expected 'true/false', 'on/off' ... found " << t.wordToken()
<< exit(FatalIOError);
return is;
}
else
{
s.switch_ = sw;
}
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ Foam::Istream& Foam::operator>>(Istream& is, bool& b)
Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
{
// we could also write as text string without any difficulty
// os << Switch::asText(b);
// os << (b ? "true" : "false");
os.write(label(b));
os.check("Ostream& operator<<(Ostream&, const bool)");
return os;
@ -59,10 +59,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
bool Foam::readBool(Istream& is)
{
bool val;
is >> val;
bool b;
is >> b;
return val;
return b;
}

View File

@ -1,5 +1,5 @@
dynamicFvMesh/dynamicFvMesh.C
dynamicFvMesh/newDynamicFvMesh.C
dynamicFvMesh/dynamicFvMeshNew.C
staticFvMesh/staticFvMesh.C
dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C
dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
@ -8,7 +8,7 @@ dynamicRefineFvMesh/dynamicRefineFvMesh.C
solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C
$(solidBodyMotionFunctions)/SDA/SDA.C
$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C
$(solidBodyMotionFunctions)/linearMotion/linearMotion.C

View File

@ -29,7 +29,7 @@ Description
SourceFiles
dynamicFvMesh.C
newDynamicFvMesh.C
dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/

View File

@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine
const fvsPatchScalarField& patchPhiU =
phiU.boundaryField()[patchI];
label faceI = patchPhi.patch().patch().start();
label faceI = patchPhi.patch().start();
forAll(patchPhi, i)
{

View File

@ -36,7 +36,7 @@ Description
SourceFiles
solidBodyMotionFunction.C
newDynamicFvMesh.C
dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/

View File

@ -19,7 +19,7 @@ $(enrichedPatch)/enrichedPatchMasterPoints.C
polyMeshModifier = polyTopoChange/polyMeshModifier
$(polyMeshModifier)/polyMeshModifier.C
$(polyMeshModifier)/newPolyMeshModifier.C
$(polyMeshModifier)/polyMeshModifierNew.C
polyTopoChange/polyTopoChange/topoAction/topoActions.C
polyTopoChange/polyTopoChanger/polyTopoChanger.C

View File

@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
forAll(bfld, patchI)
{
fvsPatchField<T>& patchFld = bfld[patchI];
label faceI = patchFld.patch().patch().start();
label faceI = patchFld.patch().start();
forAll(patchFld, i)
{

View File

@ -3036,12 +3036,12 @@ void Foam::cellCuts::writeOBJ
vertI++;
}
os << 'f';
os << 'f';
forAll(loopPts, fp)
{
os << ' ' << startVertI + fp + 1;
}
os<< endl;
os << endl;
}

View File

@ -8,7 +8,7 @@ engineValve/engineValve.C
enginePiston/enginePiston.C
engineMesh/engineMesh/engineMesh.C
engineMesh/engineMesh/newEngineMesh.C
engineMesh/engineMesh/engineMeshNew.C
engineMesh/staticEngineMesh/staticEngineMesh.C
engineMesh/layeredEngineMesh/layeredEngineMesh.C
engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C

View File

@ -9,7 +9,7 @@ $(fvBoundaryMesh)/fvBoundaryMesh.C
fvPatches = fvMesh/fvPatches
$(fvPatches)/fvPatch/fvPatch.C
$(fvPatches)/fvPatch/newFvPatch.C
$(fvPatches)/fvPatch/fvPatchNew.C
basicFvPatches = $(fvPatches)/basic
$(basicFvPatches)/coupled/coupledFvPatch.C
@ -334,7 +334,7 @@ $(MRF)/MRFZones.C
SRF = $(general)/SRF
$(SRF)/SRFModel/SRFModel/SRFModel.C
$(SRF)/SRFModel/SRFModel/newSRFModel.C
$(SRF)/SRFModel/SRFModel/SRFModelNew.C
$(SRF)/SRFModel/rpm/rpm.C
$(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C

View File

@ -231,7 +231,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
Info<< "openFraction = " << openFraction_ << endl;
vectorField::subField Sfw = patch().patch().faceAreas();
vectorField::subField Sfw = this->patch().patch().faceAreas();
vectorField newSfw = (1 - openFraction_)*initWallSf_;
forAll(Sfw, facei)
{

View File

@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField<Type>::updateCoeffs()
{
const fvPatchField<Type>& pf =
nbrField.boundaryField()[patchI];
label faceStart = pf.patch().patch().start();
label faceStart = pf.patch().start();
forAll(pf, faceI)
{

View File

@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField
// Force calculation of schedule (uses parallel comms)
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
(
patch().patch()
this->patch().patch()
);
(void)mpp.map().schedule();
}
@ -187,7 +187,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
const fvPatchVectorField& Upf = UField.boundaryField()[patchI];
const scalarField& phipf = phiField.boundaryField()[patchI];
label faceStart = Upf.patch().patch().start();
label faceStart = Upf.patch().start();
forAll(Upf, faceI)
{

View File

@ -479,6 +479,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField<Type>& ptf)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newFvPatchField.C"
# include "fvPatchFieldNew.C"
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
SourceFiles
fvPatchField.C
newFvPatchField.C
fvPatchFieldNew.C
\*---------------------------------------------------------------------------*/

View File

@ -403,6 +403,6 @@ Ostream& operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newFvsPatchField.C"
# include "fvsPatchFieldNew.C"
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
SourceFiles
fvsPatchField.C
newFvsPatchField.C
fvsPatchFieldNew.C
\*---------------------------------------------------------------------------*/

View File

@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum
if (pSfCorr.coupled())
{
label faceI = pSfCorr.patch().patch().start();
label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i)
{

View File

@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
if (pSfCorr.coupled())
{
label faceI = pSfCorr.patch().patch().start();
label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i)
{

View File

@ -73,14 +73,14 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
// Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start();
label baseSize = basePatch.size();
const label baseStart = basePatch.start();
const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size());
forAll(directAddressing, i)
{
label baseFaceI = faceMap[subPatch.patch().start()+i];
label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{
@ -197,14 +197,14 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
// Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start();
label baseSize = basePatch.size();
const label baseStart = basePatch.start();
const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size());
forAll(directAddressing, i)
{
label baseFaceI = faceMap[subPatch.patch().start()+i];
label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{
@ -239,7 +239,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
{
fvsPatchField<Type>& pfld = patchFields[patchI];
label meshFaceI = pfld.patch().patch().start();
label meshFaceI = pfld.patch().start();
forAll(pfld, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,21 +31,18 @@ License
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(fvPatch, 0);
defineRunTimeSelectionTable(fvPatch, polyPatch);
addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch);
defineTypeNameAndDebug(fvPatch, 0);
defineRunTimeSelectionTable(fvPatch, polyPatch);
addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
Foam::fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
:
polyPatch_(p),
boundaryMesh_(bm)
@ -54,19 +51,19 @@ fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
fvPatch::~fvPatch()
Foam::fvPatch::~fvPatch()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool fvPatch::constraintType(const word& pt)
bool Foam::fvPatch::constraintType(const word& pt)
{
return fvPatchField<scalar>::patchConstructorTablePtr_->found(pt);
}
wordList fvPatch::constraintTypes()
Foam::wordList Foam::fvPatch::constraintTypes()
{
wordList cTypes(polyPatchConstructorTablePtr_->size());
@ -92,19 +89,19 @@ wordList fvPatch::constraintTypes()
}
const unallocLabelList& fvPatch::faceCells() const
const Foam::unallocLabelList& Foam::fvPatch::faceCells() const
{
return polyPatch_.faceCells();
}
const vectorField& fvPatch::Cf() const
const Foam::vectorField& Foam::fvPatch::Cf() const
{
return boundaryMesh().mesh().Cf().boundaryField()[index()];
}
tmp<vectorField> fvPatch::Cn() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::Cn() const
{
tmp<vectorField> tcc(new vectorField(size()));
vectorField& cc = tcc();
@ -123,64 +120,60 @@ tmp<vectorField> fvPatch::Cn() const
}
tmp<vectorField> fvPatch::nf() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::nf() const
{
return Sf()/magSf();
}
const vectorField& fvPatch::Sf() const
const Foam::vectorField& Foam::fvPatch::Sf() const
{
return boundaryMesh().mesh().Sf().boundaryField()[index()];
}
const scalarField& fvPatch::magSf() const
const Foam::scalarField& Foam::fvPatch::magSf() const
{
return boundaryMesh().mesh().magSf().boundaryField()[index()];
}
tmp<vectorField> fvPatch::delta() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::delta() const
{
return Cf() - Cn();
}
void fvPatch::makeWeights(scalarField& w) const
void Foam::fvPatch::makeWeights(scalarField& w) const
{
w = 1.0;
}
void fvPatch::makeDeltaCoeffs(scalarField& dc) const
void Foam::fvPatch::makeDeltaCoeffs(scalarField& dc) const
{
dc = 1.0/(nf() & delta());
}
void fvPatch::initMovePoints()
void Foam::fvPatch::initMovePoints()
{}
void fvPatch::movePoints()
void Foam::fvPatch::movePoints()
{}
const scalarField& fvPatch::deltaCoeffs() const
const Foam::scalarField& Foam::fvPatch::deltaCoeffs() const
{
return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()];
}
const scalarField& fvPatch::weights() const
const Foam::scalarField& Foam::fvPatch::weights() const
{
return boundaryMesh().mesh().weights().boundaryField()[index()];
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,11 +25,11 @@ Class
Foam::fvPatch
Description
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh
SourceFiles
fvPatch.C
newFvPatch.C
fvPatchNew.C
\*---------------------------------------------------------------------------*/
@ -121,14 +121,18 @@ public:
// Constructors
//- Construct from polyPatch
//- Construct from polyPatch and fvBoundaryMesh
fvPatch(const polyPatch&, const fvBoundaryMesh&);
// Selectors
//- Return a pointer to a new patch created on freestore from polyPatch
static autoPtr<fvPatch> New(const polyPatch&, const fvBoundaryMesh&);
static autoPtr<fvPatch> New
(
const polyPatch&,
const fvBoundaryMesh&
);
//- Destructor
@ -151,6 +155,12 @@ public:
return polyPatch_.name();
}
//- Return start label of this patch in the polyMesh face list
label start() const
{
return polyPatch_.start();
}
//- Return size
virtual label size() const
{
@ -185,7 +195,7 @@ public:
template<class T>
const typename List<T>::subList patchSlice(const List<T>& l) const
{
return typename List<T>::subList(l, size(), polyPatch_.start());
return typename List<T>::subList(l, size(), start());
}
//- Return faceCells

View File

@ -56,6 +56,6 @@ interpolation<Type>::interpolation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newInterpolation.C"
# include "interpolationNew.C"
// ************************************************************************* //

View File

@ -103,7 +103,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{

View File

@ -121,7 +121,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{
@ -180,7 +180,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{

View File

@ -144,7 +144,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
}
else
{
label start = bfld.patch().patch().start();
const label start = bfld.patch().start();
forAll(bfld, i)
{

View File

@ -190,7 +190,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
}
else
{
label start = bfld.patch().patch().start();
const label start = bfld.patch().start();
forAll(bfld, i)
{

View File

@ -67,7 +67,7 @@ bool Foam::IOPosition<ParticleType>::write() const
template<class ParticleType>
bool Foam::IOPosition<ParticleType>::writeData(Ostream& os) const
{
os<< cloud_.size() << nl << token::BEGIN_LIST << nl;
os << cloud_.size() << nl << token::BEGIN_LIST << nl;
forAllConstIter(typename Cloud<ParticleType>, cloud_, iter)
{
@ -80,7 +80,7 @@ bool Foam::IOPosition<ParticleType>::writeData(Ostream& os) const
os << nl;
}
os<< token::END_LIST << endl;
os << token::END_LIST << endl;
return os.good();
}

View File

@ -32,12 +32,12 @@ $(injector)/swirlInjector/swirlInjector.C
$(injector)/definedInjector/definedInjector.C
$(atomizationModels)/atomizationModel/atomizationModel.C
$(atomizationModels)/atomizationModel/newAtomizationModel.C
$(atomizationModels)/atomizationModel/atomizationModelNew.C
$(atomizationModels)/LISA/LISA.C
$(atomizationModels)/noAtomization/noAtomization.C
$(atomizationModels)/blobsSheetAtomization/blobsSheetAtomization.C
$(breakupModels)/breakupModel/newBreakupModel.C
$(breakupModels)/breakupModel/breakupModelNew.C
$(breakupModels)/breakupModel/breakupModel.C
$(breakupModels)/noBreakup/noBreakup.C
$(breakupModels)/reitzDiwakar/reitzDiwakar.C
@ -46,24 +46,24 @@ $(breakupModels)/SHF/SHF.C
$(breakupModels)/TAB/TAB.C
$(breakupModels)/ETAB/ETAB.C
$(dragModels)/dragModel/newDragModel.C
$(dragModels)/dragModel/dragModelNew.C
$(dragModels)/dragModel/dragModel.C
$(dragModels)/noDragModel/noDragModel.C
$(dragModels)/standardDragModel/standardDragModel.C
$(evaporationModels)/evaporationModel/newEvaporationModel.C
$(evaporationModels)/evaporationModel/evaporationModelNew.C
$(evaporationModels)/evaporationModel/evaporationModel.C
$(evaporationModels)/noEvaporation/noEvaporation.C
$(evaporationModels)/RutlandFlashBoil/RutlandFlashBoil.C
$(evaporationModels)/standardEvaporationModel/standardEvaporationModel.C
$(evaporationModels)/saturateEvaporationModel/saturateEvaporationModel.C
$(heatTransferModels)/heatTransferModel/newHeatTransferModel.C
$(heatTransferModels)/heatTransferModel/heatTransferModelNew.C
$(heatTransferModels)/heatTransferModel/heatTransferModel.C
$(heatTransferModels)/noHeatTransfer/noHeatTransfer.C
$(heatTransferModels)/RanzMarshall/RanzMarshall.C
$(injectorModels)/injectorModel/newInjectorModel.C
$(injectorModels)/injectorModel/injectorModelNew.C
$(injectorModels)/injectorModel/injectorModel.C
$(injectorModels)/constant/constInjector.C
$(injectorModels)/Chomiak/Chomiak.C
@ -73,19 +73,19 @@ $(injectorModels)/definedHollowCone/definedHollowCone.C
$(injectorModels)/definedPressureSwirl/definedPressureSwirl.C
$(injectorModels)/blobsSwirl/blobsSwirlInjector.C
$(wallModels)/wallModel/newWallModel.C
$(wallModels)/wallModel/wallModelNew.C
$(wallModels)/wallModel/wallModel.C
$(wallModels)/removeParcel/removeParcel.C
$(wallModels)/reflectParcel/reflectParcel.C
$(collisionModels)/collisionModel/collisionModel.C
$(collisionModels)/collisionModel/newCollisionModel.C
$(collisionModels)/collisionModel/collisionModelNew.C
$(collisionModels)/noCollision/noCollision.C
$(collisionModels)/ORourke/ORourkeCollisionModel.C
$(collisionModels)/trajectoryModel/trajectoryModel.C
$(dispersionModels)/dispersionModel/dispersionModel.C
$(dispersionModels)/dispersionModel/newDispersionModel.C
$(dispersionModels)/dispersionModel/dispersionModelNew.C
$(dispersionModels)/dispersionRASModel/dispersionRASModel.C
$(dispersionModels)/dispersionLESModel/dispersionLESModel.C
$(dispersionModels)/noDispersion/noDispersion.C

View File

@ -84,7 +84,7 @@ Foam::BinaryCollisionModel<CloudType>::coeffDict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewBinaryCollisionModel.C"
#include "BinaryCollisionModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
BinaryCollisionModel.C
NewBinaryCollisionModel.C
BinaryCollisionModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -80,7 +80,7 @@ const Foam::dictionary& Foam::InflowBoundaryModel<CloudType>::coeffDict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewInflowBoundaryModel.C"
#include "InflowBoundaryModelNew.C"
// ************************************************************************* //

View File

@ -30,7 +30,7 @@ Description
SourceFiles
InflowBoundaryModel.C
NewInflowBoundaryModel.C
InflowBoundaryModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -81,7 +81,7 @@ Foam::WallInteractionModel<CloudType>::coeffDict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewWallInteractionModel.C"
#include "WallInteractionModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
WallInteractionModel.C
NewWallInteractionModel.C
WallInteractionModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -48,6 +48,6 @@ Foam::IntegrationScheme<Type>::~IntegrationScheme()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
#include "newIntegrationScheme.C"
#include "IntegrationSchemeNew.C"
// ************************************************************************* //

View File

@ -32,7 +32,7 @@ Description
SourceFiles
DataEntry.C
NewDataEntry.C
DataEntryNew.C
\*---------------------------------------------------------------------------*/
@ -172,7 +172,7 @@ public:
#ifdef NoRepository
# include "DataEntry.C"
# include "NewDataEntry.C"
# include "DataEntryNew.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -79,6 +79,6 @@ const Foam::dictionary& Foam::DispersionModel<CloudType>::dict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewDispersionModel.C"
#include "DispersionModelNew.C"
// ************************************************************************* //

View File

@ -78,7 +78,7 @@ Foam::scalar Foam::DragModel<CloudType>::utc
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewDragModel.C"
#include "DragModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
DragModel.C
NewDragModel.C
DragModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -454,6 +454,6 @@ void Foam::InjectionModel<CloudType>::info(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewInjectionModel.C"
#include "InjectionModelNew.C"
// ************************************************************************* //

View File

@ -41,7 +41,7 @@ Description
SourceFiles
InjectionModel.C
NewInjectionModel.C
InjectionModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -149,7 +149,7 @@ Foam::PatchInteractionModel<CloudType>::coeffDict() const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewPatchInteractionModel.C"
#include "PatchInteractionModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
PatchInteractionModel.C
NewPatchInteractionModel.C
PatchInteractionModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -71,6 +71,6 @@ void Foam::PostProcessingModel<CloudType>::post()
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewPostProcessingModel.C"
#include "PostProcessingModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
PostProcessingModel.C
NewPostProcessingModel.C
PostProcessingModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -186,6 +186,6 @@ void Foam::SurfaceFilmModel<CloudType>::setParcelProperties
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "NewSurfaceFilmModel.C"
#include "SurfaceFilmModelNew.C"
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ Description
SourceFiles
SurfaceFilmModel.C
NewSurfaceFilmModel.C
SurfaceFilmModelNew.C
\*---------------------------------------------------------------------------*/

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