46#ifndef Foam_PatchFunction1_H
47#define Foam_PatchFunction1_H
61template<
class Type>
class PatchFunction1;
172 const
bool mandatory = true
180 std::initializer_list<std::pair<const
char*,
int>> compat,
183 const
bool mandatory = true
208 const
bool mandatory = true
219 virtual
bool constant()
const {
return false; }
222 virtual bool good()
const {
return true; }
225 virtual bool uniform()
const = 0;
272 friend Ostream& operator<< <Type>
290#define makePatchFunction1(Type) \
292 defineNamedTemplateTypeNameAndDebug(PatchFunction1<Type>, 0); \
294 defineTemplateRunTimeSelectionTable \
296 PatchFunction1<Type>, \
302#define makePatchFunction1Type(SS, Type) \
304 defineNamedTemplateTypeNameAndDebug(PatchFunction1Types::SS<Type>, 0); \
306 PatchFunction1<Type>::adddictionaryConstructorToTable \
307 <PatchFunction1Types::SS<Type>> \
308 add##SS##Type##ConstructorToTable_;
312#define makeConcretePatchFunction1Type(SS, Type) \
314 defineTypeNameAndDebug(SS, 0); \
316 PatchFunction1<Type>::adddictionaryConstructorToTable \
317 <PatchFunction1Types::SS> \
318 add##SS##Type##ConstructorToTable_;
322#define makeScalarPatchFunction1(SS) \
324 makeConcretePatchFunction1Type(SS, scalar);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Abstract base class to hold the Field mapping addressing and weights.
Generic templated field type.
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,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
virtual tmp< Field< Type > > integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
const polyPatch const word const word & entryName
virtual bool uniform() const =0
Is value uniform (i.e. independent of coordinate)
virtual void rmap(const PatchFunction1< Type > &rhs, const labelList &addr)
Reverse map the given PatchFunction1 onto this PatchFunction1.
const polyPatch const word & type
virtual void autoMap(const FieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
virtual void writeData(Ostream &os) const
Write in dictionary format.
coordinateScaling< Type > coordSys_
Optional local coordinate system and scaling.
virtual tmp< Field< Type > > value(const scalar x) const
Return value as a function of (scalar) independent variable.
const polyPatch const word const word const dictionary & dict
virtual tmp< pointField > localPosition(const pointField &globalPos) const
Helper: optionally convert coordinates to local coordinates.
void operator=(const PatchFunction1< Type > &)=delete
No copy assignment.
virtual bool good() const
Can function be evaluated?
virtual tmp< Field< Type > > transform(const Field< Type > &fld) const
Apply optional transformation.
TypeName("PatchFunction1") declareRunTimeSelectionTable(autoPtr
Runtime type information.
static autoPtr< PatchFunction1< Type > > NewCompat(const polyPatch &pp, const word &entryName, std::initializer_list< std::pair< const char *, int > > compat, const dictionary &dict, const bool faceValues=true, const bool mandatory=true)
Compatibility selector.
virtual tmp< PatchFunction1< Type > > clone() const =0
Return a clone.
static autoPtr< PatchFunction1< Type > > NewIfPresent(const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true)
An optional selector.
const polyPatch const word const word const dictionary const bool faceValues
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Helper class to wrap coordinate system and component-wise scaling.
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'.
A class for handling keywords in dictionaries.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
constant condensation/saturation model.
A patch is a list of labels that address the faces in the global face list.
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)
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.