Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a certain type, e.g. constant or time varying, and provide functions to return the (interpolated) value, and integral between limits. More...
Public Types | |
typedef Field< Type > | returnType |
Public Member Functions | |
TypeName ("PatchFunction1") declareRunTimeSelectionTable(autoPtr | |
Runtime type information. More... | |
PatchFunction1 (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
Construct from polyPatch and entry name. More... | |
PatchFunction1 (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
Construct from polyPatch, dictionary and entry name. More... | |
PatchFunction1 (const PatchFunction1< Type > &rhs) | |
Copy construct. More... | |
PatchFunction1 (const PatchFunction1< Type > &rhs, const polyPatch &pp) | |
Copy construct setting patch. More... | |
virtual tmp< PatchFunction1< Type > > | clone () const =0 |
Return a clone. More... | |
virtual tmp< PatchFunction1< Type > > | clone (const polyPatch &pp) const =0 |
Return a clone, setting patch. More... | |
virtual | ~PatchFunction1 ()=default |
Destructor. More... | |
virtual bool | constant () const |
Is value constant (i.e. independent of x) More... | |
virtual bool | good () const |
Can function be evaluated? More... | |
virtual bool | uniform () const =0 |
Is value uniform (i.e. independent of coordinate) More... | |
virtual tmp< Field< Type > > | value (const scalar x) const |
Return value as a function of (scalar) independent variable. More... | |
virtual tmp< Field< Type > > | integrate (const scalar x1, const scalar x2) const |
Integrate between two (scalar) values. More... | |
virtual tmp< pointField > | localPosition (const pointField &globalPos) const |
Helper: optionally convert coordinates to local coordinates. More... | |
virtual tmp< Field< Type > > | transform (const Field< Type > &fld) const |
Apply optional transformation. More... | |
virtual tmp< Field< Type > > | transform (const tmp< Field< Type > > &tfld) const |
Apply optional transformation. More... | |
virtual void | autoMap (const FieldMapper &mapper) |
Map (and resize as needed) from self given a mapping object. More... | |
virtual void | rmap (const PatchFunction1< Type > &rhs, const labelList &addr) |
Reverse map the given PatchFunction1 onto this PatchFunction1. More... | |
virtual void | writeData (Ostream &os) const |
Write in dictionary format. More... | |
Public Member Functions inherited from patchFunction1Base | |
patchFunction1Base (const polyPatch &pp, const word &entryName, const bool faceValues=true) | |
Construct from polyPatch and entry name. More... | |
patchFunction1Base (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) | |
Construct from polyPatch, dictionary and entry name. More... | |
patchFunction1Base (const patchFunction1Base &rhs) | |
Copy construct. More... | |
patchFunction1Base (const patchFunction1Base &rhs, const polyPatch &pp) | |
Copy construct setting patch. More... | |
virtual | ~patchFunction1Base ()=default |
Destructor. More... | |
const word & | name () const noexcept |
The name of the entry. More... | |
const polyPatch & | patch () const noexcept |
Reference to the patch. More... | |
bool | faceValues () const noexcept |
Generate face or point values on patch? More... | |
label | size () const |
Number of faces or points on the patch. More... | |
const objectRegistry * | whichDb () const |
Return the associated registry (ie, the mesh) More... | |
const objectRegistry & | obr () const |
Return the object registry (ie, the mesh) More... | |
const Time & | time () const |
Return false: function not created with time database. More... | |
virtual void | userTimeToTime (const Time &t) |
Convert time. More... | |
Public Member Functions inherited from refCount | |
constexpr | refCount () noexcept |
Default construct, initializing count to 0. More... | |
int | count () const noexcept |
Return the current reference count. More... | |
bool | unique () const noexcept |
Return true if the reference count is zero. More... | |
void | operator++ () noexcept |
Increment the reference count. More... | |
void | operator++ (int) noexcept |
Increment the reference count. More... | |
void | operator-- () noexcept |
Decrement the reference count. More... | |
void | operator-- (int) noexcept |
Decrement the reference count. More... | |
Static Public Member Functions | |
static autoPtr< PatchFunction1< Type > > | New (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true, const bool mandatory=true) |
Selector. More... | |
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. More... | |
static autoPtr< PatchFunction1< Type > > | NewIfPresent (const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true) |
An optional selector. More... | |
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) |
Public Attributes | |
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 | |
void | operator= (const PatchFunction1< Type > &)=delete |
No copy assignment. More... | |
Protected Member Functions inherited from patchFunction1Base | |
void | operator= (const patchFunction1Base &)=delete |
No copy assignment. More... | |
Protected Attributes | |
coordinateScaling< Type > | coordSys_ |
Optional local coordinate system and scaling. More... | |
Protected Attributes inherited from patchFunction1Base | |
const word | name_ |
Name of entry. More... | |
const polyPatch & | patch_ |
Reference to the patch. More... | |
const bool | faceValues_ |
Generate face or point values on patch. More... | |
Friends | |
Ostream & | operator (Ostream &os, const PatchFunction1< Type > &rhs) |
Ostream Operator. More... | |
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a certain type, e.g. constant or time varying, and provide functions to return the (interpolated) value, and integral between limits.
Extends the Function1 class by adding autoMap and rMap functions
Definition at line 70 of file PatchFunction1.H.
typedef Field<Type> returnType |
Definition at line 104 of file PatchFunction1.H.
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.
|
explicit |
Copy construct.
|
explicit |
Copy construct setting patch.
|
virtualdefault |
Destructor.
|
protecteddelete |
No copy assignment.
TypeName | ( | "PatchFunction1< Type >" | ) |
Runtime type information.
Declare runtime constructor selection table
|
pure virtual |
Return a clone.
Implemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
|
pure virtual |
Return a clone, setting patch.
Implemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
|
static |
Selector.
Definition at line 166 of file PatchFunction1New.C.
|
static |
Compatibility selector.
Definition at line 189 of file PatchFunction1New.C.
|
static |
An optional selector.
Definition at line 213 of file PatchFunction1New.C.
References dict.
Referenced by turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::turbulentTemperatureRadCoupledMixedFvPatchScalarField().
|
static |
Selector with external storage. This also allows wildcard matches in a dictionary
Definition at line 228 of file PatchFunction1New.C.
References refPtr< T >::cref(), dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, entry::keyword(), and Foam::nl.
Is value constant (i.e. independent of x)
Reimplemented in PatchExprField< Type >, Sampled< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
Definition at line 218 of file PatchFunction1.H.
|
inlinevirtual |
Can function be evaluated?
Reimplemented in UniformValueField< Type >.
Definition at line 221 of file PatchFunction1.H.
Is value uniform (i.e. independent of coordinate)
Implemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
Definition at line 83 of file PatchFunction1.C.
Referenced by ConstantField< Type >::uniform(), MappedFile< Type >::uniform(), and UniformValueField< Type >::uniform().
|
virtual |
Return value as a function of (scalar) independent variable.
Reimplemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, UniformValueField< Type >, MappedFile< Type >, and MappedFile< scalar >.
Definition at line 90 of file PatchFunction1.C.
References NotImplemented.
|
virtual |
Integrate between two (scalar) values.
Reimplemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
Definition at line 101 of file PatchFunction1.C.
References NotImplemented.
|
virtual |
Helper: optionally convert coordinates to local coordinates.
Definition at line 114 of file PatchFunction1.C.
|
virtual |
Apply optional transformation.
Definition at line 149 of file PatchFunction1.C.
References fld().
|
virtual |
Apply optional transformation.
Definition at line 126 of file PatchFunction1.C.
References tmp< T >::clear().
|
virtual |
Map (and resize as needed) from self given a mapping object.
Reimplemented in PatchExprField< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
Definition at line 171 of file PatchFunction1.C.
Referenced by PatchExprField< Type >::autoMap(), CodedField< Type >::autoMap(), and MappedFile< Type >::autoMap().
|
virtual |
Reverse map the given PatchFunction1 onto this PatchFunction1.
Reimplemented in MappedFile< scalar >, PatchExprField< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, and UniformValueField< Type >.
Definition at line 176 of file PatchFunction1.C.
Referenced by PatchExprField< Type >::rmap(), CodedField< Type >::rmap(), and MappedFile< Type >::rmap().
|
virtual |
Write in dictionary format.
Reimplemented in PatchExprField< Type >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, MappedFile< Type >, MappedFile< scalar >, and UniformValueField< Type >.
Definition at line 185 of file PatchFunction1.C.
References os().
|
friend |
Ostream Operator.
|
protected |
Optional local coordinate system and scaling.
Definition at line 93 of file PatchFunction1.H.
Definition at line 113 of file PatchFunction1.H.
Definition at line 114 of file PatchFunction1.H.
const polyPatch& pp |
Definition at line 116 of file PatchFunction1.H.
Referenced by PatchExprField< Type >::clone(), Sampled< Type >::clone(), CodedField< Type >::clone(), ConstantField< Type >::clone(), MappedFile< Type >::clone(), and UniformValueField< Type >::clone().
Definition at line 117 of file PatchFunction1.H.
Definition at line 118 of file PatchFunction1.H.
const polyPatch const word const word const dictionary& dict |
Definition at line 119 of file PatchFunction1.H.
Referenced by ConstantField< Type >::ConstantField(), MappedFile< Type >::MappedFile(), and PatchExprField< Type >::PatchExprField().
const polyPatch const word const word const dictionary const bool faceValues |
Definition at line 120 of file PatchFunction1.H.
Referenced by ConstantField< Type >::ConstantField().
const polyPatch const word const word const dictionary const bool pp |
Definition at line 122 of file PatchFunction1.H.
const polyPatch const word const word const dictionary const bool type |
Definition at line 122 of file PatchFunction1.H.
const polyPatch const word const word const dictionary const bool entryName |
Definition at line 122 of file PatchFunction1.H.
const polyPatch const word const word const dictionary const bool dict |
Definition at line 122 of file PatchFunction1.H.