PatchFunction1< Type > Class Template Referenceabstract

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...

Inheritance diagram for PatchFunction1< Type >:
[legend]
Collaboration diagram for PatchFunction1< Type >:
[legend]

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 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< pointFieldlocalPosition (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...
 

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 polyPatchpp
 
const polyPatch const wordtype
 
const polyPatch const word const wordentryName
 
const polyPatch const word const word const dictionarydict
 
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 Attributes

coordinateScaling< Type > coordSys_
 Optional local coordinate system and scaling. More...
 

Friends

Ostreamoperator (Ostream &os, const PatchFunction1< Type > &rhs)
 Ostream Operator. More...
 

Detailed Description

template<class Type>
class Foam::PatchFunction1< Type >

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

Source files
See also
Foam::Function1

Definition at line 60 of file PatchFunction1.H.

Member Typedef Documentation

◆ returnType

typedef Field<Type> returnType

Definition at line 104 of file PatchFunction1.H.

Constructor & Destructor Documentation

◆ PatchFunction1() [1/4]

PatchFunction1 ( const polyPatch pp,
const word entryName,
const bool  faceValues = true 
)

Construct from polyPatch and entry name.

◆ PatchFunction1() [2/4]

PatchFunction1 ( const polyPatch pp,
const word entryName,
const dictionary dict,
const bool  faceValues = true 
)

Construct from polyPatch, dictionary and entry name.

◆ PatchFunction1() [3/4]

PatchFunction1 ( const PatchFunction1< Type > &  rhs)
explicit

Copy construct.

◆ PatchFunction1() [4/4]

PatchFunction1 ( const PatchFunction1< Type > &  rhs,
const polyPatch pp 
)
explicit

Copy construct setting patch.

◆ ~PatchFunction1()

virtual ~PatchFunction1 ( )
virtualdefault

Destructor.

Member Function Documentation

◆ operator=()

void operator= ( const PatchFunction1< Type > &  )
protecteddelete

No copy assignment.

◆ TypeName()

TypeName ( "PatchFunction1< Type >"  )

Runtime type information.

Declare runtime constructor selection table

◆ clone() [1/2]

◆ clone() [2/2]

virtual tmp<PatchFunction1<Type> > clone ( const polyPatch pp) const
pure virtual

◆ New() [1/2]

Foam::autoPtr< Foam::PatchFunction1< Type > > New ( const polyPatch pp,
const word entryName,
const dictionary dict,
const bool  faceValues = true,
const bool  mandatory = true 
)
static

Selector.

Definition at line 167 of file PatchFunction1New.C.

◆ NewCompat()

Foam::autoPtr< Foam::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 
)
static

Compatibility selector.

Definition at line 190 of file PatchFunction1New.C.

◆ NewIfPresent()

Foam::autoPtr< Foam::PatchFunction1< Type > > NewIfPresent ( const polyPatch pp,
const word entryName,
const dictionary dict,
const bool  faceValues = true 
)
static

An optional selector.

Definition at line 214 of file PatchFunction1New.C.

Referenced by turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(), and turbulentTemperatureRadCoupledMixedFvPatchScalarField::turbulentTemperatureRadCoupledMixedFvPatchScalarField().

Here is the caller graph for this function:

◆ New() [2/2]

Foam::refPtr< Foam::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 
)
static

Selector with external storage. This also allows wildcard matches in a dictionary

Definition at line 229 of file PatchFunction1New.C.

◆ constant()

virtual bool constant ( ) const
inlinevirtual

Is value constant (i.e. independent of x)

Reimplemented in MappedFile< Type >, MappedFile< scalar >, Sampled< Type >, ConstantField< Type >, PatchExprField< Type >, and UniformValueField< Type >.

Definition at line 218 of file PatchFunction1.H.

◆ uniform()

bool uniform ( ) const
pure virtual

Is value uniform (i.e. independent of coordinate)

Implemented in MappedFile< Type >, MappedFile< scalar >, Sampled< Type >, CodedField< Type >, ConstantField< Type >, PatchExprField< Type >, and UniformValueField< Type >.

Definition at line 83 of file PatchFunction1.C.

Referenced by UniformValueField< Type >::uniform(), ConstantField< Type >::uniform(), and MappedFile< scalar >::uniform().

Here is the caller graph for this function:

◆ value()

Foam::tmp< Foam::Field< Type > > value ( const scalar  x) const
virtual

Return value as a function of (scalar) independent variable.

Reimplemented in MappedFile< Type >, MappedFile< scalar >, CodedField< Type >, Sampled< Type >, ConstantField< Type >, PatchExprField< Type >, and UniformValueField< Type >.

Definition at line 91 of file PatchFunction1.C.

◆ integrate()

Foam::tmp< Foam::Field< Type > > integrate ( const scalar  x1,
const scalar  x2 
) const
virtual

◆ localPosition()

Foam::tmp< Foam::pointField > localPosition ( const pointField globalPos) const
virtual

Helper: optionally convert coordinates to local coordinates.

Definition at line 114 of file PatchFunction1.C.

◆ transform() [1/2]

Foam::tmp< Foam::Field< Type > > transform ( const Field< Type > &  fld) const
virtual

Apply optional transformation.

Definition at line 150 of file PatchFunction1.C.

◆ transform() [2/2]

Foam::tmp< Foam::Field< Type > > transform ( const tmp< Field< Type >> &  tfld) const
virtual

Apply optional transformation.

Definition at line 127 of file PatchFunction1.C.

◆ autoMap()

void autoMap ( const FieldMapper mapper)
virtual

Map (and resize as needed) from self given a mapping object.

Reimplemented in MappedFile< Type >, MappedFile< scalar >, CodedField< Type >, ConstantField< Type >, PatchExprField< Type >, and UniformValueField< Type >.

Definition at line 171 of file PatchFunction1.C.

◆ rmap()

void rmap ( const PatchFunction1< Type > &  rhs,
const labelList addr 
)
virtual

◆ writeData()

void writeData ( Ostream os) const
virtual

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream os,
const PatchFunction1< Type > &  rhs 
)
friend

Ostream Operator.

Member Data Documentation

◆ coordSys_

coordinateScaling<Type> coordSys_
protected

Optional local coordinate system and scaling.

Definition at line 93 of file PatchFunction1.H.

◆ PatchFunction1

Definition at line 113 of file PatchFunction1.H.

◆ dictionary

Definition at line 114 of file PatchFunction1.H.

◆ pp [1/2]

◆ type [1/2]

const polyPatch const word& type

Definition at line 117 of file PatchFunction1.H.

◆ entryName [1/2]

const polyPatch const word const word& entryName

Definition at line 118 of file PatchFunction1.H.

◆ dict [1/2]

const polyPatch const word const word const dictionary& dict

Definition at line 119 of file PatchFunction1.H.

◆ faceValues

const polyPatch const word const word const dictionary const bool faceValues

Definition at line 121 of file PatchFunction1.H.

◆ pp [2/2]

const polyPatch const word const word const dictionary const bool pp

Definition at line 122 of file PatchFunction1.H.

◆ type [2/2]

const polyPatch const word const word const dictionary const bool type

Definition at line 122 of file PatchFunction1.H.

◆ entryName [2/2]

const polyPatch const word const word const dictionary const bool entryName

Definition at line 122 of file PatchFunction1.H.

◆ dict [2/2]

const polyPatch const word const word const dictionary const bool dict

Definition at line 122 of file PatchFunction1.H.


The documentation for this class was generated from the following files: