100 const word& typeName,
210 const word& Function1Type,
220 const word& Function1Type,
235 virtual Type
value(
const scalar
x)
const = 0;
241 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
270 friend Ostream& operator<< <Type>
303 template<
class Type,
class Function1Type>
327 virtual Type
value(
const scalar
x)
const = 0;
333 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
350 #define defineFunction1(Type) \
352 defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
353 defineTemplateRunTimeSelectionTable(Function1<Type>, dictionary); \
354 defineTemplateRunTimeSelectionTable(Function1<Type>, Istream);
357 #define addFunction1(SS, Type) \
359 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
360 typedef Function1<Type> Type##Function1; \
361 typedef SS<Type> Type##SS##Function1; \
362 addToRunTimeSelectionTable \
365 Type##SS##Function1, \
370 #define addStreamConstructableFunction1(SS, Type) \
372 addFunction1(SS, Type); \
373 addToRunTimeSelectionTable \
376 Type##SS##Function1, \
381 #define addNamedFunction1(SS, Type, Name) \
383 typedef Function1<Type> Type##Function1; \
384 typedef SS<Type> Type##SS##Function1; \
385 addNamedToRunTimeSelectionTable \
388 Type##SS##Function1, \
394 #define addScalarFunction1(SS) \
396 defineTypeNameAndDebug(SS, 0); \
397 typedef Function1<scalar> scalarFunction1; \
398 addToRunTimeSelectionTable(scalarFunction1, SS, dictionary)
Macros for easy insertion into run-time selection tables.
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.
declareRunTimeSelectionTable(autoPtr, Function1, dictionary,(const word &name, const Function1s::unitConversions &units, const dictionary &dict),(name, units, dict))
virtual ~Function1()
Destructor.
virtual tmp< Function1< Type > > clone() const =0
Construct and return a clone.
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
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::unitConversions &) 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 keyword definitions, which are a keyword followed by any number of values (e....
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)
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
void assertNoConvertUnits(const word &typeName, const Function1s::unitConversions &units, const dictionary &dict)
Generate an error in an context where unit conversions are not supported.
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
autoPtr< unitConversions > clone() const
Construct a clone.
unitConversion value
Unit conversion for result values.
unitConversions(std::initializer_list< unitConversion >)
Construct from initialiser list.
unitConversion x
Unit conversion for x-axis values.
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...