Go to the documentation of this file.
34 template<
class T,
class BaseType>
37 Istream& is = readStream(word::null, valid);
41 if (headerClassName() == IOField<T>::typeName)
43 is >>
static_cast<Field<T>&
>(*this);
46 else if (headerClassName() == typeName)
54 <<
"unexpected class name " << headerClassName()
55 <<
" expected " << typeName <<
" or " << IOField<T>::typeName
57 <<
" while reading object " <<
name()
66 template<
class T,
class BaseType>
82 template<
class T,
class BaseType>
93 readFromStream(valid);
97 bool haveFile = headerOk();
98 readFromStream(valid && haveFile);
103 template<
class T,
class BaseType>
127 template<
class T,
class BaseType>
151 template<
class T,
class BaseType>
175 template<
class T,
class BaseType>
185 const word oldTypeName(typeName);
192 const_cast<word&
>(typeName) = oldTypeName;
201 template<
class T,
class BaseType>
204 return (
os << *
this).good();
210 template<
class T,
class BaseType>
227 template<
class T,
class BaseType>
239 L.setSize(start.size()-1);
245 label index = start[i];
246 subField.setSize(start[i+1] - index);
250 subField[j] = elems[index++];
258 template<
class T,
class BaseType>
268 os << static_cast<const Field<T>&>(
L);
276 for (label i = 1; i < start.size(); i++)
278 start[i] = start[i-1]+
L[i-1].
size();
281 Field<BaseType> elems(start[start.size()-1]);
286 const T& subField =
L[i];
290 elems[elemI++] = subField[j];
293 os << start << elems;
List< label > labelList
A List of labels.
points setSize(newPointi)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const vector L(dict.get< vector >("L"))
A class for handling words, derived from Foam::string.
A primitive field of type <T> with automated input and output.
streamFormat format() const noexcept
Get the current stream format.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A Field of objects of type <T> with automated input and output using a compact storage....
#define forAll(list, i)
Loop across all elements in list.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
The IOstreamOption is a simple container for options an IOstream can normally have.
OBJstream os(runTime.globalPath()/outputName)
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
CompactIOField(const CompactIOField &)=default
Default copy construct.
void operator=(const Field< Type > &)
Copy assignment.
errorManipArg< error, int > exit(error &err, const int errNo=1)
readOption readOpt() const noexcept
The read option.
virtual bool writeData(Ostream &os) const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static constexpr direction size() noexcept
The number of elements in the VectorSpace = Ncmpts.