39 : mappedPatchBase::getMap(this->patch().patch());
48 refCast<const fvMesh>(this->mapper().nbrMesh());
51 this->mapper().sameRegion()
52 && this->fieldName_ == this->internalField().
name()
53 ? refCast<const VolField<Type>>(this->internalField())
56 const label nbrPatchi = this->mapper().nbrPolyPatch().index();
71 int oldTag = UPstream::msgType();
72 UPstream::msgType() = oldTag + 1;
80 const Type nbrAverageValue =
81 gSum(this->patch().magSf()*tResult())
82 /
gSum(this->patch().magSf());
84 if (
mag(nbrAverageValue)/
mag(average_) > 0.5)
86 tResult.
ref() *=
mag(average_)/
mag(nbrAverageValue);
90 tResult.
ref() += average_ - nbrAverageValue;
95 UPstream::msgType() = oldTag;
111 fieldName_(iF.
name()),
127 fieldName_(
dict.lookupOrDefault<
word>(
"field", iF.
name())),
130 dict.lookupOrDefault<bool>(
"setAverage",
dict.
found(
"average"))
145 if (!
mapperPtr_.valid() && !isA<mappedPatchBase>(
p.patch()))
148 str <<
"Field " << this->
internalField().name() <<
" of type "
150 <<
" of type " << p.
patch().type() <<
" does not "
151 <<
"have mapping specified (i.e., neighbourPatch, and/or "
152 <<
"neighbourRegion entries) nor is the patch of "
153 << mappedPolyPatch::typeName <<
" type";
164 this->
mapper().sameUntransformedPatch()
182 fieldName_(ptf.fieldName_),
183 setAverage_(ptf.setAverage_),
184 average_(ptf.average_),
187 ptf.mapperPtr_.
valid()
202 fieldName_(ptf.fieldName_),
203 setAverage_(ptf.setAverage_),
204 average_(ptf.average_),
207 ptf.mapperPtr_.
valid()
225 if (mapperPtr_.valid())
227 mapperPtr_->clearOut();
240 if (mapperPtr_.valid())
242 mapperPtr_->clearOut();
255 this->
operator==(mappedValues(nbrPatchField()));
270 this->internalField().
name(),
279 if (mapperPtr_.valid())
281 mapperPtr_->write(os);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pre-declare SubField and related Field type.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const
Return name.
Output to memory buffer stream.
string str() const
Return the string.
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 any number of values (e....
Abstract base class for field mapping.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
const fvPatch & patch() const
Return patch.
virtual void map(const fvPatchField< Type > &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const polyPatch & patch() const
Return the polyPatch.
virtual const word & name() const
Return name.
void validateForField(const PatchField &field, const FieldType &iF, const dictionary &context, const label froms=from::any) const
Validate that the map is appropriate for the given.
Engine and base class for poly patches which provides interpolative mapping between two globally conf...
This boundary condition maps the values from a neighbouring patch to this patch.
const mappedPatchBase & mapper() const
Return the mapping engine.
virtual void write(Ostream &) const
Write.
mappedValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
autoPtr< mappedPatchBase > mapperPtr_
The mapping engine.
const word fieldName_
The field to map.
tmp< Field< Type > > mappedValues(const Field< Type > &nbrPatchField) const
Return the mapped values, given the neighbouring field.
const fvPatchField< Type > & nbrPatchField() const
Return the neighbouring patch field.
virtual void map(const fvPatchField< Type > &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool valid(const PtrList< ModelType > &l)
string breakIntoIndentedLines(const string &str, const string::size_type nLength=80, const string::size_type nIndent=0)
Break a string up into indented lines.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gSum(const FieldField< Field, Type > &f)
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2)
Helper function to write the keyword and entry only if the.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
const HashTable< dimensionSet > & dimensions()
Get the table of dimension sets.
word name(const bool)
Return a word representation of a bool.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< scalar > mag(const dimensioned< Type > &)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
static const label differentPatch