57 readFromLine(nSkip, is, value);
65 const label fieldIndex
70 const word& fieldName(fieldNames_[fieldIndex]);
71 const label fileIndex = timeStartIndex_ +
timeIndex*timeIncrement_;
73 fileName fieldFileName(replaceMask(fieldFileNames_[fieldIndex], fileIndex));
79 <<
"Cannot read file " << is.
name()
80 <<
" for field " << fieldName
86 is.
read(primitiveType);
95 <<
"' values but found type " << primitiveType <<
nl
96 <<
" This may be okay, but could also indicate an error"
110 label
n = surfPtr_->size();
113 values[cmptI].setCapacity(
n);
120 <<
"Reading face type "
121 << schema_[i].first() <<
" data" <<
endl;
123 const label nFace = schema_[i].second();
132 cmptI < pTraits<Type>::nComponents;
136 for (label faceI = 0; faceI < nFace; ++faceI)
139 values[cmptI].append(value);
146 auto&
field = tfield.ref();
148 for (
direction cmpti=0; cmpti < pTraits<Type>::nComponents; ++cmpti)
150 field.replace(cmpti, values[cmpti]);
151 values[cmpti].clear();
virtual const fileName & name() const
Read/write access to the name of the stream.
bool good() const noexcept
True if next operation might succeed.
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Ensight output with specialized read() for strings, integers and floats. Correctly handles binary rea...
virtual Istream & read(char *buf, std::streamsize count)
Binary read.
void skip(const label n, Istream &is) const
Helper function to skip forward n steps in stream.
void readFromLine(const label nSkip, IStringStream &is, Type &value) const
Helper function to return Type after skipping n tokens.
tmp< Field< Type > > readField(const label timeIndex, const label fieldIndex) const
Helper function to return a field.
A class for handling file names.
A traits class, which is primarily used for primitives.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define DebugInfo
Report an information message using Foam::Info.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.