34 namespace functionObjects
46 >::names[] = {
"cellZone",
"all"};
64 file<<
setw(1) <<
':' <<
setw(1) <<
' ' 65 << regionTypeNames_[regionType_] <<
" " << regionName_ <<
endl;
82 dict.
found(
"regionType")
83 ? regionTypeNames_.read(dict.
lookup(
"regionType"))
113 dict.
lookup(
"name") >> regionName_;
115 regionID_ = mesh_.cellZones().findZoneID(regionName_);
120 <<
"Unknown cell zone name: " << regionName_
121 <<
". Valid cell zones are: " << mesh_.cellZones().names()
128 << regionTypeNames_[regionType_]
129 <<
"(" << regionName_ <<
"):" <<
nl 130 <<
" Region has no cells" 145 <<
"Unknown region type. Valid region types are:" 157 if (regionType_ == vrtAll)
163 return mesh_.cellZones()[regionID_];
170 if (regionType_ == vrtAll)
172 return mesh_.globalData().nTotalCells();
183 if (regionType_ == vrtAll)
185 return gSum(mesh_.V());
static const NamedEnum< regionTypes, 2 > regionTypeNames_
Region type names.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const List< label > & null()
Return a null List.
Initialise the NamedEnum HashTable from the static list of names.
bool read(const dictionary &)
Read from dictionary.
label nCells() const
Return the number of cells in the region.
void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
bool read(const char *, int32_t &)
Type gSum(const FieldField< Field, Type > &f)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar V() const
Return total volume of the region.
defineTypeNameAndDebug(Qdot, 0)
volRegion(const fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
void writeFileHeader(const writeFile &wf, Ostream &file)
Output file header information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const labelList & cellIDs() const
Return the local list of cell IDs.
Mesh data needed to do the Finite Volume discretisation.
virtual ~volRegion()
Destructor.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Omanip< int > setw(const int i)
functionObject base class for writing single files
regionTypes
Region type enumeration.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.