162 const word& Function1Type,
172 const word& Function1Type,
187 virtual Type
value(
const scalar
x)
const = 0;
193 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
222 friend Ostream& operator<< <Type>
255 template<
class Type,
class Function1Type>
279 virtual Type
value(
const scalar
x)
const = 0;
285 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
302 #define defineFunction1(Type) \
304 defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
305 defineTemplateRunTimeSelectionTable(Function1<Type>, dictionary); \
306 defineTemplateRunTimeSelectionTable(Function1<Type>, Istream);
309 #define addFunction1(SS, Type) \
311 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
312 typedef Function1<Type> Type##Function1; \
313 typedef SS<Type> Type##SS##Function1; \
314 addToRunTimeSelectionTable \
317 Type##SS##Function1, \
322 #define addStreamConstructableFunction1(SS, Type) \
324 addFunction1(SS, Type); \
325 addToRunTimeSelectionTable \
328 Type##SS##Function1, \
333 #define addNamedFunction1(SS, Type, Name) \
335 typedef Function1<Type> Type##Function1; \
336 typedef SS<Type> Type##SS##Function1; \
337 addNamedToRunTimeSelectionTable \
340 Type##SS##Function1, \
346 #define addScalarFunction1(SS) \
348 defineTypeNameAndDebug(SS, 0); \
349 typedef Function1<scalar> scalarFunction1; \
350 addToRunTimeSelectionTable(scalarFunction1, SS, dictionary)
virtual Type integral(const scalar x1, const scalar x2) const =0
Integrate between two scalar values.
FieldFunction1(const word &name)
Construct from name.
virtual Type value(const scalar x) const =0
Return value as a function of one scalars.
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
virtual ~FieldFunction1()
Destructor.
Run-time selectable general function of one variable.
virtual Type integral(const scalar x1, const scalar x2) const =0
Integrate between two scalars.
TypeName("Function1")
Runtime type information.
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitSets &units, const dictionary &dict)
Select from dictionary.
virtual ~Function1()
Destructor.
virtual tmp< Function1< Type > > clone() const =0
Construct and return a clone.
declareRunTimeSelectionTable(autoPtr, Function1, dictionary,(const word &name, const Function1s::unitSets &units, const dictionary &dict),(name, units, dict))
Function1(const word &name)
Construct from name.
virtual Type value(const scalar x) const =0
Return value as a function of scalar x.
void operator=(const Function1< Type > &)
Assignment.
virtual bool constant() const
Is this function guaranteed to be constant?
const word & name() const
Return the name of the entry.
virtual void write(Ostream &os, const Function1s::unitSets &) const =0
Write data to dictionary stream.
const word name_
Name of entry.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A keyword and a list of tokens is an 'entry'.
Reference counter for various OpenFOAM components.
A class for managing temporary objects.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
Macros to ease declaration of run-time selection tables.
Struct containing two unitSets for use in converting both the argument and the value of a Function1.