Merge branch 'master' into cvm

This commit is contained in:
graham
2009-10-21 14:44:13 +01:00
37 changed files with 153 additions and 116 deletions

View File

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
Info<< "p.eventNo:" << p.eventNo() << endl; Info<< "p.eventNo:" << p.eventNo() << endl;
Info<< "p.uptodate:" << p.upToDate("T")<< endl; Info<< "p.uptodate:" << p.upToDate(T)<< endl;
// Change T and mark as uptodate. // Change T and mark as uptodate.
Info<< "Changing T" << endl; Info<< "Changing T" << endl;
@ -84,12 +84,12 @@ int main(int argc, char *argv[])
Info<< "T.eventNo:" << T.eventNo() << endl; Info<< "T.eventNo:" << T.eventNo() << endl;
// Check p dependency: // Check p dependency:
Info<< "p.uptodate:" << p.upToDate("T")<< endl; Info<< "p.uptodate:" << p.upToDate(T)<< endl;
// Change p and mark as uptodate. // Change p and mark as uptodate.
Info<< "Changing p." << endl; Info<< "Changing p." << endl;
p.setUpToDate(); p.setUpToDate();
Info<< "p.uptodate:" << p.upToDate("T")<< endl; Info<< "p.uptodate:" << p.upToDate(T)<< endl;
Info<< "p.eventNo:" << p.eventNo() << endl; Info<< "p.eventNo:" << p.eventNo() << endl;

View File

@ -53,7 +53,7 @@ Description
#include "removePoints.H" #include "removePoints.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
using namespace Foam; using namespace Foam;

View File

@ -49,7 +49,7 @@ Description
#include "cellSet.H" #include "cellSet.H"
#include "cellModeller.H" #include "cellModeller.H"
#include "meshCutter.H" #include "meshCutter.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "geomCellLooper.H" #include "geomCellLooper.H"
#include "plane.H" #include "plane.H"
#include "edgeVertex.H" #include "edgeVertex.H"

View File

@ -43,7 +43,7 @@ Description
#include "symmetryPolyPatch.H" #include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H" #include "wedgePolyPatch.H"
#include "cyclicPolyPatch.H" #include "cyclicPolyPatch.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
using namespace Foam; using namespace Foam;

View File

@ -59,7 +59,7 @@ Usage
#include "Time.H" #include "Time.H"
#include "timeSelector.H" #include "timeSelector.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "polyTopoChange.H" #include "polyTopoChange.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "PackedBoolList.H" #include "PackedBoolList.H"

View File

@ -33,7 +33,7 @@ Description
#include "IOmanip.H" #include "IOmanip.H"
#include "boundBox.H" #include "boundBox.H"
#include "Map.H" #include "Map.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
#include "wedge.H" #include "wedge.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -33,7 +33,7 @@ Description
#include "Time.H" #include "Time.H"
#include "boundaryMesh.H" #include "boundaryMesh.H"
#include "repatchPolyTopoChanger.H" #include "repatchPolyTopoChanger.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "OFstream.H" #include "OFstream.H"
#include "ListOps.H" #include "ListOps.H"

View File

