BUG: avoid duplicate ensight surface mesh/geometries (issue #167)

- ensight does supports geometry in a separate file, but for the
  surface writer we claim that this is not true. This allows
  the field writers to control where the mesh/case files land.

  With 'true', the uncollated output would incidentally create
  things like this:

  Previous (w/ fields)        | Now (w/ fields)
  ----------------------------+----------------------
    0.05/surf.case            |
    0.05/surf.mesh            |
    0.05/p/surf.case          |  0.05/p/surf.case
    0.05/p/surf.mesh          |  0.05/p/surf.mesh
    0.05/p/surf.0000.p        |  0.05/p/surf.0000.p

  Previous (w/o fields)       | Now (w/o fields)
  ----------------------------+----------------------
    0.05/surf.case            | 0.05/surf.mesh
    0.05/surf.case            | 0.05/surf.mesh

  Move the separateGeometry() flag to the *.C code, where it is less
  likely to be mistakenly altered.
This commit is contained in:
Mark Olesen
2016-06-29 23:11:27 +02:00
parent b2234f19e5
commit a4f6836f3e
2 changed files with 12 additions and 4 deletions

View File

@ -68,6 +68,17 @@ Foam::ensightSurfaceWriter::~ensightSurfaceWriter()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Note that ensight does supports geometry in a separate file,
// but setting this true leaves mesh files in the wrong places
// (when there are fields).
//
// Make this false to let the field writers take back control
bool Foam::ensightSurfaceWriter::separateGeometry() const
{
return false;
}
Foam::fileName Foam::ensightSurfaceWriter::write
(
const fileName& outputDir,

View File

@ -126,10 +126,7 @@ public:
//- True if the surface format supports geometry in a separate file.
// False if geometry and field must be in a single file
virtual bool separateGeometry() const
{
return !collateTimes_;
}
virtual bool separateGeometry() const;
//- Write single surface geometry to file.