Go to the documentation of this file.
31 template<
class TableType>
62 template<
class TableType>
73 os << token::BEGIN_LIST <<
nl;
83 << token::END_STATEMENT <<
nl;
91 Type Foam::expressions::exprDriver::exprDriver::weightedAverage
114 const scalar
s =
gSum(wfield);
117 if (
mag(
s) < ROOTVSMALL)
127 Type Foam::expressions::exprDriver::exprDriver::weightedSum
130 const Field<Type>&
fld
153 <<
"Expected a" << (isPointVal ?
" point" :
"")
154 <<
" field, but found a" << (!isPointVal ?
" point" :
"")
174 <<
"Looking for local" << (isPointVal ?
" point" :
"")
175 <<
" field name:" <<
name <<
" type:"
178 bool good = hasVariable(
name);
191 if (good && expectedSize >= 0)
193 good = (var.
size() == expectedSize);
int debug
Static debugging option.
label size() const noexcept
The number of elements in table.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A class for handling words, derived from Foam::string.
label size() const
The field or object size.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
bool isLocalVariable(const word &name, bool isPointVal, label expectedSize=-1) const
Test existence of a local variable.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const word & valueType() const
Basic type for the field or single value.
tmp< Field< Type > > getResult(bool cacheCopy=false)
tmp< Field< Type > > newField(const Type &val=pTraits< Type >::zero) const
Return a new field with the size()
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gSum(const FieldField< Field, Type > &f)
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
tmp< Field< Type > > newPointField(const Type &val=pTraits< Type >::zero) const
Return a new field with the pointSize()
tmp< Field< Type > > getResult(bool isPointVal=false)
Return the expression result as a tmp field.
A polymorphic field/result from evaluating an expression.
An input stream of tokens.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual Ostream & endBlock()
Write end block group.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
static void writeTable(Ostream &os, const word &name, const HashTable< TableType > &tbl)
Write an interpolation table.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
bool isType() const
True if valueType corresponds to the given Type.
static bool readTable(const word &name, const dictionary &dict, HashTable< TableType > &tbl, bool clear=true)
Read an interpolation table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A HashTable similar to std::unordered_map.
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.
#define DebugInfo
Report an information message using Foam::Info.
forAllConstIters(mixture.phases(), phase)
void clear()
Clear all entries from table.
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.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
bool isPointValue(const bool isPointVal=true) const
True if representing point values, or test if same as isPointVal.
bool isNull(const T *ptr)
True if ptr is a pointer (of type T) to the nullObject.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
exprResult result_
The result.