46 void Foam::patchFluxToFace::applyToSet
48 const topoSetSource::setAction action,
57 Info<<
" Adding all " << fieldName_
58 << (inflow_ ?
" inflow" :
" outflow") <<
" faces" <<
endl;
64 (inflow_ && patchFluxField[facei] < 0)
65 || (!inflow_ && patchFluxField[facei] >= 0)
68 set.insert(patch.start() + facei);
74 Info<<
" Removing all " << fieldName_
75 << (inflow_ ?
" inflow" :
" outflow") <<
" faces" <<
endl;
81 (inflow_ && patchFluxField[facei] < 0)
82 || (!inflow_ && patchFluxField[facei] >= 0)
85 set.erase(patch.start() + facei);
97 const word& fieldName,
98 const word& patchName,
103 fieldName_(fieldName),
104 patchName_(patchName),
116 fieldName_(
dict.lookup(
"field")),
117 patchName_(
dict.lookup(
"patch")),
130 void Foam::patchFluxToFace::applyToSet
139 mesh().time().
name(),
161 mesh().boundaryMesh()[patchName_].size()
164 applyToSet(action, patchFluxField, set);
169 <<
"Cannot read flux field " << fieldName_
170 <<
" from time " << mesh().time().name() <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
fileName filePath(const word &typeName, const bool global) const
Return complete path + object name if the file exists.
bool headerOk()
Read header of local object without type-checking.
const word & headerClassName() const
Return name of the class name read from header.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Read field as dictionary (without mesh).
A topoSetSource to select patch faces according to the flux direction.
virtual ~patchFluxToFace()
Destructor.
patchFluxToFace(const polyMesh &mesh, const word &fieldName, const word &patchName, const bool inflow)
Construct from components.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Base class of a source for a topoSet.
setAction
Enumeration defining the valid actions.
const polyMesh & mesh() const
General set of labels of mesh quantity (points, cells, faces).
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
IOobject fieldObject(fieldNames[var2field[nVar]], runTime.name(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE)
volScalarField scalarField(fieldObject, mesh)
#define WarningInFunction
Report a warning using Foam::Warning.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
defineTypeNameAndDebug(combustionModel, 0)