An exprResultStack with persistence. More...
#include <exprResultStoredStack.H>


Public Member Functions | |
| TypeNameNoDebug ("exprResultStoredStack") | |
| Runtime type information. | |
| exprResultStoredStack () | |
| Default construct. | |
| exprResultStoredStack (const exprResultStoredStack &rhs) | |
| Copy construct. | |
| exprResultStoredStack (const dictionary &dict) | |
| Construct from a dictionary. | |
| virtual autoPtr< exprResult > | clone () const |
| Clone. | |
| virtual | ~exprResultStoredStack ()=default |
| Destructor. | |
| void | operator= (const exprResultStoredStack &rhs) |
| Copy assignment. | |
| Public Member Functions inherited from exprResultStack | |
| TypeName ("exprResultStack") | |
| Runtime type information. | |
| exprResultStack () | |
| Default construct. | |
| exprResultStack (const exprResultStack &rhs) | |
| Copy construct. | |
| exprResultStack (const dictionary &dict) | |
| Construct from a dictionary. | |
| virtual | ~exprResultStack ()=default |
| Destructor. | |
| exprResult | pop () |
| Pop the last value as an expression result. | |
| void | push (const exprResult &result) |
| Push an expression result value. | |
| void | operator= (const exprResultStack &rhs) |
| Copy assignment. | |
| void | operator= (const exprResult &rhs) |
| Copy assignment. | |
| Public Member Functions inherited from exprResult | |
| TypeName ("exprResult") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, exprResult, dictionary,(const dictionary &dict),(dict)) | |
| declareRunTimeSelectionTable (autoPtr, exprResult, empty,(),()) | |
| exprResult () | |
| Default construct. | |
| exprResult (const exprResult &expr) | |
| Copy construct. | |
| exprResult (exprResult &&expr) | |
| Move construct. | |
| exprResult (const dictionary &dict, const bool singleValueOnly=false, const bool valueReqd=false) | |
| Construct from a dictionary. | |
| exprResult (Istream &is) | |
| Construct from Istream as dictionary content. | |
| template<class Type> | |
| exprResult (const Field< Type > &fld) | |
| Construct by copying a field. | |
| template<class Type> | |
| exprResult (Field< Type > &&fld) | |
| Construct by moving a field. | |
| template<class Type> | |
| exprResult (autoPtr< Type > &&obj) | |
| Construct for an IOobject. | |
| template<class Type> | |
| exprResult (const dimensioned< Type > &dt) | |
| Construct from a dimensioned value. | |
| exprResult (const bool &val) | |
| Construct from single value of bool. | |
| exprResult (const scalar &val) | |
| Construct from single value of scalar. | |
| exprResult (const vector &val) | |
| Construct from single value of vector. | |
| exprResult (const tensor &val) | |
| Construct from single value of tensor. | |
| exprResult (const symmTensor &val) | |
| Construct from single value of symmTensor. | |
| exprResult (const sphericalTensor &val) | |
| Construct from single value of sphericalTensor. | |
| virtual | ~exprResult () |
| Destructor. | |
| bool | hasValue () const |
| Has a value? | |
| const word & | valueType () const noexcept |
| Basic type for the field or single value. | |
| bool | isPointData (const bool wantPointData=true) const |
| True if representing point data, or test for same value as wantPointData argument. | |
| bool | isUniform () const |
| True if single, uniform value. | |
| template<class Type> | |
| bool | isType () const |
| True if valueType corresponds to the given Type. | |
| template<class Type> | |
| Type | getValue () const |
| Return a single value when isUniform() is true, or Zero when it is non-uniform or if the type mismatches, which means that it can generally be considered as failsafe. | |
| template<class Type> | |
| const Field< Type > * | getField () const |
| Return a read pointer to the field data if the type matches, nullptr otherwise. Can generally be considered as failsafe. | |
| bool | is_bool () const |
| True if valueType is a bool. | |
| label | size () const |
| The field or object size. | |
| const void * | dataAddress () const |
| The address of the field data content. | |
| void | clear () |
| Clear (zero) the result. | |
| void | noReset () noexcept |
| Change reset behaviour. | |
| void | allowReset () noexcept |
| Change reset behaviour. | |
| void | testIfSingleValue (const bool parRun=UPstream::parRun()) |
| Test if field corresponds to a single-value and thus uniform. | |
| template<class Type> | |
| void | setResult (Field< Type > *, bool wantPointData=false) |
| Set result field, taking ownership of the pointer. | |
| template<class Type> | |
| void | setResult (const Field< Type > &, bool wantPointData=false) |
| Set result field, taking copy of the field contents. | |
| template<class Type> | |
| void | setResult (Field< Type > &&, bool wantPointData=false) |
| Set result field, moving field contents. | |
| template<class Type> | |
| void | setResult (const Type &val, const label size) |
| Set uniform result field of given size. | |
| template<class Type> | |
| void | setSingleValue (const Type &val) |
| Set single-value uniform result. | |
| template<class Type> | |
| const Field< Type > & | cref () const |
| Return const reference to the field. | |
| template<class Type> | |
| Field< Type > & | ref () |
| Return non-const reference to the field. | |
| template<class Type> | |
| Field< Type > & | constCast () const |
| Return non-const reference to the field, casting away constness. | |
| template<class Type> | |
| tmp< Field< Type > > | getResult (bool cacheCopy=false) |
| Return tmp field of the contents, optionally keeping a copy in cache. | |
| exprResult | getUniform (const label size, const bool noWarn, const bool parRun=UPstream::parRun()) const |
| Construct a uniform field from the current results. | |
| template<template< class > class BinaryOp, class Type> | |
| Type | getReduced (const BinaryOp< Type > &bop, const Type &initial=pTraits< Type >::zero) |
| Get a reduced result. | |
| void | writeEntry (const word &keyword, Ostream &os) const |
| Forwarding to Field::writeEntry. | |
| void | writeDict (Ostream &os, const bool subDict=true) const |
| Write entry as dictionary contents. | |
| void | writeField (Ostream &os, const word &keyword="") const |
| Write the field, optionally as an entry. | |
| void | writeValue (Ostream &os) const |
| Write the single value, or the first value from field. | |
| virtual void | operator= (exprResult &&rhs) |
| Move assignment. | |
| exprResult & | operator*= (const scalar &b) |
| Scalar multiplication. | |
| exprResult & | operator+= (const exprResult &b) |
| Addition of results. | |
| template<class Type> | |
| const Foam::Field< Type > * | getField () const |
| template<class Type> | |
| Foam::tmp< Foam::Field< Type > > | getResult (bool cacheCopy) |
| template<class Type> | |
| const Foam::Field< Type > & | cref () const |
| template<class Type> | |
| Foam::Field< Type > & | ref () |
| template<class Type> | |
| Foam::Field< Type > & | constCast () const |
Protected Member Functions | |
| virtual void | resetImpl () |
| Reset at new timestep - disabling locally. | |
| Protected Member Functions inherited from exprResult | |
| virtual expressions::exprResult & | target () |
| Simulate virtual templated methods. | |
| bool | reset (bool force=false) |
| Reset at new timestep according to type. | |
| void | needsReset (bool val) |
| Adjusts the internal needsReset value. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from exprResult | |
| static autoPtr< exprResult > | New (const dictionary &dict) |
| Return a reference to the selected value driver. | |
| static autoPtr< exprResult > | New (Istream &is) |
| Construct from Istream as dictionary content. | |
| Static Public Attributes inherited from exprResult | |
| static const exprResult | null |
| An empty result. | |
An exprResultStack with persistence.
Definition at line 49 of file exprResultStoredStack.H.
| exprResultStoredStack | ( | ) |
Default construct.
Definition at line 53 of file exprResultStoredStack.C.
References exprResultStack::exprResultStack(), and exprResult::needsReset().
Referenced by clone(), exprResultStoredStack(), operator=(), TypeNameNoDebug(), and ~exprResultStoredStack().


