36 const word& entryName,
45 value_(this->size(), uniformValue_)
53 const word& entryName,
62 isUniform_(isUniform),
66 if (fieldValues.
size() != this->size())
69 <<
"Supplied field size " << fieldValues.
size()
70 <<
" is not equal to the number of "
72 << this->
size() <<
" of patch " << pp.
name() <<
nl
97 <<
"Null or invalid entry" <<
nl
104 const word contentType(is);
106 if (contentType ==
"constant" || contentType ==
"uniform")
112 else if (contentType ==
"nonuniform")
119 is >>
static_cast<List<Type>&
>(
fld);
120 const label lenRead =
fld.size();
131 <<
"Sizes do not match. Truncating " << lenRead
132 <<
" entries to " << len <<
endl;
141 <<
"size " << lenRead
142 <<
" is not equal to the expected length " << len
150 <<
"Expected keyword 'constant', 'uniform', or 'nonuniform'"
151 <<
", found " << contentType
171 const word& redirectType,
172 const word& entryName,
174 const bool faceValues
199 const word& entryName,
201 const bool faceValues
239 isUniform_(rhs.isUniform_),
240 uniformValue_(rhs.uniformValue_),
248 value_ = uniformValue_;
261 value_.autoMap(mapper);
266 value_ = uniformValue_;
278 const auto& cst = refCast<const ConstantField<Type>>(pf1);
279 value_.rmap(cst.value_, addr);
293 os.writeKeyword(this->
name())
299 value_.writeEntry(this->
name(), os);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
static bool allowConstructFromLargerSize
Permit read construct from a larger size.
Abstract base class to hold the Field mapping addressing and weights.
Generic templated field type.
An input stream of tokens.
const token & peek() const
Failsafe peek at what the next read would return,.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Templated function that returns a constant value.
virtual void rmap(const PatchFunction1< Type > &pf1, const labelList &addr)
Reverse map the given PatchFunction1 onto this PatchFunction1.
virtual void autoMap(const FieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const polyPatch const word const word const dictionary & dict
const polyPatch const word const word const dictionary const bool faceValues
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
virtual ITstream & stream() const =0
Return token stream, if entry is a primitive entry.
virtual bool isStream() const noexcept
Return true if this entry is a stream.
A class for handling keywords in dictionaries.
label size() const
Number of faces or points on the patch.
const word & name() const noexcept
The patch name.
A patch is a list of labels that address the faces in the global face list.
bool isWord() const noexcept
Token is word-variant (WORD, DIRECTIVE)
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)