Volume (cell) region selection class. More...


Public Types | |
| enum | regionTypes : char { vrtAll = 0, vrtCellSet, vrtCellZone } |
| Region type enumeration. More... | |
Public Member Functions | |
| TypeName ("volRegion") | |
| Run-time type information. More... | |
| volRegion (const fvMesh &mesh, const dictionary &dict) | |
| Construct from fvMesh and dictionary. More... | |
| virtual | ~volRegion ()=default |
| Destructor. More... | |
| regionTypes | regionType () const noexcept |
| The region type. More... | |
| const labelList & | cellIDs () const |
| Return the local list of cell IDs. More... | |
| label | nCells () const |
| Return the total number of cells selected in the region. More... | |
| scalar | V () const |
| Return total volume of the selected region. More... | |
| bool | update () |
| Update the cached values as required. More... | |
| virtual bool | read (const dictionary &dict) |
| Read from dictionary. More... | |
| virtual void | updateMesh (const mapPolyMesh &) |
| Update for changes of mesh. More... | |
| virtual void | movePoints (const polyMesh &) |
| Update for mesh point-motion. More... | |
Static Public Attributes | |
| static const Enum< regionTypes > | regionTypeNames_ |
| Region type names. More... | |
Protected Member Functions | |
| bool | useAllCells () const noexcept |
| Use all cells, not the cellIDs. More... | |
| void | writeFileHeader (const writeFile &wf, Ostream &file) const |
| Output file header information. More... | |
Protected Attributes | |
| regionTypes | regionType_ |
| Region type. More... | |
| wordRe | regionName_ |
| Region name (cellSet, cellZone, ...) More... | |
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 143 of file volRegion.C.
References dict, and Foam::read().

|
virtualdefault |
Destructor.
|
inlineprotectednoexcept |
Use all cells, not the cellIDs.
Definition at line 24 of file volRegionI.H.
References volRegion::regionType_, and volRegion::vrtAll.
Referenced by momentum::writeFileHeader(), and momentum::writeValues().

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


| TypeName | ( | "volRegion" | ) |
Run-time type information.
|
inlinenoexcept |
The region type.
Definition at line 31 of file volRegionI.H.
| 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, and List< label >::null().

|
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.

|
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 momentum::writeValues().


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

|
virtual |
Read from dictionary.
Reimplemented in volFieldValue, momentum, randomise, and specieReactionRates< ChemistryModelType >.
Definition at line 171 of file volRegion.C.
References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::flatOutput(), and Foam::nl.
Referenced by randomise::read(), and momentum::read().


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

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

|
static |
Region type names.
Definition at line 130 of file volRegion.H.
|
protected |
|
protected |
Region name (cellSet, cellZone, ...)
Definition at line 188 of file volRegion.H.