BUG: surfMesh.write() not working with AUTO_WRITE off

- add writeObject method
This commit is contained in:
Mark Olesen
2016-12-01 15:15:50 +01:00
parent 46e396af49
commit da78cba7da
2 changed files with 25 additions and 4 deletions

View File

@ -186,7 +186,7 @@ public:
// Member Functions
// Database
// Database
//- Return the local mesh directory (dbDir()/meshSubDir)
fileName meshDir() const;
@ -210,7 +210,7 @@ public:
void setWriteOption(IOobject::writeOption);
// Access
// Access
//- Return the number of raw points
virtual label nPoints() const;
@ -270,7 +270,6 @@ public:
// time directories
virtual readUpdateState readUpdate();
//- Update the mesh corresponding to given map
//- Remove surface zones
void removeZones();
@ -298,16 +297,27 @@ public:
void transfer(MeshedSurface<face>&);
// Writing
//- Avoid masking the normal objectRegistry write
using surfaceRegistry::write;
//- Write all components using given format, version and compression
virtual bool writeObject
(
IOstream::streamFormat fmt,
IOstream::versionNumber ver,
IOstream::compressionType cmp
) const;
//- Write to file
static void write(const fileName&, const surfMesh&);
//- Write to file
void write(const fileName&);
// Storage management
// Storage management
//- Transfer contents to the Xfer container as a MeshedSurface
Xfer<MeshedSurface<face>> xfer();

View File

@ -200,4 +200,15 @@ Foam::surfMesh::readUpdateState Foam::surfMesh::readUpdate()
}
bool Foam::surfMesh::writeObject
(
IOstream::streamFormat fmt,
IOstream::versionNumber ver,
IOstream::compressionType cmp
) const
{
return Allocator::writeObject(fmt, ver, cmp);
}
// ************************************************************************* //