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 ()=default |
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 &os) 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_ |
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.
{ field T; // default is same as fvPatchField setAverage false; average 1.0; // only if setAverage=true interpolationScheme cellPoint; // default is cell }
Property | Description | Required | Default | |
---|---|---|---|---|
field | name of field to be mapped | no | this field name | |
setAverage | use average value | no | false | |
average | average value to apply if setAverage = yes | partly | ||
interpolationScheme | interpolation scheme | partly | cell |
Definition at line 102 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 55 of file mappedPatchFieldBase.C.
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField, | ||
const dictionary & | dict | ||
) |
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField | ||
) |
Construct empty.
Definition at line 104 of file mappedPatchFieldBase.C.
mappedPatchFieldBase | ( | const mappedPatchFieldBase< Type > & | mapper | ) |
Construct copy.
Definition at line 120 of file mappedPatchFieldBase.C.
mappedPatchFieldBase | ( | const mappedPatchBase & | mapper, |
const fvPatchField< Type > & | patchField, | ||
const mappedPatchFieldBase< Type > & | base | ||
) |
Construct copy, resetting patch and field.
Definition at line 135 of file mappedPatchFieldBase.C.
|
virtualdefault |
Destructor.
const Foam::GeometricField< Type, Foam::fvPatchField, Foam::volMesh > & sampleField | ( | ) | const |
Field to sample. Either on my or nbr mesh.
Definition at line 154 of file mappedPatchFieldBase.C.
References polyMesh::boundaryMesh(), and polyBoundaryMesh::mesh().
|
virtual |
Map sampleField onto *this patch.
Definition at line 183 of file mappedPatchFieldBase.C.
References Foam::abort(), polyMesh::boundaryMesh(), mapDistribute::distribute(), Foam::FatalError, FatalErrorInFunction, polyBoundaryMesh::findPatchID(), forAll, Foam::gSum(), Foam::mag(), Foam::max(), polyBoundaryMesh::mesh(), primitiveMesh::nCells(), Foam::New(), primitiveMesh::nFaces(), Foam::nl, mapDistribute::reverseDistribute(), samples(), and Foam::Zero.
|
virtual |
Write.
Reimplemented in mappedFixedInternalValueFvPatchField< Type >, mappedFieldFvPatchField< Type >, mappedFixedValueFvPatchField< Type >, and mappedFixedPushedInternalValueFvPatchField< Type >.
Definition at line 326 of file mappedPatchFieldBase.C.
References Ostream::writeEntry().
|
protected |
Mapping engine.
Definition at line 114 of file mappedPatchFieldBase.H.
|
protected |
Underlying patch field.
Definition at line 117 of file mappedPatchFieldBase.H.
|
protected |
Name of field to sample.
Definition at line 120 of file mappedPatchFieldBase.H.
|
protected |
If true adjust the mapped field to maintain average value average_.
Definition at line 123 of file mappedPatchFieldBase.H.
|
protected |
Average value the mapped field is adjusted to maintain if setAverage_ is set true
Definition at line 127 of file mappedPatchFieldBase.H.
|
protected |
Interpolation scheme to use for nearestcell mode.
Definition at line 130 of file mappedPatchFieldBase.H.