Go to the documentation of this file.
44 namespace surfaceWriters
55 void Foam::surfaceWriters::ensightWriter::printTimeset
59 const scalar timeValue
63 <<
"time set: " << ts <<
nl
64 <<
"number of steps: " << 1 <<
nl;
67 os <<
"filename start number: 0" <<
nl
68 <<
"filename increment: 1" <<
nl
69 <<
"time values:" <<
nl;
76 void Foam::surfaceWriters::ensightWriter::printTimeset
80 const UList<scalar>&
values
86 <<
"time set: " << ts <<
nl
87 <<
"number of steps: " <<
values.size() <<
nl;
90 os <<
"filename start number: 0" <<
nl
91 <<
"filename increment: 1" <<
nl;
94 os <<
"time values:" <<
nl;
96 for (
const scalar& val :
values)
105 os <<
' ' <<
setf(ios_base::right) <<
setw(12) << val;
111 void Foam::surfaceWriters::ensightWriter::printTimeset
115 const UList<scalar>&
values,
116 const bitSet& indices
125 || (indices.size() ==
values.size() && indices.all())
136 <<
"time set: " << ts <<
nl
137 <<
"number of steps: " << indices.count() <<
nl;
140 os <<
"filename numbers:" <<
nl;
142 for (
const label& idx : indices)
151 os <<
' ' <<
setf(ios_base::right) <<
setw(8) << idx;
156 os <<
"time values:" <<
nl;
158 for (
const label& idx : indices)
180 caching_(
"fieldsDict")
194 collateTimes_(options.
getOrDefault(
"collateTimes",
true)),
195 caching_(
"fieldsDict")
209 open(surf, outputPath, parallel);
224 open(
points, faces, outputPath, parallel);
259 return writeUncollated();
274 const word& fieldName,
280 return writeCollated(fieldName, localValues);
284 return writeUncollated(fieldName, localValues);
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
ensightWriter()
Default construct.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
scalar timeValue() const
The current time value/name.
A class for handling words, derived from Foam::string.
Base class for surface writers.
A class for handling file names.
defineTypeName(abaqusWriter)
A surfaceWriter for Ensight format.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
An IOstream is an abstract base class for all input/output systems; be they streams,...
Abstract definition of a meshed surface defined by faces and points.
defineSurfaceWriterWriteFields(Foam::surfaceWriters::ensightWriter)
Convenience macros for instantiating surfaceWriter methods.
virtual fileName write()
Write surface geometry to file.
addToRunTimeSelectionTable(surfaceWriter, abaqusWriter, word)
ensightWriter(const meshedSurf &surf, const fileName &outputPath, bool parallel=Pstream::parRun(), const dictionary &options=dictionary())
Construct from components.
Istream and Ostream manipulators taking arguments.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Omanip< int > setw(const int i)
virtual bool separateGeometry() const
True if the surface format supports geometry in a separate file.
static streamFormat formatEnum(const word &formatName, const streamFormat deflt=streamFormat::ASCII)
virtual void close()
Finish output, performing any necessary cleanup.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
virtual void close()
Finish output, clears output times.