Go to the documentation of this file.
38 const DimensionedField<Type, volMesh>& iF
41 Field<Type>(
p.size()),
45 manipulatedMatrix_(false),
46 patchType_(word::null)
54 const DimensionedField<Type, volMesh>& iF,
58 Field<Type>(
p.size()),
62 manipulatedMatrix_(false),
71 const DimensionedField<Type, volMesh>& iF,
79 manipulatedMatrix_(false),
80 patchType_(word::null)
87 const fvPatchField<Type>& ptf,
89 const DimensionedField<Type, volMesh>& iF,
90 const fvPatchFieldMapper& mapper
93 Field<Type>(
p.size()),
97 manipulatedMatrix_(false),
98 patchType_(ptf.patchType_)
101 if (
notNull(iF) && mapper.hasUnmapped())
105 this->map(ptf, mapper);
113 const DimensionedField<Type, volMesh>& iF,
114 const dictionary&
dict,
115 const bool valueRequired
118 Field<Type>(
p.size()),
122 manipulatedMatrix_(false),
123 patchType_(
dict.lookupOrDefault<word>(
"patchType", word::null))
125 if (
dict.found(
"value"))
129 Field<Type>(
"value",
dict,
p.size())
132 else if (!valueRequired)
141 ) <<
"Essential entry 'value' missing"
150 const fvPatchField<Type>& ptf
155 internalField_(ptf.internalField_),
157 manipulatedMatrix_(false),
158 patchType_(ptf.patchType_)
165 const fvPatchField<Type>& ptf,
166 const DimensionedField<Type, volMesh>& iF
173 manipulatedMatrix_(false),
174 patchType_(ptf.patchType_)
183 return patch_.boundaryMesh().mesh();
190 if (&patch_ != &(ptf.
patch_))
193 <<
"different patches for fvPatchField<Type>s"
202 return patch_.deltaCoeffs()*(*
this - patchInternalField());
210 return patch_.patchInternalField(internalField_);
217 patch_.patchInternalField(internalField_, pif);
231 f.setSize(mapper.
size());
234 f = this->patchInternalField();
259 if (mapAddressing[i] < 0)
271 const labelList& localAddrs = mapAddressing[i];
273 if (!localAddrs.
size())
326 manipulatedMatrix_ =
false;
333 manipulatedMatrix_ =
true;
344 manipulatedMatrix_ =
true;
353 if (patchType_.size())
356 << token::END_STATEMENT <<
nl;
362 template<
class EntryType>
366 const word& entryName,
367 const EntryType& value1,
368 const EntryType& value2
371 if (value1 != value2)
373 os.
writeKeyword(entryName) << value2 << token::END_STATEMENT <<
nl;
393 const fvPatchField<Type>& ptf
404 const fvPatchField<Type>& ptf
415 const fvPatchField<Type>& ptf
426 const fvPatchField<scalar>& ptf
429 if (&patch_ != &ptf.
patch())
432 <<
"incompatible patches for patch fields"
443 const fvPatchField<scalar>& ptf
446 if (&patch_ != &ptf.
patch())
459 const Field<Type>&
tf
469 const Field<Type>&
tf
550 const fvPatchField<Type>& ptf
560 const Field<Type>&
tf
584 os.
check(
"Ostream& operator<<(Ostream&, const fvPatchField<Type>&");
virtual void write(Ostream &) const
Write.
virtual void operator=(const UList< Type > &)
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field, sets Updated to false.
void operator-=(const UList< Type > &)
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
virtual label size() const =0
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
void operator+=(const UList< Type > &)
virtual bool direct() const =0
virtual bool hasUnmapped() const =0
Are there unmapped values? I.e. do all size() elements get.
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2) const
Helper function to write the keyword and entry only if the.
Registry of regIOobjects.
virtual Ostream & write(const token &)=0
Write next token to stream.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
Ostream & operator<<(Ostream &, const edgeMesh &)
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
const fvPatch & patch_
Reference to patch.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual const labelUList & directAddressing() const
errorManip< error > abort(error &err)
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void operator=(const Field< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setSize(const label)
Reset size of List.
void operator/=(const UList< scalar > &)
commsTypes
Types of communications.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelListList & addressing() const
void check(const fvPatchField< Type > &) const
Check fvPatchField<Type> against given fvPatchField<Type>
const objectRegistry & db() const
Return local objectRegistry.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
volScalarField scalarField(fieldObject, mesh)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
void operator*=(const UList< scalar > &)
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Foam::fvPatchFieldMapper.
const fvPatch & patch() const
Return patch.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label size() const
Return the number of elements in the UList.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
virtual bool distributed() const
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.