Added calls to the 'setUpToDate' function for the caching mechanism.

This commit is contained in:
henry
2009-03-12 21:53:05 +00:00
parent c271c97a7e
commit abafef4a02
3 changed files with 23 additions and 13 deletions

View File

@ -156,7 +156,7 @@ bool Foam::regIOobject::checkOut()
} }
bool Foam::regIOobject::uptodate(const word& a) const bool Foam::regIOobject::upToDate(const word& a) const
{ {
if (db().lookupObject<regIOobject>(a).eventNo() >= eventNo_) if (db().lookupObject<regIOobject>(a).eventNo() >= eventNo_)
{ {
@ -169,7 +169,7 @@ bool Foam::regIOobject::uptodate(const word& a) const
} }
bool Foam::regIOobject::uptodate(const word& a, const word& b) const bool Foam::regIOobject::upToDate(const word& a, const word& b) const
{ {
if if
( (
@ -186,7 +186,7 @@ bool Foam::regIOobject::uptodate(const word& a, const word& b) const
} }
bool Foam::regIOobject::uptodate bool Foam::regIOobject::upToDate
( (
const word& a, const word& a,
const word& b, const word& b,
@ -209,7 +209,7 @@ bool Foam::regIOobject::uptodate
} }
bool Foam::regIOobject::uptodate bool Foam::regIOobject::upToDate
( (
const word& a, const word& a,
const word& b, const word& b,
@ -234,8 +234,8 @@ bool Foam::regIOobject::uptodate
} }
//- Flag me as uptodate //- Flag me as up to date
void Foam::regIOobject::setUptodate() void Foam::regIOobject::setUpToDate()
{ {
eventNo_ = db().getEvent(); eventNo_ = db().getEvent();
} }

View File

@ -154,14 +154,20 @@ public:
inline label& eventNo(); inline label& eventNo();
//- Am I uptodate with respect to other regIOobjects //- Am I uptodate with respect to other regIOobjects
bool uptodate(const word&) const; bool upToDate(const word&) const;
bool uptodate(const word&, const word&) const; bool upToDate(const word&, const word&) const;
bool uptodate(const word&, const word&, const word&) const; bool upToDate(const word&, const word&, const word&) const;
bool uptodate(const word&, const word&, const word&, const word&) bool upToDate
const; (
const word&,
const word&,
const word&,
const word&
) const;
//- Flag me as up to date
void setUpToDate();
//- Flag me as uptodate
void setUptodate();
// Edit // Edit

View File

@ -649,6 +649,7 @@ typename
Foam::GeometricField<Type, PatchField, GeoMesh>::DimensionedInternalField& Foam::GeometricField<Type, PatchField, GeoMesh>::DimensionedInternalField&
Foam::GeometricField<Type, PatchField, GeoMesh>::dimensionedInternalField() Foam::GeometricField<Type, PatchField, GeoMesh>::dimensionedInternalField()
{ {
this->setUpToDate();
storeOldTimes(); storeOldTimes();
return *this; return *this;
} }
@ -659,6 +660,7 @@ typename
Foam::GeometricField<Type, PatchField, GeoMesh>::InternalField& Foam::GeometricField<Type, PatchField, GeoMesh>::InternalField&
Foam::GeometricField<Type, PatchField, GeoMesh>::internalField() Foam::GeometricField<Type, PatchField, GeoMesh>::internalField()
{ {
this->setUpToDate();
storeOldTimes(); storeOldTimes();
return *this; return *this;
} }
@ -670,6 +672,7 @@ typename
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField& Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField&
Foam::GeometricField<Type, PatchField, GeoMesh>::boundaryField() Foam::GeometricField<Type, PatchField, GeoMesh>::boundaryField()
{ {
this->setUpToDate();
storeOldTimes(); storeOldTimes();
return boundaryField_; return boundaryField_;
} }
@ -822,6 +825,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
void Foam::GeometricField<Type, PatchField, GeoMesh>:: void Foam::GeometricField<Type, PatchField, GeoMesh>::
correctBoundaryConditions() correctBoundaryConditions()
{ {
this->setUpToDate();
storeOldTimes(); storeOldTimes();
boundaryField_.evaluate(); boundaryField_.evaluate();
} }