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