mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use IOstreamOption for writeObject() calls.
- reduces the number of parameters that are being passed around and allows future additions into the IOstreamOption with mininal effort.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -4835,9 +4835,7 @@ void Foam::distributedTriSurfaceMesh::distribute
|
||||
|
||||
bool Foam::distributedTriSurfaceMesh::writeObject
|
||||
(
|
||||
IOstream::streamFormat fmt,
|
||||
IOstream::versionNumber ver,
|
||||
IOstream::compressionType cmp,
|
||||
IOstreamOption streamOpt,
|
||||
const bool valid
|
||||
) const
|
||||
{
|
||||
@ -4871,7 +4869,8 @@ bool Foam::distributedTriSurfaceMesh::writeObject
|
||||
}
|
||||
|
||||
// Dictionary needs to be written in ascii - binary output not supported.
|
||||
bool ok = dict_.writeObject(IOstream::ASCII, ver, cmp, true);
|
||||
streamOpt.format(IOstream::ASCII);
|
||||
bool ok = dict_.writeObject(streamOpt, true);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -577,16 +577,14 @@ public:
|
||||
|
||||
// regIOobject implementation
|
||||
|
||||
//- Write using given format, version and compression
|
||||
//- Write using stream options
|
||||
// Do not use the triSurfaceMesh::writeObject since it
|
||||
// would filter out empty regions. These need to be preserved
|
||||
// in case we want to make decisions based on the number of
|
||||
// regions.
|
||||
virtual bool writeObject
|
||||
(
|
||||
IOstream::streamFormat fmt,
|
||||
IOstream::versionNumber ver,
|
||||
IOstream::compressionType cmp,
|
||||
IOstreamOption streamOpt,
|
||||
const bool valid
|
||||
) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user