56#ifndef Foam_ensightSurfaceReader_H
57#define Foam_ensightSurfaceReader_H
151 const word& expected,
152 const string& buffer,
161 static void readFrom(
const std::string& buffer, Type& value);
186 const word& fieldName,
195 const label fieldIndex
243 const label fieldIndex,
251 const label fieldIndex,
259 const label fieldIndex,
267 const label fieldIndex,
275 const label fieldIndex,
288 #include "ensightSurfaceReader.txx"
streamFormat
Data format (ascii | binary | coherent).
Generic input stream using a standard (STL) stream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An ordered pair of two objects of type <T> with first() and second() elements.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A variant of IFstream with specialised handling for Ensight reading of strings, integers and floats (...
Ensight format surface reader.
static bool readLine(ISstream &is, std::string &line)
Helper function to read an ascii line from file, skipping blank lines and comments.
virtual instantList times() const
Return a list of the available times.
static void checkSection(const word &expected, const string &buffer, const ISstream &is)
Check a section header.
Pair< idTypes > readGeometryHeader(ensightReadFile &is) const
Read (and discard) geometry file header.
label timeIncrement_
Time increment.
instantList timeValues_
Times.
labelList fileNumbers_
Numbers for files.
Tuple2< ensightFaces::elemType, label > faceInfoTuple
Tuple of face type (tria3, quad4, nsided) and count.
bool masterOnly_
Read on master and broadcast (in parallel).
labelPair meshTimeset_
The timeset/fileset (if any) associated with the mesh.
idTypes
Handling of node/element id types (off, assign, ignore, given).
@ GIVEN
Use "given" values (not supported).
@ IGNORE
Read but "ignore".
void readCase(ISstream &is)
Read the case file.
static void debugSection(const word &expected, ISstream &is)
Read and check a section header.
fileName baseDir_
Base directory.
List< word > fieldNames_
Field names.
autoPtr< meshedSurface > surfPtr_
Pointer to the surface.
TypeName("ensight")
Runtime type information.
List< labelPair > fieldTimesets_
The timeset/fileset (if any) associated with fields.
meshedSurface readGeometry(const fileName &geometryFile, const label timeIndex=0)
Read and return surface geometry. Updates faceTypeInfo_.
tmp< Field< Type > > readField(const label timeIndex, const label fieldIndex) const
Helper function to return a field.
virtual const meshedSurface & geometry(const label timeIndex)
Return a reference to the surface geometry.
label timeStartIndex_
Start time index.
IOstreamOption::streamFormat readFormat_
Format flag.
List< faceInfoTuple > faceTypeInfo_
List of face-type/count tuples.
virtual ~ensightSurfaceReader()=default
Destructor.
List< string > fieldFileNames_
Field file names.
void operator=(const ensightSurfaceReader &)=delete
No copy assignment.
ensightSurfaceReader(const ensightSurfaceReader &)=delete
No copy construct.
fileName meshFileName_
Name of mesh file, including any subdirectory.
virtual wordList fieldNames(const label timeIndex) const
Return a list of the available fields at a given time.
static void readFrom(const std::string &buffer, Type &value)
Helper function to return Type from string.
tmp< Field< Type > > readField(const fileName &dataFile, const word &fieldName, const label timeIndex=0) const
Helper function to return a field.
A class for handling file names.
A traits class, which is primarily used for primitives and vector-space.
Abstract base class for surface readers with fields.
surfaceReader(const fileName &fName)
Construct from fileName.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
Pair< label > labelPair
A pair of labels.
List< word > wordList
List of word.
List< label > labelList
A List of labels.
List< instant > instantList
List of instants.
MeshedSurface< face > meshedSurface
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.