38 : mappedPatchBase::getMap(p_.patch());
47 refCast<const fvMesh>(this->mapper().nbrMesh());
50 this->mapper().sameRegion()
51 && this->fieldName_ == iF_.
name()
52 ? refCast<const VolField<Type>>(iF_)
55 const label nbrPatchi = this->mapper().nbrPolyPatch().index();
70 int oldTag = UPstream::msgType();
71 UPstream::msgType() = oldTag + 1;
79 const Type nbrAverageValue =
80 gSum(p_.magSf()*tResult())
83 if (
mag(nbrAverageValue)/
mag(average_) > 0.5)
85 tResult.
ref() *=
mag(average_)/
mag(nbrAverageValue);
89 tResult.
ref() += average_ - nbrAverageValue;
94 UPstream::msgType() = oldTag;
112 fieldName_(
dict.lookupOrDefault<
word>(
"field", iF.
name())),
115 dict.lookupOrDefault<bool>(
"setAverage",
dict.
found(
"average"))
117 average_(setAverage_ ?
dict.lookup<Type>(
"average") :
Zero),
125 if (!mapperPtr_.valid() && !isA<mappedPatchBase>(
p.patch()))
128 str <<
"Field " << iF.
name() <<
" of type "
129 <<
type() <<
" on patch " <<
p.patch().name()
130 <<
" of type " <<
p.patch().type() <<
" does not "
131 <<
"have mapping specified (i.e., neighbourPatch, and/or "
132 <<
"neighbourRegion entries) nor is the patch of "
133 << mappedPolyPatch::typeName <<
" type";
139 this->mapper().validateForField
144 this->mapper().sameUntransformedPatch()
145 && this->fieldName_ == iF.
name()
146 ? mappedPatchBase::from::differentPatch
147 : mappedPatchBase::from::any
163 fieldName_(ptf.fieldName_),
164 setAverage_(ptf.setAverage_),
165 average_(ptf.average_),
168 ptf.mapperPtr_.
valid()
184 fieldName_(ptf.fieldName_),
185 setAverage_(ptf.setAverage_),
186 average_(ptf.average_),
189 ptf.mapperPtr_.
valid()
201 if (mapperPtr_.valid())
203 mapperPtr_->clearOut();
224 if (mapperPtr_.valid())
226 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.
virtual const fileName & name() const
Return the name of the stream.
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....
Mesh data needed to do the Finite Volume discretisation.
Foam::fvPatchFieldMapper.
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.
Base class for mapped patch fields.
const mappedPatchBase & mapper() const
Return the mapping engine.
mappedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void write(Ostream &) const
Write.
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 clearOut()
Clear the mapper if present.
Engine which provides mapping between two patches.
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.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< scalar > mag(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.