Base class for solver control classes. More...


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

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

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


|
inline |
Print max mags of solver fields.
Definition at line 38 of file solverControlI.H.
Referenced by adjointSpalartAllmaras::correct(), and adjointkOmegaSST::correct().

|
inline |
Re-initialize.
Definition at line 44 of file solverControlI.H.
Referenced by RASModelVariables::allocateInitValues(), RASModelVariables::restoreInitValues(), incompressibleVars::restoreInitValues(), incompressibleVars::setInitFields(), and incompressibleVars::storeInitValues().

|
inline |
Return iteration index.
Definition at line 50 of file solverControlI.H.
|
inline |
Return average iteration index reference.
Definition at line 56 of file solverControlI.H.
Referenced by objective::accumulateJMean(), kOmegaSST::computeMeanFields(), incompressibleAdjointVars::computeMeanFields(), RASModelVariables::computeMeanFields(), incompressibleVars::computeMeanFields(), adjointRASModel::computeMeanFields(), incompressibleAdjointVars::resetMeanFields(), and incompressibleVars::resetMeanFields().

|
inline |
Return const average iteration index reference.
Definition at line 62 of file solverControlI.H.
|
inline |
Return iteration index.
Definition at line 68 of file solverControlI.H.
|
inline |
Whether or not to add fields of the current iteration to the average fields.
Definition at line 74 of file solverControlI.H.
Referenced by objective::accumulateJMean(), kOmegaSST::computeMeanFields(), incompressibleAdjointVars::computeMeanFields(), RASModelVariables::computeMeanFields(), incompressibleVars::computeMeanFields(), 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.
Referenced by kOmegaSST::G(), adjointRASModel::getAdjointTMVariable1(), adjointRASModel::getAdjointTMVariable2(), RASModelVariables::nutRef(), incompressibleVars::p(), incompressibleAdjointMeanFlowVars::pa(), incompressibleVars::phi(), incompressibleAdjointMeanFlowVars::phia(), RASModelVariables::TMVar1(), RASModelVariables::TMVar2(), incompressibleVars::U(), and incompressibleAdjointMeanFlowVars::Ua().

|
inline |
Whether averaging is enabled or not.
Definition at line 100 of file solverControlI.H.
Referenced by kOmegaSST::allocateMeanFields(), RASModelVariables::allocateMeanFields(), incompressibleAdjointMeanFlowVars::computeMeanFields(), incompressibleVars::computeMeanFields(), incompressibleVars::correctNonTurbulentBoundaryConditions(), incompressibleAdjointVars::resetMeanFields(), RASModelVariables::resetMeanFields(), incompressibleVars::resetMeanFields(), adjointRASModel::resetMeanFields(), incompressibleAdjointMeanFlowVars::setMeanFields(), incompressibleVars::setMeanFields(), and adjointRASModel::setMeanFields().

|
protected |
Reference to the underlaying solver.
Definition at line 54 of file solverControl.H.
Referenced by SIMPLEControl::read(), and solverControl::solverDict().
|
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 solverControl::read().
|
protected |
Current iteration index.
Definition at line 71 of file solverControl.H.
|
protected |
Current averaging iteration index.
Definition at line 76 of file solverControl.H.
|
protected |
Averaging start index.
Definition at line 81 of file solverControl.H.
Referenced by solverControl::read(), and SIMPLEControl::read().
|
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.
|
protected |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.