mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
longstanding bug?? - changed odd read option in GeometricField::readOldTimeIfPresent
This commit is contained in:
@ -105,18 +105,15 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
|
|||||||
(
|
(
|
||||||
"GeometricField<Type, PatchField, GeoMesh>::readIfPresent()"
|
"GeometricField<Type, PatchField, GeoMesh>::readIfPresent()"
|
||||||
) << "read option IOobject::MUST_READ "
|
) << "read option IOobject::MUST_READ "
|
||||||
<< "suggests that a read constuctor for field " << this->name()
|
<< "suggests that a read constructor for field " << this->name()
|
||||||
<< " would be more appropriate." << endl;
|
<< " would be more appropriate." << endl;
|
||||||
}
|
}
|
||||||
else if (this->readOpt() == IOobject::READ_IF_PRESENT)
|
else if (this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
|
||||||
{
|
|
||||||
if (this->headerOk())
|
|
||||||
{
|
{
|
||||||
boundaryField_.transfer(readField(this->readStream(typeName))());
|
boundaryField_.transfer(readField(this->readStream(typeName))());
|
||||||
this->close();
|
this->close();
|
||||||
|
|
||||||
// Check compatibility between field and mesh
|
// Check compatibility between field and mesh
|
||||||
|
|
||||||
if (this->size() != GeoMesh::size(this->mesh()))
|
if (this->size() != GeoMesh::size(this->mesh()))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
@ -134,7 +131,6 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -149,7 +145,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readOldTimeIfPresent()
|
|||||||
this->name() + "_0",
|
this->name() + "_0",
|
||||||
this->time().timeName(),
|
this->time().timeName(),
|
||||||
this->db(),
|
this->db(),
|
||||||
IOobject::MUST_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user