126 virtual Type
value(
const scalar
x)
const = 0;
132 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
154 friend Ostream& operator<< <Type>
170 template<
class Type,
class Function1Type>
194 virtual Type
value(
const scalar
x)
const = 0;
200 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
217 #define makeFunction1(Type) \
219 defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
220 defineTemplateRunTimeSelectionTable(Function1<Type>, dictionary);
223 #define makeFunction1Type(SS, Type) \
225 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
226 typedef Function1<Type> Type##Function1; \
227 typedef SS<Type> Type##SS##Function1; \
228 addToRunTimeSelectionTable \
231 Type##SS##Function1, \
236 #define makeNamedFunction1Type(SS, Type, Name) \
238 typedef Function1<Type> Type##Function1; \
239 typedef SS<Type> Type##SS##Function1; \
240 addNamedToRunTimeSelectionTable \
243 Type##SS##Function1, \
249 #define makeScalarFunction1(SS) \
251 defineTypeNameAndDebug(SS, 0); \
252 typedef Function1<scalar> scalarFunction1; \
253 addToRunTimeSelectionTable(scalarFunction1, SS, dictionary)
256 #define makeFunction1s(Type, nullArg) \
259 const char* const Foam::Tuple2<Foam::scalar, Type>::typeName \
261 "Tuple2<scalar," #Type ">" \
264 makeFunction1(Type); \
266 namespace Function1s \
268 makeFunction1Type(None, Type); \
269 makeFunction1Type(Constant, Type); \
270 makeFunction1Type(Uniform, Type); \
271 makeFunction1Type(ZeroConstant, Type); \
272 makeFunction1Type(OneConstant, Type); \
273 makeFunction1Type(Polynomial, Type); \
274 makeFunction1Type(Sine, Type); \
275 makeFunction1Type(Square, Type); \
276 makeFunction1Type(Table, Type); \
277 makeFunction1Type(UniformTable, Type); \
278 makeFunction1Type(NonUniformTable, Type); \
279 makeNamedFunction1Type(Table, Type, tableFile); \
280 makeFunction1Type(Scale, Type); \
281 makeFunction1Type(Coded, Type); \
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.
virtual ~Function1()
Destructor.
virtual tmp< Function1< Type > > clone() const =0
Construct and return a clone.
Function1(const word &name)
Construct from name.
virtual Type value(const scalar x) const =0
Return value as a function of scalar x.
declareRunTimeSelectionTable(autoPtr, Function1, dictionary,(const word &name, const dictionary &dict),(name, dict))
Declare runtime constructor selection table.
void operator=(const Function1< Type > &)
Assignment.
const word & name() const
Return the name of the entry.
static autoPtr< Function1< Type > > New(const word &name, const dictionary &dict)
Selector.
virtual void write(Ostream &os) const =0
Write data to dictionary stream.
const word name_
Name of entry.
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.
A class for handling words, derived from string.
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Ostream & operator<<(Ostream &, const ensightPart &)