Go to the documentation of this file.
44 os.
write(number() + 1);
72 os.
write(field[idList[i]]);
123 is.
check(
"ensightPart::reconstruct(Istream&)");
153 forAll(elementTypes(), typeI)
155 word key(elementTypes()[typeI]);
156 if (elemLists_[typeI].size())
158 elemLists_[typeI].writeEntry(key, os);
179 writeHeader(os,
true);
190 if (pointMap[ptI] > -1)
199 forAll(elementTypes(), elemI)
201 if (elemLists_[elemI].size())
206 elementTypes()[elemI],
223 if (size() && field.
size() && (os.
allowUndef() || isFieldDefined(field)))
234 forAll(elementTypes(), elemI)
241 writeFieldList(os, field, idList);
258 if (size() && field0.
size() && (os.
allowUndef() || isFieldDefined(field0)))
271 forAll(elementTypes(), elemI)
278 writeFieldList(os, field0, idList);
279 writeFieldList(os, field1, idList);
280 writeFieldList(os, field2, idList);
304 const ensightPart& part
307 part.writeGeometry(os);
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label size() const
Number of elements in this part.
A class for handling words, derived from string.
bool isnan(const ListType &)
check if a list has nan entries
#define forAll(list, i)
Loop across all elements in list.
labelListList elemLists_
Simple labelList with a name.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
label nPoints
Number of points used.
bool writeData(Ostream &) const
Write reconstruction information for the object.
@ nComponents
Number of components in this vector space.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reconstruct(Istream &)
Reconstruct part characteristics (eg, element types) from Istream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void writeScalarField(ensightFile &, const List< scalar > &field, const bool perNode=false) const
Write scalar field.
void writeVectorField(ensightFile &, const List< scalar > &field0, const List< scalar > &field1, const List< scalar > &field2, const bool perNode=false) const
Write vector field components.
labelList list
Map global to local indices.
Specialized Ensight output with extra geometry file header.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void newline()
Add carriage return to ascii stream.
Ostream & writeUndef()
Write undef value.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
label offset_
Start offset for elemLists_.
virtual Ostream & writeKeyword(const string &key)
Write element keyword with trailing newline, optionally with undef.
static bool allowUndef()
Return setting for whether 'undef' values are allowed in results.
label number_
Part number.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Track the points used by the part and map global to local indices.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
label size_
Number of elements in this part.
void setSize(const label)
Reset size of List.
void writeFieldList(ensightFile &os, const List< scalar > &field, const labelUList &idList) const
Write a scalar field for idList.
Base class for ensightPartCells and ensightPartFaces.
bool writeSummary(Ostream &) const
Write summary information about the object.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void clear()
Clear the list, i.e. set size to zero.
virtual Ostream & writeKeyword(const string &key)
Write keyword with trailing newline.
virtual const List< word > & elementTypes() const
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const UList< T > & null()
Return a null UList.
label size() const
Return the number of elements in the UList.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
void writeHeader(ensightFile &, bool withDescription=false) const
Write the part header.
word name(const complex &)
Return a string representation of a complex.
string name_
Part name (or description)
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.