46 void Foam::fieldToCell::applyToSet
48 const topoSetSource::setAction action,
53 Info<<
" Field min:" <<
min(field)
54 <<
" max:" <<
max(field) <<
endl;
58 Info<<
" Adding all cells with value of field " << fieldName_
59 <<
" within range " << min_ <<
".." << max_ <<
endl;
63 if (field[celli] >= min_ && field[celli] <= max_)
71 Info<<
" Removing all cells with value of field " << fieldName_
72 <<
" within range " << min_ <<
".." << max_ <<
endl;
76 if (field[celli] >= min_ && field[celli] <= max_)
90 const word& fieldName,
96 fieldName_(fieldName),
104 const polyMesh&
mesh,
105 const dictionary&
dict
123 void Foam::fieldToCell::applyToSet
142 <<
"Cannot read field " << fieldName_
150 const fieldDictionary fieldDict
159 fieldDict,
mesh().nCells()
162 applyToSet(action, internalVals, set);
181 const fieldDictionary fieldDict
190 fieldDict,
mesh().nCells()
193 applyToSet(action,
mag(internalVals), set);
#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.
const word & headerClassName() const
Return name of the class name read from header.
const word & name() const
Return const reference to name.
virtual ~fieldToCell()
Destructor.
fieldToCell(const polyMesh &mesh, const word &fieldName, const scalar min, const scalar max)
Construct from components.
const Time & time() const
Return the top-level database.
setAction
Enumeration defining the valid actions.
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.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)