74#ifndef Foam_Function1_H
75#define Foam_Function1_H
106 const word& redirectType,
174 const
word& redirectType,
176 const
bool mandatory = true
183 std::initializer_list<std::pair<const
char*,
int>> compat,
185 const
word& redirectType =
word::null,
187 const
bool mandatory = true
196 const
bool mandatory = true
204 const
word& redirectType =
word::null,
220 const
bool mandatory = true
244 virtual
bool constant()
const {
return false; }
247 virtual bool good()
const {
return true; }
253 virtual Type
value(
const scalar
x)
const;
259 virtual Type
integrate(
const scalar x1,
const scalar x2)
const;
272 friend Ostream& operator<< <Type>
292template<
class Function1Type>
299 typedef typename Function1Type::returnType
Type;
307 const word& entryName,
322 using Function1Type::value;
323 using Function1Type::integrate;
344#define makeFunction1(Type) \
346 defineNamedTemplateTypeNameAndDebug(Function1<Type>, 0); \
348 defineTemplateRunTimeSelectionTable \
356#define makeFunction1Type(SS, Type) \
358 defineNamedTemplateTypeNameAndDebug(Function1Types::SS<Type>, 0); \
360 Function1<Type>::adddictionaryConstructorToTable \
361 <FieldFunction1<Function1Types::SS<Type>>> \
362 add##SS##Type##ConstructorToTable_;
366#define makeConcreteFunction1(SS, Type) \
368 defineTypeNameAndDebug(SS, 0); \
370 Function1<Type>::adddictionaryConstructorToTable \
371 <FieldFunction1<SS>> \
372 add##SS##Type##ConstructorToTable_;
376#define makeScalarFunction1(SS) \
378 makeConcreteFunction1(SS, scalar);
virtual tmp< Field< Type > > integrate(const scalarField &x1, const scalarField &x2) const
Integrate between two (scalar) values.
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
virtual tmp< Field< Type > > value(const scalarField &x) const
Return value as a function of (scalar) independent variable.
virtual ~FieldFunction1()=default
Destructor.
Function1Type::returnType Type
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const word const dictionary & dict
static autoPtr< Function1< Type > > NewCompat(const word &entryName, std::initializer_list< std::pair< const char *, int > > compat, const dictionary &dict, const word &redirectType=word::null, const objectRegistry *obrPtr=nullptr, const bool mandatory=true)
Compatibility selector, with fallback redirection.
TypeName("Function1") declareRunTimeSelectionTable(autoPtr
Runtime type information.
const word const dictionary const objectRegistry * obrPtr
virtual void writeData(Ostream &os) const
Write in dictionary format.
virtual void writeEntries(Ostream &os) const
Write coefficient entries in dictionary format.
virtual bool good() const
Can function be evaluated?
virtual tmp< Function1< Type > > clone() const =0
Construct and return a clone.
void operator=(const Function1< Type > &)=delete
No copy assignment.
static autoPtr< Function1< Type > > NewIfPresent(const word &entryName, const dictionary &dict, const word &redirectType=word::null, const objectRegistry *obrPtr=nullptr)
An optional selector.
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.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
Base class for template-invariant parts of Function1.
A class for handling keywords in dictionaries.
Registry of regIOobjects.
constant condensation/saturation model.
A class for managing references or pointers (no reference counting)
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
void func(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.