66 if (idList[i] >= field.
size() || std::isnan(field[idList[i]]))
72 os.
write(field[idList[i]]);
83 if (std::isnan(field[i]))
111 elemLists_.setSize(elementTypes().size());
113 forAll(elementTypes(), elemI)
115 word key(elementTypes()[elemI]);
117 elemLists_[elemI].clear();
120 size_ += elemLists_[elemI].size();
123 is.
check(
"ensightPart::reconstruct(Istream&)");
153 forAll(elementTypes(), typeI)
155 word key(elementTypes()[typeI]);
156 if (elemLists_[typeI].size())
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);
307 part.writeGeometry(os);
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAll(list, i)
Loop across all elements in list.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
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< label > & null()
Return a null UList.
label size() const
Return the number of elements in the UList.
static const direction nComponents
Number of components in this vector space.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Ensight output with specialised write() for strings, integers and floats. Correctly handles binary wr...
virtual Ostream & writeKeyword(const string &key)
Write element keyword with trailing newline, optionally with undef.
virtual Ostream & write(const char *buf, std::streamsize count)
Binary write.
static bool allowUndef()
Return setting for whether 'undef' values are allowed in results.
Ostream & writeUndef()
Write undef value.
void newline()
Add carriage return to ascii stream.
Specialised Ensight output with extra geometry file header.
virtual Ostream & writeKeyword(const string &key)
Write keyword with trailing newline.
Track the points used by the part and map global to local indices.
labelList list
Map global to local indices.
label nPoints
Number of points used.
Base class for ensightPartCells and ensightPartFaces.
bool writeData(Ostream &) const
Write reconstruction information for the object.
void writeVectorField(ensightFile &, const List< scalar > &field0, const List< scalar > &field1, const List< scalar > &field2, const bool perNode=false) const
Write vector field components.
label number() const
Part number.
const string & name() const
Part name or description.
bool writeSummary(Ostream &) const
Write summary information about the object.
void reconstruct(Istream &)
Reconstruct part characteristics (eg, element types) from Istream.
void writeScalarField(ensightFile &, const List< scalar > &field, const bool perNode=false) const
Write scalar field.
virtual void writeGeometry(ensightGeoFile &) const
Write geometry.
void writeHeader(ensightFile &, bool withDescription=false) const
Write the part header.
void writeFieldList(ensightFile &os, const List< scalar > &field, const labelUList &idList) const
Write a scalar field for idList.
A class for handling words, derived from string.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
void offset(label &lst, const label o)
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.