GeometricField: Register oldTime fields only if the parent field is registered

This commit is contained in:
Henry
2013-03-26 15:05:24 +00:00
parent c7c7553ed0
commit 511083a77e

View File

@ -146,7 +146,8 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readOldTimeIfPresent()
this->time().timeName(),
this->db(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
IOobject::AUTO_WRITE,
this->registerObject()
);
if (field0.headerOk())
@ -761,7 +762,10 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::oldTime() const
(
this->name() + "_0",
this->time().timeName(),
this->db()
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
this->registerObject()
),
*this
);