54 template<
class Type>
Ostream& operator<<(Ostream&, const Function1<Type>&);
122 const
word& name() const;
125 virtual Type
value(const scalar
x) const = 0;
131 virtual Type
integral(const scalar x1, const scalar x2) const = 0;
147 void operator=(const Function1<Type>&);
156 const Function1<Type>&
func 169 template<class Type, class Function1Type>
172 public Function1<Type>
193 virtual Type
value(
const scalar
x)
const = 0;
199 virtual Type
integral(
const scalar x1,
const scalar x2)
const = 0;
216 #define makeFunction1(Type) \ 218 defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \ 220 defineTemplateRunTimeSelectionTable(Function1<Type>, dictionary); 223 #define makeFunction1Type(SS, Type) \ 225 defineNamedTemplateTypeNameAndDebug(Function1s::SS<Type>, 0); \ 227 Function1<Type>::adddictionaryConstructorToTable<Function1s::SS<Type>> \ 228 addFunction1##SS##Type##ConstructorToTable_; 231 #define makeNamedFunction1Type(SS, Type, Name) \ 233 Function1<Type>::adddictionaryConstructorToTable<Function1s::SS<Type>> \ 234 addFunction1##Name##Type##ConstructorToTable_(#Name); 237 #define makeScalarFunction1(SS) \ 239 defineTypeNameAndDebug(SS, 0); \ 241 Function1<scalar>::adddictionaryConstructorToTable<SS> \ 242 addFunction1##SS##ConstructorToTable_; 245 #define makeFunction1s(Type) \ 248 const char* const Foam::Tuple2<Foam::scalar, Type>::typeName \ 250 "Tuple2<scalar," #Type ">" \ 253 makeFunction1(Type); \ 254 makeFunction1Type(None, Type); \ 255 makeFunction1Type(Constant, Type); \ 256 makeFunction1Type(Uniform, Type); \ 257 makeFunction1Type(ZeroConstant, Type); \ 258 makeFunction1Type(OneConstant, Type); \ 259 makeFunction1Type(Polynomial, Type); \ 260 makeFunction1Type(Sine, Type); \ 261 makeFunction1Type(Square, Type); \ 262 makeFunction1Type(Table, Type); \ 263 makeFunction1Type(UniformTable, Type); \ 264 makeFunction1Type(NonUniformTable, Type); \ 265 makeNamedFunction1Type(Table, Type, tableFile); \ 266 makeFunction1Type(Scale, Type); \ 267 makeFunction1Type(Coded, Type); Run-time selectable general function of one variable.
virtual void write(Ostream &os) const =0
Write data to dictionary stream.
const word const dictionary & dict
Reference counter for various OpenFOAM components.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const word & name() const
Return the name of the entry.
TypeName("Function1") declareRunTimeSelectionTable(autoPtr
Runtime type information.
virtual Type integral(const scalar x1, const scalar x2) const =0
Integrate between two scalars.
friend Ostream & operator(Ostream &os, const Function1< Type > &func)
Ostream Operator.
virtual Type value(const scalar x) const =0
Return value as a function of scalar x.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
const word name_
Name of entry.
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
virtual tmp< Function1< Type > > clone() const =0
Construct and return a clone.
#define declareRunTimeSelectionTable(autoPtr, baseType, argNames, argList, parList)
Declare a run-time selection.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for managing temporary objects.
static autoPtr< Function1< Type > > New(const word &name, const dictionary &dict)
Selector.