Go to the documentation of this file.
39 equationMaxIterCondition,
56 fieldNames_(
dict.lookup(
"fields")),
58 startIter_(
dict.lookupOrDefault(
"startIter", 2))
60 if (!fieldNames_.size())
63 <<
"No fields supplied: deactivating" <<
endl;
68 startIter_ =
max(startIter_, 2);
82 bool satisfied =
false;
89 if (obr_.time().timeIndex() < startIter_)
95 const fvMesh&
mesh = refCast<const fvMesh>(obr_);
100 forAll(fieldNames_, fieldI)
102 const word& fieldName = fieldNames_[fieldI];
104 if (solverDict.
found(fieldName))
107 const label nIterations = sp.first().nIterations();
108 result[fieldI] = nIterations;
110 if (nIterations > threshold_)
123 <<
"Number of iterations data not found for field "
124 << fieldNames_[i] <<
endl;
135 <<
"Number of iterations data not found for any fields: "
136 <<
"deactivating" <<
endl;
141 if (satisfied && valid)
146 <<
": satisfied using threshold value: " << threshold_ <<
nl;
151 if (result[resultI] != -1)
155 Info<<
" field: " << fieldNames_[resultI]
156 <<
", iterations: " << result[resultI] <<
nl;
Base class for run time conditions.
A class for handling words, derived from string.
Base class for function objects, adding functionality to read/write state information (data required ...
#define forAll(list, i)
Loop across all elements in list.
virtual void write()
Write.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Registry of regIOobjects.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual bool apply()
Apply the condition.
const dictionary & solverPerformanceDict() const
Return the dictionary of solver performance data.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual ~equationMaxIterCondition()
Destructor.
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
label readLabel(Istream &is)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
equationMaxIterCondition(const word &name, const objectRegistry &obr, const dictionary &dict, functionObjectState &state)
Constructor.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.