46 #ifndef Foam_PatchFunction1_H 47 #define Foam_PatchFunction1_H 64 Ostream& operator<<(Ostream&, const PatchFunction1<Type>&);
170 template<class Derived>
172 Clone(const Derived& fun)
178 template<
class Derived>
187 static autoPtr<PatchFunction1<Type>> New
193 const bool mandatory =
true 201 std::initializer_list<std::pair<const char*,int>> compat,
204 const bool mandatory =
true 229 const bool mandatory =
true 240 virtual bool constant()
const {
return false; }
243 virtual bool good()
const {
return true; }
246 virtual bool uniform()
const = 0;
252 virtual tmp<Field<Type>>
value(
const scalar
x)
const;
268 virtual tmp<Field<Type>>
transform(
const Field<Type>&
fld)
const;
273 const tmp<Field<Type>>& tfld
293 friend Ostream& operator<< <Type>
311 #define makePatchFunction1(Type) \ 313 defineNamedTemplateTypeNameAndDebug(PatchFunction1<Type>, 0); \ 315 defineTemplateRunTimeSelectionTable \ 317 PatchFunction1<Type>, \ 323 #define makePatchFunction1Type(SS, Type) \ 325 defineNamedTemplateTypeNameAndDebug(PatchFunction1Types::SS<Type>, 0); \ 327 PatchFunction1<Type>::adddictionaryConstructorToTable \ 328 <PatchFunction1Types::SS<Type>> \ 329 add##SS##Type##ConstructorToTable_; 333 #define makeConcretePatchFunction1Type(SS, Type) \ 335 defineTypeNameAndDebug(SS, 0); \ 337 PatchFunction1<Type>::adddictionaryConstructorToTable \ 338 <PatchFunction1Types::SS> \ 339 add##SS##Type##ConstructorToTable_; 343 #define makeScalarPatchFunction1(SS) \ 345 makeConcretePatchFunction1Type(SS, scalar); A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool uniform() const =0
Is value uniform (i.e. independent of coordinate)
virtual tmp< Field< Type > > integrate(const scalar x1, const scalar x2) const
Integrate between two (scalar) values.
virtual bool constant() const
Is value constant (i.e. independent of x)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
coordinateScaling< Type > coordSys_
Optional local coordinate system and scaling.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
const polyPatch const word const word const dictionary & dict
virtual bool good() const
Can function be evaluated?
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
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.
A class for managing references or pointers (no reference counting)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
virtual ~PatchFunction1()=default
Destructor.
vectorField pointField
pointField is a vectorField.
Abstract base class to hold the Field mapping addressing and weights.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A class for handling words, derived from Foam::string.
void operator=(const PatchFunction1< Type > &)=delete
No copy assignment.
const polyPatch const word & type
virtual tmp< pointField > localPosition(const pointField &globalPos) const
Helper: optionally convert coordinates to local coordinates.
virtual void autoMap(const FieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
const polyPatch const word const word & entryName
virtual void writeData(Ostream &os) const
Write in dictionary format.
bool faceValues() const noexcept
Generate face or point values on patch?
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 > > value(const scalar x) const
Return value as a function of (scalar) independent variable.
Helper class to wrap coordinate system and component-wise scaling.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual tmp< PatchFunction1< Type > > clone() const =0
Return a clone.
option
Enumeration for the data type and search/match modes (bitmask)
virtual tmp< Field< Type > > transform(const Field< Type > &fld) const
Apply optional transformation.
static autoPtr< PatchFunction1< Type > > NewIfPresent(const polyPatch &pp, const word &entryName, const dictionary &dict, const bool faceValues=true)
An optional selector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
TypeName("PatchFunction1") declareRunTimeSelectionTable(autoPtr
Runtime type information.
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
virtual void rmap(const PatchFunction1< Type > &rhs, const labelList &addr)
Reverse map the given PatchFunction1 onto this PatchFunction1.
static tmp< PatchFunction1< Type > > Clone(const Derived &fun)
Clone a PatchFunction1.
A keyword and a list of tokens is an 'entry'.
Field< Type > returnType
The return type is a field of values.