58 #ifndef mappedPatchFieldBase_H 59 #define mappedPatchFieldBase_H 70 template<
class>
class interpolation;
72 class mappedPatchBase;
79 class mappedPatchFieldBase
84 static Type getAverage(
const dictionary&
dict,
bool mandatory);
121 const word& fieldName,
131 const word& fieldName,
134 const label constructSize,
146 const word& fieldName,
160 const word& fieldName,
169 const bool allowUnset,
175 const word& fieldName,
189 const word& fieldName,
190 const bool setAverage,
192 const word& interpolationScheme
245 const word& fieldName
263 const word& weightFieldName,
void initRetrieveField(const objectRegistry &obr, const word ®ion, const word &patch, const labelListList &map, const word &fieldName, const Field< T > &fld) const
Construct field from registered elements.
word interpolationScheme_
Interpolation scheme to use for nearestcell mode.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static const mappedPatchBase & mapper(const fvPatch &p, const DimensionedField< Type, volMesh > &iF)
Check that patch is of correct type.
virtual void write(Ostream &os) const
Write.
virtual tmp< scalarField > mappedWeightField() const
Map optional weightField onto *this patch. Default is deltaCoeffs.
const mappedPatchBase & mapper_
Mapping engine.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual tmp< Field< Type > > mappedInternalField() const
Map internal of sampleField onto *this patch.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Generic GeometricField class.
const GeometricField< Type, fvPatchField, volMesh > & sampleField() const
Field to sample. Either on my or nbr mesh.
const bool setAverage_
If true adjust the mapped field to maintain average value average_.
A class for handling words, derived from Foam::string.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
const Type average_
Average value the mapped field is adjusted to maintain if setAverage_ is set true.
const fvPatchField< Type > & patchField_
Underlying patch field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool storeAndRetrieveField(const word &fieldName, const label myComm, const labelListList &subMap, const label constructSize, const labelListList &constructMap, const labelListList &address, const scalarListList &weights, Field< T > &fld) const
Helper : storeField and retrieveField and interpolate. Leaves fld.
virtual tmp< Field< Type > > mappedField() const
Map sampleField onto *this patch.
OBJstream os(runTime.globalPath()/outputName)
mappedPatchFieldBase(const mappedPatchBase &mapper, const fvPatchField< Type > &patchField, const word &fieldName, const bool setAverage, const Type average, const word &interpolationScheme)
Construct from components.
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
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))
void storeField(const objectRegistry &obr, const word ®ion, const word &patch, const label myComm, const labelListList &procToMap, const word &fieldName, const Field< T > &fld) const
Store elements of field onto (sub) registry.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
word fieldName_
Name of field to sample.
bool retrieveField(const bool allowUnset, const objectRegistry &obr, const word ®ion, const word &patch, const label myComm, const labelListList &procToMap, const word &fieldName, Field< T > &fld) const
Construct field from registered elements.
A class for managing temporary objects.
Registry of regIOobjects.
void distribute(const word &fieldName, Field< T > &newValues) const
Wrapper for mapDistribute::distribute that knows about dabase mapping.