Go to the documentation of this file.
57 readFromLine(nSkip, is, value);
65 const label fieldIndex
73 const word& fieldName(fieldNames_[fieldIndex]);
74 const label fileIndex = timeStartIndex_ +
timeIndex*timeIncrement_;
76 fileName fieldFileName(fieldFileNames_[fieldIndex]);
78 std::ostringstream oss;
80 for (
size_t chari = 0; chari < fieldFileName.size(); ++chari)
82 if (fieldFileName[chari] ==
'*')
88 const std::string maskStr(nMask,
'*');
90 const word indexStr = oss.str();
91 fieldFileName.
replace(maskStr, indexStr);
99 <<
"Cannot read file " << is.
name()
100 <<
" for field " << fieldName
105 string primitiveType;
106 is.
read(primitiveType);
111 Info<<
"primitiveType: " << primitiveType <<
endl;
118 <<
"' values but found type " << primitiveType <<
nl
119 <<
" This may be okay, but could also indicate an error"
133 label n = surfPtr_->size();
144 const string& faceType = schema_[i].first();
145 Info<<
"Reading face type " << faceType <<
" data" <<
endl;
148 const label nFace = schema_[i].second();
157 cmptI < pTraits<Type>::nComponents;
161 for (
label faceI = 0; faceI < nFace; ++faceI)
164 values[cmptI].append(value);
171 auto&
field = tfield.ref();
173 for (
direction cmpti=0; cmpti < pTraits<Type>::nComponents; ++cmpti)
string & replace(const std::string &s1, const std::string &s2, size_type pos=0)
int debug
Static debugging option.
#define InfoInFunction
Report an information message using Foam::Info.
A class for handling words, derived from Foam::string.
A class for handling file names.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual const fileName & name() const
Read/write access to the name of the stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ensight output with specialized read() for strings, integers and floats. Correctly handles binary rea...
messageStream Info
Information stream (uses stdout - output is on the master only)
Input from string buffer, using a ISstream.
Omanip< int > setw(const int i)
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void readFromLine(const label nSkip, IStringStream &is, Type &value) const
Helper function to return Type after skipping n tokens.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Traits class for primitives.
Omanip< char > setfill(char fillch)
tmp< Field< Type > > readField(const label timeIndex, const label fieldIndex) const
Helper function to return a field.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
bool good() const
Return true if next operation might succeed.
virtual Istream & read(char *buf, std::streamsize count)
Binary read.