ENH: change location of static ensight geometry (#2079)

Historically the "geometry" for static meshes was placed under
directly in the EnSight case directory.

Eg,

     ensight/ensight.case
     ensight/geometry
     ensight/data/000001
     ensight/data/000002 ...

This generally works ok, but relocating it to a constant data directory
Eg
     ensight/ensight.case
     ensight/data/constant/geometry
     ensight/data/000001
     ensight/data/000002 ...

Improves handling and avoids potential collisions when adding in
additional mesh regions
This commit is contained in:
Mark Olesen
2021-04-29 19:10:58 +02:00
parent 0a78e685ee
commit 4d14c95567
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2020 OpenCFD Ltd.
Copyright (C) 2016-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -522,10 +522,10 @@ void Foam::ensightCase::write() const
if (staticGeom)
{
// Steady
// Static mesh: store under data/constant/geometry
*os_
<< setw(16) << "model:"
<< geometryName
<< (dataDirName/word("constant")/geometryName).c_str()
<< nl;
}
else if (meshIndex >= 0)
@ -681,13 +681,13 @@ Foam::ensightCase::newGeometry
{
// Moving mesh: write as "data/********/geometry"
path = dataDir()/padded(timeIndex_);
mkDir(path);
}
else
{
// Static mesh: write as "geometry"
path = ensightDir_;
// Static mesh: write as "data/constant/geometry"
path = dataDir()/word("constant");
}
mkDir(path);
noteGeometry(moving); // note for later use

View File

@ -74,10 +74,10 @@ public:
// Public Data
//- The name for "data" subdirectory
//- The name for data subdirectory: "data"
static const char* dataDirName;
//- The name for geometry files
//- The name for geometry files: "geometry"
static const char* geometryName;