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
161 mesh().boundaryMesh()[patchName_].size()
164 applyToSet(action, patchFluxField, set);
169 <<
"Cannot read flux field " << fieldName_
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
fileName filePath(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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const word & name() const
Return const reference to name.
Read field as dictionary (without mesh).
const Time & time() const
Return the top-level database.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
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.
defineTypeNameAndDebug(combustionModel, 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.