Volume (cell) region selection class. More...
Public Types | |
enum | regionTypes { vrtCellZone, vrtAll } |
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 () |
Destructor. More... | |
bool | read (const dictionary &) |
Read from dictionary. More... | |
const regionTypes & | regionType () const |
Return the region type. More... | |
const labelList & | cellIDs () const |
Return the local list of cell IDs. More... | |
label | nCells () const |
Return the number of cells in the region. More... | |
scalar | V () const |
Return total volume of the region. More... | |
Static Public Attributes | |
static const NamedEnum< regionTypes, 2 > | regionTypeNames_ |
Region type names. More... | |
Protected Member Functions | |
void | writeFileHeader (const writeFile &wf, Ostream &file) |
Output file header information. More... | |
Protected Attributes | |
regionTypes | regionType_ |
Region type. More... | |
word | regionName_ |
Region name (patch, zone, etc.) More... | |
label | regionID_ |
Region ID (patch ID, zone ID, etc.) More... | |
Volume (cell) region selection class.
Examples of function object specification:
volRegion0 { . . regionType cellZone; name c0; . . } volRegionAll { . . regionType all; . . }
Property | Description | Required | Default value |
---|---|---|---|
regionType | cellZone or all | no | all |
name | Name of cellZone if required | no |
Definition at line 102 of file volRegion.H.
enum regionTypes |
volRegion | ( | const fvMesh & | mesh, |
const dictionary & | dict | ||
) |
Construct from fvMesh and dictionary.
Definition at line 74 of file volRegion.C.
References Foam::read().
Referenced by volRegion::writeFileHeader().
|
virtual |
Destructor.
Definition at line 98 of file volRegion.C.
References volRegion::read().
Output file header information.
Definition at line 58 of file volRegion.C.
References Foam::endl(), Foam::setw(), volRegion::volRegion(), writeFile::writeCommented(), and writeFile::writeHeaderValue().
Referenced by NamedEnum< compressibleField, 8 >::names(), and volFieldValue::writeFileHeader().
TypeName | ( | "volRegion" | ) |
Run-time type information.
bool read | ( | const dictionary & | dict | ) |
Read from dictionary.
Definition at line 105 of file volRegion.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), and Foam::nl.
Referenced by volRegion::~volRegion().
|
inline |
Return the region type.
Definition at line 29 of file volRegionI.H.
References volRegion::regionType_.
const Foam::labelList & cellIDs | ( | ) | const |
Return the local list of cell IDs.
Definition at line 155 of file volRegion.C.
References List< label >::null().
Foam::label nCells | ( | ) | const |
Return the number of cells in the region.
Definition at line 168 of file volRegion.C.
References Foam::returnReduce().
Foam::scalar V | ( | ) | const |
Return total volume of the region.
Definition at line 181 of file volRegion.C.
References Foam::gSum().
|
static |
Region type names.
Definition at line 125 of file volRegion.H.
Referenced by NamedEnum< compressibleField, 8 >::names().
|
protected |
|
protected |
Region name (patch, zone, etc.)
Definition at line 136 of file volRegion.H.
|
protected |
Region ID (patch ID, zone ID, etc.)
Definition at line 139 of file volRegion.H.