Base class for solver control classes. More...
#include <solverControl.H>


Public Member Functions | |
| TypeName ("solverControl") | |
| Run-time type information. | |
| solverControl (const solver &solver) | |
| Construct from solver. | |
| virtual | ~solverControl ()=default |
| Destructor. | |
| virtual const dictionary | solverDict () const |
| Read controls from optimisationDict. | |
| virtual const dictionary | solutionDict () const |
| Return the solutionControls dictionary. | |
| bool | printMaxMags () const |
| Print max mags of solver fields. | |
| bool | storeInitValues () const |
| Re-initialize. | |
| label | iter () const |
| Return iteration index. | |
| label & | averageIter () |
| Return average iteration index reference. | |
| label | averageIter () const |
| Return const average iteration index reference. | |
| label | averageStartIter () const |
| Return iteration index. | |
| bool | doAverageIter () const |
| Whether or not to add fields of the current iteration to the average fields. | |
| bool | useAveragedFields () const |
| Use averaged fields? For solving the adjoint equations or computing sensitivities based on averaged fields. | |
| bool | average () const |
| Whether averaging is enabled or not. | |
| const solver & | getSolver () const |
| Return reference to the underlaying solver. | |
Protected Member Functions | |
| virtual bool | read () |
| Read controls from optimisationDict. | |
Protected Attributes | |
| const solver & | solver_ |
| Reference to the underlaying solver. | |
| bool | printMaxMags_ |
| Whether to print the max magnitude during each solver iteration. | |
| label | iter_ |
| Current iteration index. | |
| label | averageIter_ |
| Current averaging iteration index. | |
| label | averageStartIter_ |
| Averaging start index. | |
| bool | storeInitValues_ |
| Whether to re-initialize the solution based on the initial time step. Makes sense only for optimisation or FD runs. | |
| bool | average_ |
| Do averaging. | |
| solverControl | ( | const solver & | solver | ) |
Construct from solver.
Definition at line 49 of file solverControl.C.
References average_, averageIter_, averageStartIter_, iter_, printMaxMags_, read(), solutionDict(), solver_, solverDict(), and storeInitValues_.

|
virtualdefault |
Destructor.
|
protectedvirtual |
Read controls from optimisationDict.
Reimplemented in SIMPLEControl, SIMPLEControlOpt, and SIMPLEControlSingleRun.
Definition at line 34 of file solverControl.C.
References averageStartIter_, dictionary::getOrDefault(), printMaxMags_, solutionDict(), and dictionary::subOrEmptyDict().
Referenced by SIMPLEControl::read(), and solverControl().


| TypeName | ( | "solverControl" | ) |
Run-time type information.
|
inlinevirtual |
Read controls from optimisationDict.
Return the solver dictionary
Definition at line 26 of file solverControlI.H.
References solver_.
Referenced by solutionDict(), and solverControl().

|
inlinevirtual |
Return the solutionControls dictionary.
Definition at line 32 of file solverControlI.H.
References solverDict().
Referenced by SIMPLEControl::dict(), read(), and solverControl().


|
inline |
Print max mags of solver fields.
Definition at line 38 of file solverControlI.H.
References printMaxMags_.
|
inline |
Re-initialize.
Definition at line 44 of file solverControlI.H.
References storeInitValues_.
Referenced by adjointRASModel::restoreInitValues().

|
inline |
|
inline |
Return average iteration index reference.
Definition at line 56 of file solverControlI.H.
References averageIter_.
Referenced by objective::accumulateJMean(), and adjointRASModel::computeMeanFields().

|
inline |
Return const average iteration index reference.
Definition at line 62 of file solverControlI.H.
References averageIter_.
|
inline |
Return iteration index.
Definition at line 68 of file solverControlI.H.
References averageStartIter_.
|
inline |
Whether or not to add fields of the current iteration to the average fields.
Definition at line 74 of file solverControlI.H.
References average_, averageStartIter_, and iter_.
Referenced by objective::accumulateJMean(), and adjointRASModel::computeMeanFields().

|
inline |
Use averaged fields? For solving the adjoint equations or computing sensitivities based on averaged fields.
Definition at line 87 of file solverControlI.H.
References average_, and averageIter_.
|
inline |
Whether averaging is enabled or not.
Definition at line 100 of file solverControlI.H.
References average_.
Referenced by adjointRASModel::resetMeanFields(), and adjointRASModel::setMeanFields().

|
inline |
Return reference to the underlaying solver.
Definition at line 106 of file solverControlI.H.
References solver_.
|
protected |
Reference to the underlaying solver.
Definition at line 54 of file solverControl.H.
Referenced by SIMPLEControl::checkMeanSolution(), getSolver(), SIMPLEControlOpt::loop(), SIMPLEControlSingleRun::loop(), SIMPLEControl::read(), solverControl(), solverDict(), SIMPLEControlSingleRun::write(), and SIMPLEControlSingleRun::writeNow().
|
protected |
Whether to print the max magnitude during each solver iteration.
Useful for adjoint solvers
Definition at line 63 of file solverControl.H.
Referenced by printMaxMags(), read(), and solverControl().
|
protected |
Current iteration index.
Definition at line 71 of file solverControl.H.
Referenced by SIMPLEControl::checkMeanSolution(), doAverageIter(), iter(), SIMPLEControlOpt::loop(), SIMPLEControlSingleRun::loop(), SIMPLEControlSingleRun::readIters(), and solverControl().
|
protected |
Current averaging iteration index.
Definition at line 76 of file solverControl.H.
Referenced by averageIter(), averageIter(), solverControl(), and useAveragedFields().
|
protected |
Averaging start index.
Definition at line 81 of file solverControl.H.
Referenced by averageStartIter(), SIMPLEControl::checkMeanSolution(), doAverageIter(), SIMPLEControl::read(), read(), and solverControl().
|
protected |
Whether to re-initialize the solution based on the initial time step. Makes sense only for optimisation or FD runs.
Definition at line 89 of file solverControl.H.
Referenced by solverControl(), and storeInitValues().
|
protected |
Do averaging.
Definition at line 94 of file solverControl.H.
Referenced by average(), SIMPLEControl::checkMeanSolution(), doAverageIter(), SIMPLEControl::read(), solverControl(), and useAveragedFields().