FieldFunction< DimensionedFieldType > Class Template Reference

Field function which looks up another field and uses it as the argument to evaluate a given Foam::Function1. The user must specify both the name of the looked-up field and the function1. More...

Inheritance diagram for FieldFunction< DimensionedFieldType >:
Collaboration diagram for FieldFunction< DimensionedFieldType >:

Public Member Functions

 TypeName ("fieldFunction")
 Runtime type information. More...
 
 FieldFunction (const dictionary &dict, DimensionedFieldType &field)
 Construct with dictionary to initialise given field. More...
 
 FieldFunction (const FieldFunction &dff, DimensionedFieldType &field)
 Construct a copy for the given field. More...
 
virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > clone (DimensionedFieldType &field) const
 Construct and return a clone for the specified field. More...
 
virtual ~FieldFunction ()
 Destructor. More...
 
virtual void evaluate ()
 Evaluate the function and set the field. More...
 
virtual bool update ()
 Update the field for the current time. More...
 
virtual void write (Ostream &os) const
 Write data to dictionary stream. More...
 
- Public Member Functions inherited from DimensionedFieldFunction< DimensionedFieldType >
 TypeName ("DimensionedFieldFunction")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, DimensionedFieldFunction, dictionary,(const dictionary &dict, DimensionedFieldType &field),(dict, field))
 
 DimensionedFieldFunction (const dictionary &dict, DimensionedFieldType &field)
 Construct with dictionary to initialise given field. More...
 
 DimensionedFieldFunction (const DimensionedFieldFunction &dff, DimensionedFieldType &field)
 Construct a copy for the given field. More...
 
 DimensionedFieldFunction (const DimensionedFieldFunction< DimensionedFieldType > &)=delete
 Disallow default bitwise copy construction. More...
 
virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > clone () const
 Construct and return a clone for the specified field. More...
 
virtual ~DimensionedFieldFunction ()
 Destructor. More...
 
virtual void reset ()
 Reset the field size. More...
 
void operator= (const DimensionedFieldFunction< DimensionedFieldType > &)=delete
 Disallow default bitwise assignment. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DimensionedFieldFunction< DimensionedFieldType >
static autoPtr< DimensionedFieldFunction< DimensionedFieldType > > New (const dictionary &dict, DimensionedFieldType &field)
 Select null constructed. More...
 
- Protected Attributes inherited from DimensionedFieldFunction< DimensionedFieldType >
DimensionedFieldType & field_
 Reference to the field the function applies to. More...
 

Detailed Description

template<class DimensionedFieldType>
class Foam::DimensionedFieldFunctions::FieldFunction< DimensionedFieldType >

Field function which looks up another field and uses it as the argument to evaluate a given Foam::Function1. The user must specify both the name of the looked-up field and the function1.

Usage
To create a temperature dependent electrical conductivity in the solidElectricalConduction fvModel:
solidElectricalConduction
{
    type        solidElectricalConduction;

    sigma
    {
        type        fieldFunction;
        field       T;
        function
        {
            type        polynomial;
            coeffs      (7.61e7 -1.38e5);
        }
    }
}
Source files

Definition at line 75 of file FieldFunction_DimensionedFieldFunction.H.

Constructor & Destructor Documentation

◆ FieldFunction() [1/2]

FieldFunction ( const dictionary dict,
DimensionedFieldType &  field 
)

Construct with dictionary to initialise given field.

Definition at line 32 of file FieldFunction_DimensionedFieldFunction.C.

◆ FieldFunction() [2/2]

FieldFunction ( const FieldFunction< DimensionedFieldType > &  dff,
DimensionedFieldType &  field 
)

Construct a copy for the given field.

Definition at line 47 of file FieldFunction_DimensionedFieldFunction.C.

◆ ~FieldFunction()

virtual ~FieldFunction ( )
inlinevirtual

Destructor.

Definition at line 119 of file FieldFunction_DimensionedFieldFunction.H.

Member Function Documentation

◆ TypeName()

TypeName ( "fieldFunction"  )

Runtime type information.

◆ clone()

Foam::autoPtr< Foam::DimensionedFieldFunction< DimensionedFieldType > > clone ( DimensionedFieldType &  field) const
virtual

Construct and return a clone for the specified field.

Implements DimensionedFieldFunction< DimensionedFieldType >.

Definition at line 63 of file FieldFunction_DimensionedFieldFunction.C.

◆ evaluate()

void evaluate
virtual

Evaluate the function and set the field.

Implements DimensionedFieldFunction< DimensionedFieldType >.

Definition at line 78 of file FieldFunction_DimensionedFieldFunction.C.

◆ update()

bool update
virtual

Update the field for the current time.

Reimplemented from DimensionedFieldFunction< DimensionedFieldType >.

Definition at line 109 of file FieldFunction_DimensionedFieldFunction.C.

References Foam::evaluate().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write data to dictionary stream.

Implements DimensionedFieldFunction< DimensionedFieldType >.

Definition at line 118 of file FieldFunction_DimensionedFieldFunction.C.

References Foam::writeEntry().

Here is the call graph for this function:

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