Commit a4f6836f authored by Mark Olesen's avatar Mark Olesen
Browse files

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.
parent b2234f19
......@@ -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,
......
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment