Loading...
Searching...
No Matches
TimeFunction1< Type > Class Template Reference

Light wrapper around Function1 to provide a mechanism to update time-based entries. More...

#include <TimeFunction1.H>

Collaboration diagram for TimeFunction1< Type >:

Public Member Functions

 TimeFunction1 (const Time &runTime, const word &name, const dictionary &dict)
 Construct from entry name and dictionary.
 TimeFunction1 (const Time &runTime, const word &entryName)
 Construct from entry name.
 TimeFunction1 (const TimeFunction1< Type > &rhs)
 Copy construct.
virtual ~TimeFunction1 ()=default
 Destructor.
void reset (const dictionary &dict)
 Reset entry by re-reading from dictionary.
const wordname () const
 Return the name of the entry.
virtual Type value (const scalar x) const
 Return value as a function of (scalar) independent variable.
virtual Type integrate (const scalar x1, const scalar x2) const
 Integrate between two (scalar) values.
virtual void writeData (Ostream &os) const
 Write in dictionary format.

Protected Attributes

const Timetime_
 Reference to the time database.
const word name_
 Name of the data entry.
autoPtr< Function1< Type > > entry_
 The underlying Function1.

Friends

Ostreamoperator<< (Ostream &os, const TimeFunction1< Type > &de)
 Ostream Operator.

Detailed Description

template<class Type>
class Foam::TimeFunction1< Type >

Light wrapper around Function1 to provide a mechanism to update time-based entries.

Source files

Definition at line 56 of file TimeFunction1.H.

Constructor & Destructor Documentation

◆ TimeFunction1() [1/3]

template<class Type>
TimeFunction1 ( const Time & runTime,
const word & name,
const dictionary & dict )

Construct from entry name and dictionary.

Definition at line 27 of file TimeFunction1.C.

References dict, entry_, name_, Foam::New(), runTime, and time_.

Referenced by operator<<, and TimeFunction1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TimeFunction1() [2/3]

template<class Type>
TimeFunction1 ( const Time & runTime,
const word & entryName )

Construct from entry name.

Definition at line 44 of file TimeFunction1.C.

References entry_, name_, runTime, and time_.

◆ TimeFunction1() [3/3]

template<class Type>
TimeFunction1 ( const TimeFunction1< Type > & rhs)

Copy construct.

Definition at line 57 of file TimeFunction1.C.

References entry_, name_, Foam::rhs(), time_, and TimeFunction1().

Here is the call graph for this function:

◆ ~TimeFunction1()

template<class Type>
virtual ~TimeFunction1 ( )
virtualdefault

Destructor.

References dict, and x.

Member Function Documentation

◆ reset()

template<class Type>
void reset ( const dictionary & dict)

Reset entry by re-reading from dictionary.

Definition at line 76 of file TimeFunction1.C.

References dict, entry_, name_, and time_.

◆ name()

template<class Type>
const Foam::word & name ( ) const

Return the name of the entry.

Definition at line 84 of file TimeFunction1.C.

References entry_.

◆ value()

template<class Type>
Type value ( const scalar x) const
virtual

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

Definition at line 91 of file TimeFunction1.C.

References entry_, and x.

◆ integrate()

template<class Type>
Type integrate ( const scalar x1,
const scalar x2 ) const
virtual

Integrate between two (scalar) values.

Definition at line 98 of file TimeFunction1.C.

References entry_.

◆ writeData()

template<class Type>
void writeData ( Ostream & os) const
virtual

Write in dictionary format.

Definition at line 126 of file TimeFunction1.C.

References entry_, and os().

Here is the call graph for this function:

◆ operator<<

template<class Type>
Ostream & operator<< ( Ostream & os,
const TimeFunction1< Type > & de )
friend

Ostream Operator.

References os(), and TimeFunction1().

Member Data Documentation

◆ time_

template<class Type>
const Time& time_
protected

Reference to the time database.

Definition at line 65 of file TimeFunction1.H.

Referenced by reset(), TimeFunction1(), TimeFunction1(), and TimeFunction1().

◆ name_

template<class Type>
const word name_
protected

Name of the data entry.

Definition at line 70 of file TimeFunction1.H.

Referenced by reset(), TimeFunction1(), TimeFunction1(), and TimeFunction1().

◆ entry_

template<class Type>
autoPtr<Function1<Type> > entry_
protected

The underlying Function1.

Definition at line 75 of file TimeFunction1.H.

Referenced by integrate(), name(), reset(), TimeFunction1(), TimeFunction1(), TimeFunction1(), value(), and writeData().


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