58#ifndef mappedPatchFieldBase_H
59#define mappedPatchFieldBase_H
70template<
class>
class interpolation;
79class mappedPatchFieldBase
84 static Type getAverage(
const dictionary&
dict,
bool mandatory);
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,
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))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
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.
const mappedPatchBase & mapper_
Mapping engine.
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.
virtual tmp< Field< Type > > mappedField() const
Map sampleField onto *this patch.
const GeometricField< T, fvPatchField, volMesh > & sampleField(const word &fieldName) const
Field to sample. Either on my or nbr mesh.
static const mappedPatchBase & mapper(const fvPatch &p, const DimensionedField< Type, volMesh > &iF)
Check that patch is of correct type.
word fieldName_
Name of field to sample.
virtual tmp< scalarField > mappedWeightField() const
Map optional weightField onto *this patch. Default is deltaCoeffs.
virtual tmp< Field< Type > > mappedInternalField() const
Map internal of sampleField onto *this patch.
const GeometricField< Type, fvPatchField, volMesh > & sampleField() const
Field to sample. Either on my or nbr mesh.
const fvPatchField< Type > & patchField_
Underlying patch field.
word interpolationScheme_
Interpolation scheme to use for nearestcell mode.
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.
const bool setAverage_
If true adjust the mapped field to maintain average value average_.
void distribute(const word &fieldName, Field< T > &newValues) const
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.
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)