Skip to content
Snippets Groups Projects
Commit 4d14c955 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

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
parent 0a78e685
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2021 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -522,10 +522,10 @@ void Foam::ensightCase::write() const ...@@ -522,10 +522,10 @@ void Foam::ensightCase::write() const
if (staticGeom) if (staticGeom)
{ {
// Steady // Static mesh: store under data/constant/geometry
*os_ *os_
<< setw(16) << "model:" << setw(16) << "model:"
<< geometryName << (dataDirName/word("constant")/geometryName).c_str()
<< nl; << nl;
} }
else if (meshIndex >= 0) else if (meshIndex >= 0)
...@@ -681,13 +681,13 @@ Foam::ensightCase::newGeometry ...@@ -681,13 +681,13 @@ Foam::ensightCase::newGeometry
{ {
// Moving mesh: write as "data/********/geometry" // Moving mesh: write as "data/********/geometry"
path = dataDir()/padded(timeIndex_); path = dataDir()/padded(timeIndex_);
mkDir(path);
} }
else else
{ {
// Static mesh: write as "geometry" // Static mesh: write as "data/constant/geometry"
path = ensightDir_; path = dataDir()/word("constant");
} }
mkDir(path);
noteGeometry(moving); // note for later use noteGeometry(moving); // note for later use
......
...@@ -74,10 +74,10 @@ public: ...@@ -74,10 +74,10 @@ public:
// Public Data // Public Data
//- The name for "data" subdirectory //- The name for data subdirectory: "data"
static const char* dataDirName; static const char* dataDirName;
//- The name for geometry files //- The name for geometry files: "geometry"
static const char* geometryName; static const char* geometryName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment