Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sampled field, optionally scaled to maintain an area-weighted average. More...
Public Member Functions | |
mappedPatchFieldBase (const mappedPatchBase &mapper, const fvPatchField< Type > &patchField, const word &fieldName, const bool setAverage, const Type average, const word &interpolationScheme) | |
Construct from components. More... | |
mappedPatchFieldBase (const mappedPatchBase &mapper, const fvPatchField< Type > &patchField, const dictionary &dict) | |
Construct from dictionary. More... | |
mappedPatchFieldBase (const mappedPatchBase &mapper, const fvPatchField< Type > &patchField) | |
Construct empty. More... | |
mappedPatchFieldBase (const mappedPatchFieldBase< Type > &mapper) | |
Construct copy. More... | |
mappedPatchFieldBase (const mappedPatchBase &mapper, const fvPatchField< Type > &patchField, const mappedPatchFieldBase< Type > &base) | |
Construct copy, resetting patch and field. More... | |
virtual | ~mappedPatchFieldBase () |
Destructor. More... | |
const GeometricField< Type, fvPatchField, volMesh > & | sampleField () const |
Field to sample. Either on my or nbr mesh. More... | |
virtual tmp< Field< Type > > | mappedField () const |
Map sampleField onto *this patch. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
Protected Attributes | |
const mappedPatchBase & | mapper_ |
Mapping engine. More... | |
const fvPatchField< Type > & | patchField_ |
Underlying patch field. More... | |
word | fieldName_ |
Name of field to sample. More... | |
const bool | setAverage_ |
If true adjust the mapped field to maintain average value average_. More... | |
const Type | average_ |
Average value the mapped field is adjusted to maintain if. More... | |
word | interpolationScheme_ |
Interpolation scheme to use for nearestcell mode. More... | |
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sampled field, optionally scaled to maintain an area-weighted average.
{ fieldName T; // default is same as fvPatchField setAverage false; average 1.0; // only if setAverage=true interpolationScheme cellPoint; // default is cell }
Definition at line 64 of file mappedPatchFieldBase.H.
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField, | ||
const word & | fieldName, | ||
const bool | setAverage, | ||
const Type | average, | ||
const word & | interpolationScheme | ||
) |
Construct from components.
Definition at line 39 of file mappedPatchFieldBase.C.
Referenced by mappedPatchFieldBase< Type >::mappedPatchFieldBase().
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 59 of file mappedPatchFieldBase.C.
References dictionary::lookup(), mappedPatchFieldBase< Type >::mappedPatchFieldBase(), and mappedPatchBase::NEARESTCELL.
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField | ||
) |
Construct empty.
Definition at line 88 of file mappedPatchFieldBase.C.
References mappedPatchFieldBase< Type >::mappedPatchFieldBase().
mappedPatchFieldBase | ( | const mappedPatchFieldBase< Type > & | mapper | ) |
Construct copy.
Definition at line 104 of file mappedPatchFieldBase.C.
References mappedPatchFieldBase< Type >::mappedPatchFieldBase().
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField, | ||
const mappedPatchFieldBase< Type > & | base | ||
) |
Construct copy, resetting patch and field.
Definition at line 119 of file mappedPatchFieldBase.C.
|
inlinevirtual |
Destructor.
Definition at line 137 of file mappedPatchFieldBase.H.
References mappedPatchFieldBase< Type >::mappedField(), mappedPatchFieldBase< Type >::sampleField(), and mappedPatchFieldBase< Type >::write().
const GeometricField< Type, fvPatchField, volMesh > & sampleField | ( | ) | const |
Field to sample. Either on my or nbr mesh.
Definition at line 138 of file mappedPatchFieldBase.C.
References polyMesh::boundaryMesh(), and polyBoundaryMesh::mesh().
Referenced by mappedPatchFieldBase< Type >::~mappedPatchFieldBase().
Map sampleField onto *this patch.
Definition at line 169 of file mappedPatchFieldBase.C.
References Foam::abort(), polyMesh::boundaryMesh(), mapDistribute::distribute(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, Foam::gSum(), interpolation< Type >::interpolate(), Foam::mag(), VectorSpace< Vector< scalar >, scalar, 3 >::max, polyBoundaryMesh::mesh(), UPstream::msgType(), primitiveMesh::nCells(), mappedPatchBase::NEARESTCELL, mappedPatchBase::NEARESTFACE, mappedPatchBase::NEARESTPATCHFACE, mappedPatchBase::NEARESTPATCHFACEAMI, primitiveMesh::nFaces(), Foam::nl, fvPatchField< Type >::patch(), patchi, mapDistribute::reverseDistribute(), samples(), List< Type >::setSize(), List< T >::size(), fvPatch::start(), List< Type >::transfer(), and Foam::Zero.
Referenced by mappedPatchFieldBase< Type >::~mappedPatchFieldBase().
|
virtual |
Write.
Reimplemented in mappedFieldFvPatchField< Type >, mappedFixedValueFvPatchField< Type >, and mappedFixedInternalValueFvPatchField< Type >.
Definition at line 315 of file mappedPatchFieldBase.C.
References Foam::writeEntry().
Referenced by mappedPatchFieldBase< Type >::~mappedPatchFieldBase().
|
protected |
Mapping engine.
Definition at line 72 of file mappedPatchFieldBase.H.
|
protected |
Underlying patch field.
Definition at line 75 of file mappedPatchFieldBase.H.
|
protected |
Name of field to sample.
Definition at line 78 of file mappedPatchFieldBase.H.
|
protected |
If true adjust the mapped field to maintain average value average_.
Definition at line 81 of file mappedPatchFieldBase.H.
|
protected |
Average value the mapped field is adjusted to maintain if.
setAverage_ is set true
Definition at line 85 of file mappedPatchFieldBase.H.
|
protected |
Interpolation scheme to use for nearestcell mode.
Definition at line 88 of file mappedPatchFieldBase.H.