Go to the documentation of this file.
51 fieldToCell::typeName,
52 "\n Usage: fieldToCell field min max\n\n"
53 " Select all cells with field value >= min and <= max\n\n"
66 Info<<
" Field min:" <<
min(field)
67 <<
" max:" <<
max(field) <<
endl;
69 if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
71 Info<<
" Adding all cells with value of field " << fieldName_
72 <<
" within range " << min_ <<
".." << max_ <<
endl;
76 if (field[cellI] >= min_ && field[cellI] <= max_)
82 else if (action == topoSetSource::DELETE)
84 Info<<
" Removing all cells with value of field " << fieldName_
85 <<
" within range " << min_ <<
".." << max_ <<
endl;
89 if (field[cellI] >= min_ && field[cellI] <= max_)
104 const word& fieldName,
110 fieldName_(fieldName),
124 fieldName_(
dict.lookup(
"fieldName")),
138 fieldName_(checkIs(is)),
200 <<
"Cannot read field " << fieldName_
212 applyToSet(action, internalVals, set);
223 applyToSet(action,
mag(internalVals), set);
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
fileName filePath() const
Return complete path + object name if the file exists.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
Read field as dictionary (without mesh).
fieldToCell(const polyMesh &mesh, const word &fieldName, const scalar min, const scalar max)
Construct from components.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static addToUsageTable usage_
Add usage string.
Class with constructor to add usage string to table.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
bool headerOk()
Read and check header info.
void applyToSet(const topoSetSource::setAction action, const scalarField &field, topoSet &set) const
Depending on field values add to or delete from cellSet.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const word & headerClassName() const
Return name of the class name read from header.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
General set of labels of mesh quantity (points, cells, faces).
virtual ~fieldToCell()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
bool insert(const Key &key)
Insert a new entry.
const Time & time() const
Return the top-level database.
IOobject fieldObject(fieldNames[var2field[nVar]], runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define WarningInFunction
Report a warning using Foam::Warning.