ENH: expand data mask for foamToEnsight (issue #231)

- Default is a width of 8 characters, but this can be extended up to 31
  characters via the '-width' command-line option.

- Now use a similar structure as foamToEnsightParts for the masking.
  This reduces the clutter within the directory, makes it easier to
  selectively delete some time steps (using shell commands).

- Added in a "time" information data in each sub-directory to
  make it possible to reconstruct the case file with an external
  script.

- Conversion of cloud data should now also work in parallel
  (may need more testing).

- Support binary output for cloud data.

- Better avoidance of illegal ensight variable names.
  But still partially incomplete (due to patch fields).

==================================================
Example of NEW file structure:

    EnSight/verticalChannel.case        # case name
    EnSight/geometry                    # for non-moving geometry

    EnSight/data/                       # time-varying data
    EnSight/data/00000000/
    EnSight/data/00000001/
    ...

  Fields are stored by name within the data/********/ directories:

    EnSight/data/00000001/time          # human-readable time info
    EnSight/data/00000001/U
    EnSight/data/00000001/p
    ...
    EnSight/data/00000001/geometry      # for moving geometry

  Clouds are stored at the next sub-directory level:

    EnSight/data/00000001/lagrangian/<cloudName>/positions
    EnSight/data/00000001/lagrangian/<cloudName>/U
    ...

==================================================
The old structure was significantly more cluttered:

    EnSight/verticalChannel.case
    EnSight/verticalChannel.0000.mesh
    EnSight/verticalChannel.0001.p
    EnSight/verticalChannel.0001.<cloudName>
    EnSight/verticalChannel.0001.<cloudName>.U

==================================================
This commit is contained in:
Mark Olesen
2016-09-13 18:26:00 +02:00
parent d56924624b
commit 9de4a75813
21 changed files with 844 additions and 833 deletions

View File

@ -51,17 +51,17 @@ class ensightBinaryStream
{
// Private data
//- Description of data_
//- Output file stream
autoPtr<std::ofstream> str_;
// Private Member Functions
//- Disallow default bitwise copy construct
ensightBinaryStream(const ensightBinaryStream&);
ensightBinaryStream(const ensightBinaryStream&) = delete;
//- Disallow default bitwise assignment
void operator=(const ensightBinaryStream&);
void operator=(const ensightBinaryStream&) = delete;
public:
@ -69,7 +69,7 @@ public:
// Constructors
//- Construct from components
ensightBinaryStream(const fileName& f, const Time&)
ensightBinaryStream(const fileName& f)
:
ensightStream(f),
str_
@ -90,11 +90,6 @@ public:
// Member Functions
virtual bool ascii() const
{
return false;
}
virtual void write(const char* val)
{
char buffer[80];
@ -141,14 +136,6 @@ public:
write(partI);
}
// Member Operators
// Friend Functions
// Friend Operators
// IOstream Operators
};