Templated function that returns a constant value. More...
#include <ConstantField.H>


Public Member Functions | |
| TypeName ("constant") | |
| Runtime type information. | |
| ConstantField (const polyPatch &pp, const word &entryName, const Type &uniformValue, const dictionary &dict=dictionary::null, const bool faceValues=true) | |
| Construct from a uniform value. | |
| ConstantField (const polyPatch &pp, const word &entryName, const bool isUniform, const Type &uniformValue, const Field< Type > &fieldValues, const dictionary &dict=dictionary::null, const bool faceValues=true) | |
| Construct from components. | |
| ConstantField (const polyPatch &pp, const word &redirectType, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from entry name and dictionary. | |
| ConstantField (const polyPatch &pp, const entry *eptr, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from primitive entry, entry name and dictionary. | |
| ConstantField (const ConstantField< Type > &rhs, const polyPatch &pp) | |
| Copy construct setting patch. | |
| ConstantField (const ConstantField< Type > &rhs) | |
| Copy construct. | |
| virtual tmp< PatchFunction1< Type > > | clone () const |
| Return a clone. | |
| virtual tmp< PatchFunction1< Type > > | clone (const polyPatch &pp) const |
| Return a clone, setting the patch. | |
| virtual | ~ConstantField ()=default |
| Destructor. | |
| virtual bool | constant () const |
| Value is independent of x. | |
| virtual bool | uniform () const |
| Is value uniform (i.e. independent of coordinate). | |
| virtual tmp< Field< Type > > | value (const scalar x) const |
| Return constant value. | |
| virtual tmp< Field< Type > > | integrate (const scalar x1, const scalar x2) const |
| Integrate between two values. | |
| virtual void | autoMap (const FieldMapper &mapper) |
| Map (and resize as needed) from self given a mapping object. | |
| virtual void | rmap (const PatchFunction1< Type > &pf1, const labelList &addr) |
| Reverse map the given PatchFunction1 onto this PatchFunction1. | |
| virtual void | writeData (Ostream &os) const |
| Write in dictionary format. | |
| Public Member Functions inherited from PatchFunction1< Type > | |
| TypeName ("PatchFunction1") declareRunTimeSelectionTable(autoPtr | |
| Runtime type information. | |
| PatchFunction1 (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
| Construct from polyPatch and entry name. | |
| PatchFunction1 (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from polyPatch, dictionary and entry name. | |
| PatchFunction1 (const PatchFunction1< Type > &rhs, const polyPatch &pp) | |
| Copy construct setting patch. | |
| PatchFunction1 (const PatchFunction1< Type > &rhs) | |
| Copy construct. | |
| virtual | ~PatchFunction1 ()=default |
| Destructor. | |
| virtual bool | good () const |
| Can function be evaluated? | |
| virtual tmp< pointField > | localPosition (const pointField &globalPos) const |
| Helper: optionally convert coordinates to local coordinates. | |
| virtual tmp< Field< Type > > | transform (const Field< Type > &fld) const |
| Apply optional transformation. | |
| virtual tmp< Field< Type > > | transform (const tmp< Field< Type > > &tfld) const |
| Apply optional transformation. | |
| Public Member Functions inherited from patchFunction1Base | |
| patchFunction1Base (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
| Construct from polyPatch and entry name. | |
| patchFunction1Base (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
| Construct from polyPatch, dictionary and entry name. | |
| patchFunction1Base (const patchFunction1Base &rhs) | |
| Copy construct. | |
| patchFunction1Base (const patchFunction1Base &rhs, const polyPatch &pp) | |
| Copy construct setting patch. | |
| virtual | ~patchFunction1Base ()=default |
| Destructor. | |
| const word & | name () const noexcept |
| The name of the entry. | |
| const polyPatch & | patch () const noexcept |
| Reference to the patch. | |
| bool | faceValues () const noexcept |
| Generate face or point values on patch? | |
| label | size () const |
| Number of faces or points on the patch. | |
| const objectRegistry * | whichDb () const |
| Return the associated registry (ie, the mesh). | |
| const objectRegistry & | obr () const |
| Return the object registry (ie, the mesh). | |
| const Time & | time () const |
| Return false: function not created with time database. | |
| virtual void | userTimeToTime (const Time &t) |
| Convert time. | |
| Public Member Functions inherited from refCount | |
| constexpr | refCount () noexcept |
| Default construct, initializing count to 0. | |
| int | use_count () const noexcept |
| Return the current reference count. | |
| bool | unique () const noexcept |
| Return true if the reference count is zero. | |
| void | operator++ () noexcept |
| Increment the reference count. | |
| void | operator++ (int) noexcept |
| Increment the reference count. | |
| void | operator-- () noexcept |
| Decrement the reference count. | |
| void | operator-- (int) noexcept |
| Decrement the reference count. | |
Additional Inherited Members | |
| Public Types inherited from PatchFunction1< Type > | |
| typedef Field< Type > | returnType |
| The return type is a field of values. | |
| Static Public Member Functions inherited from PatchFunction1< Type > | |
| template<class Derived> | |
| static tmp< PatchFunction1< Type > > | Clone (const Derived &fun) |
| Clone a PatchFunction1. | |
| template<class Derived> | |
| static tmp< PatchFunction1< Type > > | Clone (const Derived &fun, const polyPatch &pp) |
| Clone a PatchFunction1 with a patch. | |
| static autoPtr< PatchFunction1< Type > > | New (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true, const bool mandatory=true) |
| Selector. | |
| static autoPtr< PatchFunction1< Type > > | NewCompat (const polyPatch &pp, const word &entryName, std::initializer_list< std::pair< const char *, int > > compat, const dictionary &dict, const bool faceValues=true, const bool mandatory=true) |
| Compatibility selector. | |
| static autoPtr< PatchFunction1< Type > > | NewIfPresent (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) |
| An optional selector. | |
| static refPtr< PatchFunction1< Type > > | New (HashPtrTable< PatchFunction1< Type > > &cache, const polyPatch &pp, const word &entryName, const dictionary &dict, enum keyType::option matchOpt=keyType::LITERAL, const bool faceValues=true, const bool mandatory=true) |
| Selector with external storage. This also allows wildcard matches in a dictionary. | |
| Public Attributes inherited from PatchFunction1< Type > | |
| PatchFunction1 | |
| dictionary | |
| const polyPatch & | pp |
| const polyPatch const word & | type |
| const polyPatch const word const word & | entryName |
| const polyPatch const word const word const dictionary & | dict |
| const polyPatch const word const word const dictionary const bool | faceValues |
| const polyPatch const word const word const dictionary const bool | pp |
| const polyPatch const word const word const dictionary const bool | type |
| const polyPatch const word const word const dictionary const bool | entryName |
| const polyPatch const word const word const dictionary const bool | dict |
| Protected Member Functions inherited from PatchFunction1< Type > | |
| void | operator= (const PatchFunction1< Type > &)=delete |
| No copy assignment. | |
| Protected Member Functions inherited from patchFunction1Base | |
| void | operator= (const patchFunction1Base &)=delete |
| No copy assignment. | |
| Protected Attributes inherited from PatchFunction1< Type > | |
| coordinateScaling< Type > | coordSys_ |
| Optional local coordinate system and scaling. | |
| Protected Attributes inherited from patchFunction1Base | |
| const word | name_ |
| Name of entry. | |
| const polyPatch & | patch_ |
| Reference to the patch. | |
| const bool | faceValues_ |
| Generate face or point values on patch. | |
Templated function that returns a constant value.
Usage - for entry <entryName> returning the value <value>:
<entryName> constant <value>;
or
<entryName>
{
type constant;
value <value>;
}
Definition at line 62 of file ConstantField.H.
| ConstantField | ( | const polyPatch & | pp, |
| const word & | entryName, | ||
| const Type & | uniformValue, | ||
| const dictionary & | dict = dictionary::null, | ||
| const bool | faceValues = true ) |
Construct from a uniform value.
Definition at line 26 of file ConstantField.C.
References PatchFunction1< Type >::dict, PatchFunction1< Type >::dictionary, PatchFunction1< Type >::entryName, PatchFunction1< Type >::faceValues, PatchFunction1< Type >::PatchFunction1, PatchFunction1< Type >::pp, and patchFunction1Base::size().
Referenced by ConstantField(), ConstantField(), and TypeName().


| ConstantField | ( | const polyPatch & | pp, |
| const word & | entryName, | ||
| const bool | isUniform, | ||
| const Type & | uniformValue, | ||
| const Field< Type > & | fieldValues, | ||
| const dictionary & | dict = dictionary::null, | ||
| const bool | faceValues = true ) |
Construct from components.
Definition at line 43 of file ConstantField.C.
References PatchFunction1< Type >::dict, PatchFunction1< Type >::dictionary, PatchFunction1< Type >::entryName, PatchFunction1< Type >::faceValues, PatchFunction1< Type >::PatchFunction1, PatchFunction1< Type >::pp, and UList< T >::size().

| ConstantField | ( | const polyPatch & | pp, |
| const word & | redirectType, | ||
| const word & | entryName, | ||
| const dictionary & | dict, | ||
| const bool | faceValues = true ) |
Construct from entry name and dictionary.
Definition at line 189 of file ConstantField.C.
References PatchFunction1< Type >::dict, PatchFunction1< Type >::dictionary, PatchFunction1< Type >::entryName, PatchFunction1< Type >::faceValues, PatchFunction1< Type >::PatchFunction1, PatchFunction1< Type >::pp, patchFunction1Base::size(), and Foam::Zero.

| ConstantField | ( | const polyPatch & | pp, |
| const entry * | eptr, | ||
| const word & | entryName, | ||
| const dictionary & | dict, | ||
| const bool | faceValues = true ) |
Construct from primitive entry, entry name and dictionary.
Definition at line 217 of file ConstantField.C.
References PatchFunction1< Type >::dict, PatchFunction1< Type >::dictionary, PatchFunction1< Type >::entryName, PatchFunction1< Type >::faceValues, PatchFunction1< Type >::PatchFunction1, PatchFunction1< Type >::pp, patchFunction1Base::size(), and Foam::Zero.

|
explicit |
Copy construct setting patch.
Definition at line 245 of file ConstantField.C.
References ConstantField(), PatchFunction1< Type >::PatchFunction1, PatchFunction1< Type >::pp, Foam::rhs(), patchFunction1Base::size(), and Foam::Zero.

|
explicit |
Copy construct.
Definition at line 267 of file ConstantField.C.
References ConstantField(), patchFunction1Base::patch(), and Foam::rhs().

|
virtualdefault |
Destructor.
| TypeName | ( | "constant" | ) |
Runtime type information.
References ConstantField(), PatchFunction1< Type >::dict, PatchFunction1< Type >::dictionary, PatchFunction1< Type >::entryName, PatchFunction1< Type >::faceValues, dictionary::null, PatchFunction1< Type >::pp, and Foam::rhs().

|
inlinevirtual |
Return a clone.
Implements PatchFunction1< Type >.
Definition at line 182 of file ConstantField.H.
References PatchFunction1< Type >::Clone().

|
inlinevirtual |
Return a clone, setting the patch.
Implements PatchFunction1< Type >.
Definition at line 190 of file ConstantField.H.
References PatchFunction1< Type >::Clone(), and PatchFunction1< Type >::pp.

|
inlinevirtual |
Value is independent of x.
Reimplemented from PatchFunction1< Type >.
Definition at line 207 of file ConstantField.H.
|
inlinevirtual |
Is value uniform (i.e. independent of coordinate).
Implements PatchFunction1< Type >.
Definition at line 215 of file ConstantField.H.
References PatchFunction1< Type >::uniform().

|
inlinevirtual |
Return constant value.
Reimplemented from PatchFunction1< Type >.
Definition at line 27 of file ConstantFieldI.H.
References PatchFunction1< Type >::coordSys_, PatchFunction1< Type >::transform(), and x.

|
inlinevirtual |
Integrate between two values.
Reimplemented from PatchFunction1< Type >.
Definition at line 43 of file ConstantFieldI.H.
References PatchFunction1< Type >::coordSys_, and PatchFunction1< Type >::transform().

|
virtual |
Map (and resize as needed) from self given a mapping object.
Reimplemented from PatchFunction1< Type >.
Definition at line 279 of file ConstantField.C.
|
virtual |
Reverse map the given PatchFunction1 onto this PatchFunction1.
Reimplemented from PatchFunction1< Type >.
Definition at line 295 of file ConstantField.C.
References PatchFunction1< Type >::PatchFunction1, and Foam::refCast().

|
virtual |
Write in dictionary format.
Reimplemented from PatchFunction1< Type >.
Definition at line 307 of file ConstantField.C.
References name, os(), token::SPACE, and PatchFunction1< Type >::writeData().
