Base class for solution control classes. More...
Data Structures | |
struct | fieldData |
Public Member Functions | |
TypeName ("solutionControl") | |
Run-time type information. More... | |
solutionControl (fvMesh &mesh, const word &algorithmName) | |
Construct from mesh. More... | |
virtual | ~solutionControl () |
Destructor. More... | |
const dictionary & | dict () const |
Return the solution dictionary. More... | |
label | corr () const |
Current corrector loop index. More... | |
label | corrNonOrtho () const |
Current non-orthogonal corrector index. More... | |
label | nNonOrthCorr () const |
Maximum number of non-orthogonal correctors. More... | |
bool | finalNonOrthogonalIter () const |
Helper function to identify final non-orthogonal iteration. More... | |
bool | momentumPredictor () const |
Flag to indicate to solve for momentum. More... | |
bool | transonic () const |
Flag to indicate to solve using transonic algorithm. More... | |
bool | consistent () const |
Flag to indicate to relax pressure using the. More... | |
virtual bool | loop ()=0 |
Main control loop. More... | |
bool | correctNonOrthogonal () |
Non-orthogonal corrector loop. More... | |
![]() | |
TypeName ("IOobject") | |
Runtime type information. More... | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, registry, io options. More... | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, local, registry, io options. More... | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from path, registry, io options. More... | |
IOobject (const IOobject &io, const word &name) | |
Construct as copy resetting name. More... | |
Foam::autoPtr< IOobject > | clone () const |
Clone. More... | |
virtual | ~IOobject () |
Destructor. More... | |
const Time & | time () const |
Return time. More... | |
const objectRegistry & | db () const |
Return the local objectRegistry. More... | |
const word & | name () const |
Return name. More... | |
const word & | headerClassName () const |
Return name of the class name read from header. More... | |
string & | note () |
Return non-constant access to the optional note. More... | |
const string & | note () const |
Return the optional note. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
bool & | registerObject () |
Register object created from this IOobject with registry if true. More... | |
bool | registerObject () const |
Register object created from this IOobject with registry if true. More... | |
readOption | readOpt () const |
readOption & | readOpt () |
writeOption | writeOpt () const |
writeOption & | writeOpt () |
word | group () const |
Return group (extension part of name) More... | |
word | member () const |
Return member (name without the extension) More... | |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const |
fileName & | instance () |
const fileName & | local () const |
fileName | path () const |
Return complete path. More... | |
fileName | path (const word &instance, const fileName &local="") const |
Return complete path with alternative instance and local. More... | |
fileName | objectPath () const |
Return complete path + object name. More... | |
fileName | filePath () const |
Return complete path + object name if the file exists. More... | |
bool | readHeader (Istream &) |
Read header. More... | |
bool | headerOk () |
Read and check header info. More... | |
bool | writeHeader (Ostream &) const |
Write header. More... | |
bool | writeHeader (Ostream &, const word &objectType) const |
Write header. Allow override of type. More... | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. More... | |
void | operator= (const IOobject &) |
template<class Name > | |
Foam::word | groupName (Name name, const word &group) |
Protected Member Functions | |
virtual void | read (const bool absTolOnly) |
Read controls from fvSolution dictionary. More... | |
virtual void | read () |
Read controls from fvSolution dictionary. More... | |
virtual label | applyToField (const word &fieldName, const bool useRegEx=true) const |
Return index of field in residualControl_ if present. More... | |
virtual bool | criteriaSatisfied ()=0 |
Return true if all convergence checks are satisfied. More... | |
virtual void | storePrevIterFields () const |
Store previous iteration fields. More... | |
template<class Type > | |
void | storePrevIter () const |
Store previous iteration field for vol<Type>Fields. More... | |
template<class Type > | |
void | maxTypeResidual (const word &fieldName, ITstream &data, scalar &firstRes, scalar &lastRes) const |
scalar | maxResidual (const word &fieldName, ITstream &data, scalar &lastRes) const |
![]() | |
Istream * | objectStream () |
Construct and return an IFstream for the object. More... | |
Istream * | objectStream (const fileName &) |
Construct and return an IFstream for the object given the. More... | |
void | setBad (const string &) |
Set the object state to bad. More... | |
Protected Attributes | |
fvMesh & | mesh_ |
Reference to the mesh database. More... | |
List< fieldData > | residualControl_ |
List of residual data per field. More... | |
const word | algorithmName_ |
The dictionary name, e.g. SIMPLE, PIMPLE. More... | |
label | nNonOrthCorr_ |
Maximum number of non-orthogonal correctors. More... | |
bool | momentumPredictor_ |
Flag to indicate to solve for momentum. More... | |
bool | transonic_ |
Flag to indicate to solve using transonic algorithm. More... | |
bool | consistent_ |
Flag to indicate to relax pressure using the. More... | |
label | corr_ |
Current corrector loop index. More... | |
label | corrNonOrtho_ |
Current non-orthogonal corrector loop index. More... | |
Private Member Functions | |
solutionControl (const solutionControl &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const solutionControl &) |
Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
![]() | |
enum | objectState { GOOD, BAD } |
Enumeration defining the valid states of an IOobject. More... | |
enum | readOption { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ } |
Enumeration defining the read options. More... | |
enum | writeOption { AUTO_WRITE = 0, NO_WRITE = 1 } |
Enumeration defining the write options. More... | |
![]() | |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
Split path into instance, local, name components. More... | |
template<class Name > | |
static word | groupName (Name name, const word &group) |
template<class Stream > | |
static Stream & | writeBanner (Stream &os, bool noHint=false) |
Write the standard OpenFOAM file/dictionary banner. More... | |
template<class Stream > | |
static Stream & | writeDivider (Stream &os) |
Write the standard file section divider. More... | |
template<class Stream > | |
static Stream & | writeEndDivider (Stream &os) |
Write the standard end file divider. More... | |
static void | replaceFileName (const word &from, const word &to) |
|
private |
Disallow default bitwise copy construct.
solutionControl | ( | fvMesh & | mesh, |
const word & | algorithmName | ||
) |
Construct from mesh.
Definition at line 216 of file solutionControl.C.
|
virtual |
Destructor.
Definition at line 238 of file solutionControl.C.
|
protectedvirtual |
Read controls from fvSolution dictionary.
Definition at line 38 of file solutionControl.C.
References solutionControl::fieldData::absTol, solutionControl::applyToField(), solutionControl::consistent_, solutionControl::dict(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), Foam::Info, solutionControl::fieldData::initialResidual, dictionary::lookup(), dictionary::lookupOrDefault(), solutionControl::momentumPredictor_, solutionControl::fieldData::name, Foam::nl, solutionControl::nNonOrthCorr_, Foam::readScalar(), solutionControl::fieldData::relTol, solutionControl::residualControl_, solutionDict(), and solutionControl::transonic_.
|
protectedvirtual |
Read controls from fvSolution dictionary.
Reimplemented in pimpleControl, and simpleControl.
Definition at line 136 of file solutionControl.C.
References Foam::read().
Referenced by simpleControl::read(), and pimpleControl::read().
|
protectedvirtual |
Return index of field in residualControl_ if present.
Definition at line 143 of file solutionControl.C.
References forAll, string::match(), and Foam::name().
Referenced by solutionControl::read().
|
protectedpure virtual |
Return true if all convergence checks are satisfied.
Implemented in pimpleControl, and simpleControl.
|
protectedvirtual |
Store previous iteration fields.
Definition at line 164 of file solutionControl.C.
|
protected |
Store previous iteration field for vol<Type>Fields.
Definition at line 33 of file solutionControlTemplates.C.
References solutionControl::algorithmName_, Foam::endl(), fld(), forAllIter, Foam::Info, solutionControl::mesh_, and solution::relaxField().
|
protected |
Definition at line 177 of file solutionControl.C.
References Foam::cmptMax().
|
protected |
Definition at line 196 of file solutionControl.C.
|
private |
Disallow default bitwise assignment.
TypeName | ( | "solutionControl" | ) |
Run-time type information.
|
inline |
Return the solution dictionary.
Definition at line 28 of file solutionControlI.H.
References solutionControl::algorithmName_, solutionControl::mesh_, solution::solutionDict(), and dictionary::subDict().
Referenced by main(), pimpleControl::read(), and solutionControl::read().
|
inline |
Current corrector loop index.
Definition at line 34 of file solutionControlI.H.
|
inline |
Current non-orthogonal corrector index.
Definition at line 40 of file solutionControlI.H.
|
inline |
Maximum number of non-orthogonal correctors.
Definition at line 46 of file solutionControlI.H.
|
inline |
Helper function to identify final non-orthogonal iteration.
Definition at line 52 of file solutionControlI.H.
Referenced by main().
|
inline |
Flag to indicate to solve for momentum.
Definition at line 58 of file solutionControlI.H.
|
inline |
Flag to indicate to solve using transonic algorithm.
Definition at line 64 of file solutionControlI.H.
|
inline |
Flag to indicate to relax pressure using the.
"consistent" approach of SIMPLEC
Definition at line 70 of file solutionControlI.H.
|
pure virtual |
Main control loop.
Implemented in pimpleControl, and simpleControl.
|
inline |
Non-orthogonal corrector loop.
Definition at line 76 of file solutionControlI.H.
References Foam::endl(), and Foam::Info.
Referenced by main().
|
protected |
Reference to the mesh database.
Definition at line 65 of file solutionControl.H.
Referenced by solutionControl::dict(), simpleControl::simpleControl(), and solutionControl::storePrevIter().
List of residual data per field.
Definition at line 68 of file solutionControl.H.
Referenced by pimpleControl::pimpleControl(), solutionControl::read(), and simpleControl::simpleControl().
|
protected |
The dictionary name, e.g. SIMPLE, PIMPLE.
Definition at line 71 of file solutionControl.H.
Referenced by solutionControl::dict(), pimpleControl::pimpleControl(), simpleControl::simpleControl(), and solutionControl::storePrevIter().
|
protected |
Maximum number of non-orthogonal correctors.
Definition at line 77 of file solutionControl.H.
Referenced by solutionControl::read().
|
protected |
Flag to indicate to solve for momentum.
Definition at line 80 of file solutionControl.H.
Referenced by solutionControl::read().
|
protected |
Flag to indicate to solve using transonic algorithm.
Definition at line 83 of file solutionControl.H.
Referenced by solutionControl::read().
|
protected |
Flag to indicate to relax pressure using the.
"consistent" approach of SIMPLEC
Definition at line 87 of file solutionControl.H.
Referenced by solutionControl::read().
|
protected |
Current corrector loop index.
Definition at line 93 of file solutionControl.H.
|
protected |
Current non-orthogonal corrector loop index.
Definition at line 96 of file solutionControl.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.