@ -173,9 +173,9 @@ bool Foam::regIOobject::checkOut()
} }
bool Foam::regIOobject::upToDate(const word& a) const bool Foam::regIOobject::upToDate(const regIOobject& a) const
{ {
if (db().lookupObject<regIOobject>(a).eventNo() >= eventNo_) if (a.eventNo() >= eventNo_)
{ {
return false; return false;
} }
@ -186,12 +186,16 @@ bool Foam::regIOobject::upToDate(const word& a) const
} }
bool Foam::regIOobject::upToDate(const word& a, const word& b) const bool Foam::regIOobject::upToDate
(
const regIOobject& a,
const regIOobject& b
) const
{ {
if if
( (
db().lookupObject<regIOobject>(a).eventNo() >= eventNo_ a.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(b).eventNo() >= eventNo_ || b.eventNo() >= eventNo_
) )
{ {
return false; return false;
@ -205,16 +209,16 @@ bool Foam::regIOobject::upToDate(const word& a, const word& b) const
bool Foam::regIOobject::upToDate bool Foam::regIOobject::upToDate
( (
const word& a, const regIOobject& a,
const word& b, const regIOobject& b,
const word& c const regIOobject& c
) const ) const
{ {
if if
( (
db().lookupObject<regIOobject>(a).eventNo() >= eventNo_ a.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(b).eventNo() >= eventNo_ || b.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(c).eventNo() >= eventNo_ || c.eventNo() >= eventNo_
) )
{ {
return false; return false;
@ -228,18 +232,18 @@ bool Foam::regIOobject::upToDate
bool Foam::regIOobject::upToDate bool Foam::regIOobject::upToDate
( (
const word& a, const regIOobject& a,
const word& b, const regIOobject& b,
const word& c, const regIOobject& c,
const word& d const regIOobject& d
) const ) const
{ {
if if
( (
db().lookupObject<regIOobject>(a).eventNo() >= eventNo_ a.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(b).eventNo() >= eventNo_ || b.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(c).eventNo() >= eventNo_ || c.eventNo() >= eventNo_
|| db().lookupObject<regIOobject>(d).eventNo() >= eventNo_ || d.eventNo() >= eventNo_
) )
{ {
return false; return false;

View File

@ -154,19 +154,38 @@ public:
//- Event number at last update. //- Event number at last update.
inline label& eventNo(); inline label& eventNo();
//- Am I uptodate with respect to other regIOobjects //- Return true if up-to-date with respect to given object
bool upToDate(const word&) const; // otherwise false
bool upToDate(const word&, const word&) const; bool upToDate(const regIOobject&) const;
bool upToDate(const word&, const word&, const word&) const;
//- Return true if up-to-date with respect to given objects
// otherwise false
bool upToDate bool upToDate
( (
const word&, const regIOobject&,
const word&, const regIOobject&
const word&,
const word&
) const; ) const;
//- Flag me as up to date //- Return true if up-to-date with respect to given objects
// otherwise false
bool upToDate
(
const regIOobject&,
const regIOobject&,
const regIOobject&
) const;
//- Return true if up-to-date with respect to given objects
// otherwise false
bool upToDate
(
const regIOobject&,
const regIOobject&,
const regIOobject&,
const regIOobject&
) const;
//- Set up to date (obviously)
void setUpToDate(); void setUpToDate();

View File

@ -26,7 +26,7 @@ Namespace
Foam::constant::mathematical Foam::constant::mathematical
Description Description
mathematical constants and conversion functions mathematical constants.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -60,20 +60,6 @@ namespace mathematical
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Conversion from degrees to radians
inline scalar degToRad(const scalar& deg)
{
return (deg*constant::mathematical::pi/180.0);
}
//- Conversion from radians to degrees
inline scalar radToDeg(const scalar& rad)
{
return (rad*180.0/constant::mathematical::pi);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,67 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
Namespace
Foam
Description
Unit conversion functions
\*---------------------------------------------------------------------------*/
#ifndef unitConversion_H
#define unitConversion_H
#include "mathematicalConstants.H"
using namespace Foam::constant::mathematical;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Conversion from degrees to radians
inline scalar degToRad(const scalar& deg)
{
return (deg*pi/180.0);
}
//- Conversion from radians to degrees
inline scalar radToDeg(const scalar& rad)
{
return (rad*180.0/pi);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -27,7 +27,7 @@ License
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "ListOps.H" #include "ListOps.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "SortableList.H" #include "SortableList.H"

View File

@ -31,10 +31,7 @@ Description
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "cell.H" #include "cell.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -27,7 +27,7 @@ License
#include "topoCellLooper.H" #include "topoCellLooper.H"
#include "cellFeatures.H" #include "cellFeatures.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "DynamicList.H" #include "DynamicList.H"
#include "ListOps.H" #include "ListOps.H"
#include "meshTools.H" #include "meshTools.H"

View File

@ -32,7 +32,7 @@ License
#include "cellCuts.H" #include "cellCuts.H"
#include "splitCell.H" #include "splitCell.H"
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "meshTools.H" #include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -27,7 +27,7 @@ License
#include "polyMeshGeometry.H" #include "polyMeshGeometry.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "syncTools.H" #include "syncTools.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
namespace Foam namespace Foam
{ {

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "engineTime.H" #include "engineTime.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -52,7 +52,6 @@ void Foam::fvSchemes::clear()
defaultLaplacianScheme_.clear(); defaultLaplacianScheme_.clear();
fluxRequired_.clear(); fluxRequired_.clear();
defaultFluxRequired_ = false; defaultFluxRequired_ = false;
cacheFields_.clear();
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -169,15 +168,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
tokenList() tokenList()
)() )()
), ),
defaultFluxRequired_(false), defaultFluxRequired_(false)
cacheFields_
(
ITstream
(
objectPath() + "::cacheFields",
tokenList()
)()
)
{ {
read(); read();
} }
@ -381,11 +372,6 @@ bool Foam::fvSchemes::read()
} }
} }
if (dict.found("cacheFields"))
{
cacheFields_ = dict.subDict("cacheFields");
}
return true; return true;
} }
else else
@ -563,22 +549,4 @@ bool Foam::fvSchemes::fluxRequired(const word& name) const
} }
bool Foam::fvSchemes::cache(const word& name) const
{
if (debug)
{
Info<< "Lookup cache for " << name << endl;
}
if (cacheFields_.found(name))
{
return true;
}
else
{
return false;
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -79,8 +79,6 @@ class fvSchemes
dictionary fluxRequired_; dictionary fluxRequired_;
bool defaultFluxRequired_; bool defaultFluxRequired_;
dictionary cacheFields_;
// Private Member Functions // Private Member Functions
@ -128,8 +126,6 @@ public:
bool fluxRequired(const word& name) const; bool fluxRequired(const word& name) const;
bool cache(const word& name) const;
// Read // Read

View File

@ -32,7 +32,7 @@ Description
#include "surfaceFields.H" #include "surfaceFields.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "coupledFvPatch.H" #include "coupledFvPatch.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -27,7 +27,7 @@ License
#include "multiHoleInjector.H" #include "multiHoleInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "Random.H" #include "Random.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam

View File

@ -41,7 +41,7 @@ License
#include "symmetryPolyPatch.H" #include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H" #include "wedgePolyPatch.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
#include "blobsSwirlInjector.H" #include "blobsSwirlInjector.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -34,7 +34,7 @@ Description
#include "removePoints.H" #include "removePoints.H"
#include "pointFields.H" #include "pointFields.H"
#include "motionSmoother.H" #include "motionSmoother.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "pointSet.H" #include "pointSet.H"
#include "faceSet.H" #include "faceSet.H"
#include "cellSet.H" #include "cellSet.H"

View File

@ -35,6 +35,7 @@ License
#include "refinementSurfaces.H" #include "refinementSurfaces.H"
#include "shellSurfaces.H" #include "shellSurfaces.H"
#include "mapDistributePolyMesh.H" #include "mapDistributePolyMesh.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
#include "layerParameters.H" #include "layerParameters.H"
#include "polyBoundaryMesh.H" #include "polyBoundaryMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "refinementSurfaces.H" #include "refinementSurfaces.H"
#include "searchableSurfaces.H" #include "searchableSurfaces.H"
#include "regExp.H" #include "regExp.H"

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "refinementParameters.H" #include "refinementParameters.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "globalIndex.H" #include "globalIndex.H"

View File

@ -37,7 +37,7 @@ License
#include "searchableSurfaces.H" #include "searchableSurfaces.H"
#include "polyMeshGeometry.H" #include "polyMeshGeometry.H"
#include "IOmanip.H" #include "IOmanip.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -25,7 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "arcEdge.H" #include "arcEdge.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,11 +26,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "cellQuality.H" #include "cellQuality.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from mesh
Foam::cellQuality::cellQuality(const polyMesh& mesh) Foam::cellQuality::cellQuality(const polyMesh& mesh)
: :
mesh_(mesh) mesh_(mesh)

View File

@ -26,7 +26,7 @@ License
#include "toroidalCS.H" #include "toroidalCS.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
#include "primitiveMeshGeometry.H" #include "primitiveMeshGeometry.H"
#include "pyramidPointFaceRef.H" #include "pyramidPointFaceRef.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -26,7 +26,7 @@ License
#include "shapeToCell.H" #include "shapeToCell.H"
#include "polyMesh.H" #include "polyMesh.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "hexMatcher.H" #include "hexMatcher.H"
#include "cellFeatures.H" #include "cellFeatures.H"

View File

@ -36,7 +36,7 @@ License
#include "meshTools.H" #include "meshTools.H"
#include "plane.H" #include "plane.H"
#include "Random.H" #include "Random.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
#include "treeBoundBox.H" #include "treeBoundBox.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -33,7 +33,7 @@ License
#include "linePointRef.H" #include "linePointRef.H"
#include "OFstream.H" #include "OFstream.H"
#include "IFstream.H" #include "IFstream.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -43,7 +43,7 @@ Description
#include "cellShape.H" #include "cellShape.H"
#include "cellModeller.H" #include "cellModeller.H"
#include "mergePoints.H" #include "mergePoints.H"
#include "mathematicalConstants.H" #include "unitConversion.H"
using namespace Foam; using namespace Foam;