| exprResultStoredStack | ( | const exprResultStoredStack & | rhs | ) |
Copy construct.
Definition at line 61 of file exprResultStoredStack.C.
References exprResultStack::exprResultStack(), exprResultStoredStack(), exprResult::needsReset(), and Foam::rhs().

|
explicit |
Construct from a dictionary.
Definition at line 72 of file exprResultStoredStack.C.
References dict, exprResultStack::exprResultStack(), and exprResult::needsReset().

|
virtualdefault |
Destructor.
References exprResultStoredStack(), and Foam::rhs().

|
inlineprotectedvirtual |
Reset at new timestep - disabling locally.
Reimplemented from exprResult.
Definition at line 60 of file exprResultStoredStack.H.
| TypeNameNoDebug | ( | "exprResultStoredStack" | ) |
Runtime type information.
References dict, exprResultStoredStack(), and Foam::rhs().

|
inlinevirtual |
Clone.
Reimplemented from exprResultStack.
Definition at line 91 of file exprResultStoredStack.H.
References exprResultStoredStack().

| void operator= | ( | const exprResultStoredStack & | rhs | ) |
Copy assignment.
Definition at line 85 of file exprResultStoredStack.C.
References exprResultStoredStack(), exprResultStack::operator=(), and Foam::rhs().
