Volume (cell) region selection class. More...
#include <volRegion.H>


Public Types | |
| enum | regionTypes : char { vrtAll = 0 , vrtCellSet , vrtCellZone } |
| Region type enumeration. More... | |
Public Member Functions | |
| TypeName ("volRegion") | |
| Run-time type information. | |
| volRegion (const fvMesh &mesh, const dictionary &dict) | |
| Construct from fvMesh and dictionary. | |
| virtual | ~volRegion ()=default |
| Destructor. | |
| regionTypes | regionType () const noexcept |
| The region type. | |
| const labelList & | cellIDs () const |
| Return the local list of cell IDs. | |
| label | nCells () const |
| Return the total number of cells selected in the region. | |
| scalar | V () const |
| Return total volume of the selected region. | |
| bool | update () |
| Update the cached values as required. | |
| virtual bool | read (const dictionary &dict) |
| Read from dictionary. | |
| virtual void | updateMesh (const mapPolyMesh &) |
| Update for changes of mesh. | |
| virtual void | movePoints (const polyMesh &) |
| Update for mesh point-motion. | |
Static Public Attributes | |
| static const Enum< regionTypes > | regionTypeNames_ |
| Region type names. | |
Protected Member Functions | |
| bool | useAllCells () const noexcept |
| Use all cells, not the cellIDs. | |
| void | writeFileHeader (const writeFile &wf, Ostream &file) const |
| Output file header information. | |
Protected Attributes | |
| regionTypes | regionType_ |
| Region type. | |
| wordRe | regionName_ |
| Region name (cellSet, cellZone, ...). | |
Volume (cell) region selection class.
The adjustments for mesh changes have been implemented with a lazy evaluation, to avoid unnecessary recalculation until the values are actually required. The update() method is used to ensure the cache values are up-to-date.
Examples of function object specification:
volRegion0
{
.
.
regionType cellZone;
name c0;
.
.
}
volRegionAll
{
.
.
regionType all;
.
.
}
| Property | Description | Required | Default |
|---|---|---|---|
regionType | Selection type: all/cellSet/cellZone | no | all |
name | Name of cellSet/cellZone if required | conditional |
Definition at line 111 of file volRegion.H.
| enum regionTypes : char |
Region type enumeration.
| Enumerator | |
|---|---|
| vrtAll | All cells. |
| vrtCellSet | A cellSet. |
| vrtCellZone | A cellZone. |
Definition at line 120 of file volRegion.H.
| volRegion | ( | const fvMesh & | mesh, |
| const dictionary & | dict ) |
Construct from fvMesh and dictionary.
Definition at line 142 of file volRegion.C.
References dict, mesh, Foam::name(), read(), regionName_, regionType_, regionTypeNames_, vrtAll, and Foam::Zero.
Referenced by momentum::momentum(), momentum::momentum(), randomise::randomise(), specieReactionRates< ChemistryModelType >::specieReactionRates(), TypeName(), volFieldValue::volFieldValue(), volFieldValue::volFieldValue(), and ~volRegion().


|
virtualdefault |
Destructor.
References cellIDs(), dict, movePoints(), nCells(), Foam::noexcept, read(), regionType(), update(), updateMesh(), V(), and volRegion().

|
inlineprotectednoexcept |
Use all cells, not the cellIDs.
Definition at line 24 of file volRegionI.H.
References Foam::noexcept, regionType_, and vrtAll.
Referenced by volFieldValue::filterField(), specieReactionRates< ChemistryModelType >::write(), momentum::writeFileHeader(), and momentum::writeValues().

Output file header information.
Definition at line 126 of file volRegion.C.
References Foam::endl(), regionName_, regionType_, regionTypeNames_, Foam::setw(), writeFile::writeCommented(), and writeFile::writeHeaderValue().
Referenced by volFieldValue::writeFileHeader().


| TypeName | ( | "volRegion" | ) |
Run-time type information.
References dict, mesh, TypeName(), and volRegion().
Referenced by TypeName().


|
inlinenoexcept |
The region type.
Definition at line 31 of file volRegionI.H.
References Foam::noexcept, and regionType_.
Referenced by ~volRegion().

| const Foam::labelList & cellIDs | ( | ) | const |
Return the local list of cell IDs.
Empty or invalid for 'all'
Definition at line 203 of file volRegion.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, List< label >::null(), regionType_, vrtCellSet, and vrtCellZone.
Referenced by volFieldValue::filterField(), specieReactionRates< ChemistryModelType >::write(), and ~volRegion().


|
inline |
Return the total number of cells selected in the region.
Definition at line 37 of file volRegionI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by ~volRegion().


|
inline |
Return total volume of the selected region.
Definition at line 52 of file volRegionI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
Referenced by volFieldValue::getFieldValues(), volFieldValue::processValues(), volFieldValue::write(), specieReactionRates< ChemistryModelType >::write(), volFieldValue::writeAll(), volFieldValue::writeValues(), momentum::writeValues(), and ~volRegion().


| bool update | ( | ) |
Update the cached values as required.
Definition at line 243 of file volRegion.C.
Referenced by randomise::calc(), volFieldValue::write(), specieReactionRates< ChemistryModelType >::write(), and ~volRegion().

|
virtual |
Read from dictionary.
Reimplemented in volFieldValue, momentum, randomise, specieReactionRates< ChemistryModelType >, specieReactionRates< BasicChemistryModel< psiReactionThermo > >, and specieReactionRates< BasicChemistryModel< rhoReactionThermo > >.
Definition at line 171 of file volRegion.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::flatOutput(), Foam::nl, regionName_, regionType_, regionTypeNames_, vrtAll, vrtCellSet, and vrtCellZone.
Referenced by momentum::read(), randomise::read(), volRegion(), and ~volRegion().


|
virtual |
Update for changes of mesh.
Reimplemented in momentum.
Definition at line 255 of file volRegion.C.
Referenced by momentum::updateMesh(), and ~volRegion().

|
virtual |
Update for mesh point-motion.
Reimplemented in momentum.
Definition at line 261 of file volRegion.C.
Referenced by momentum::movePoints(), and ~volRegion().

|
static |
Region type names.
Definition at line 130 of file volRegion.H.
Referenced by momentum::read(), read(), volRegion(), momentum::writeFileHeader(), writeFileHeader(), volFieldValue::writeValues(), and momentum::writeValues().
|
protected |
Region type.
Definition at line 183 of file volRegion.H.
Referenced by cellIDs(), momentum::read(), read(), regionType(), useAllCells(), volRegion(), momentum::writeFileHeader(), writeFileHeader(), volFieldValue::writeValues(), and momentum::writeValues().
|
protected |
Region name (cellSet, cellZone, ...).
Definition at line 188 of file volRegion.H.
Referenced by momentum::read(), read(), volRegion(), momentum::writeFileHeader(), writeFileHeader(), volFieldValue::writeValues(), and momentum::writeValues().