ZoneList: Empty ZoneLists are no longer written
This commit is contained in:
@ -492,6 +492,26 @@ bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
template<class ZoneType, class ZonesType, class MeshType>
|
||||
bool Foam::ZoneList<ZoneType, ZonesType, MeshType>::writeObject
|
||||
(
|
||||
IOstream::streamFormat fmt,
|
||||
IOstream::versionNumber ver,
|
||||
IOstream::compressionType cmp,
|
||||
const bool write
|
||||
) const
|
||||
{
|
||||
if (this->size())
|
||||
{
|
||||
return regIOobject::writeObject(fmt, ver, cmp, write);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class ZoneType, class ZonesType, class MeshType>
|
||||
|
||||
@ -165,7 +165,17 @@ public:
|
||||
bool readIfPresent();
|
||||
|
||||
//- writeData member function required by regIOobject
|
||||
bool writeData(Ostream&) const;
|
||||
virtual bool writeData(Ostream&) const;
|
||||
|
||||
//- Write using given format, version and compression
|
||||
// Only write the zones file if there are zones in the list
|
||||
virtual bool writeObject
|
||||
(
|
||||
IOstream::streamFormat,
|
||||
IOstream::versionNumber,
|
||||
IOstream::compressionType,
|
||||
const bool write
|
||||
) const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
Reference in New Issue
Block a user