equationMaxIterCondition.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::equationMaxIterCondition
26 
27 Description
28  Maximum number of equation iterations run time condition
29 
30 SourceFiles
31  equationMaxIterCondition.H
32  equationMaxIterCondition.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef equationMaxIterCondition_H
37 #define equationMaxIterCondition_H
38 
39 #include "runTimeCondition.H"
40 #include "NamedEnum.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class equationMaxIterCondition Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public runTimeCondition
54 {
55 protected:
56 
57  // Protected data
58 
59  //- Field name
60  const wordList fieldNames_;
61 
62  //- Threshold for maximum number of iterations
63  const label threshold_;
64 
65  //- Start checking from iteration - always skips first iteration
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("equationMaxIter");
73 
74  //- Constructor
76  (
77  const word& name,
78  const objectRegistry& obr,
79  const dictionary& dict,
80  functionObjectState& state
81  );
82 
83  //- Destructor
84  virtual ~equationMaxIterCondition();
85 
86 
87  // Public Member Functions
88 
89  //- Apply the condition
90  virtual bool apply();
91 
92  //- Write
93  virtual void write();
94 };
95 
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #endif
104 
105 // ************************************************************************* //
Foam::runTimeCondition
Base class for run time conditions.
Definition: runTimeCondition.H:54
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::functionObjectState
Base class for function objects, adding functionality to read/write state information (data required ...
Definition: functionObjectState.H:54
Foam::equationMaxIterCondition::write
virtual void write()
Write.
Definition: equationMaxIterCondition.C:167
NamedEnum.H
Foam::equationMaxIterCondition::startIter_
label startIter_
Start checking from iteration - always skips first iteration.
Definition: equationMaxIterCondition.H:65
Foam::equationMaxIterCondition::fieldNames_
const wordList fieldNames_
Field name.
Definition: equationMaxIterCondition.H:59
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:50
runTimeCondition.H
Foam::runTimeCondition::name
virtual const word & name() const
Return the condition name.
Definition: runTimeCondition.C:92
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::equationMaxIterCondition::apply
virtual bool apply()
Apply the condition.
Definition: equationMaxIterCondition.C:80
Foam::equationMaxIterCondition
Maximum number of equation iterations run time condition.
Definition: equationMaxIterCondition.H:50
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::equationMaxIterCondition::~equationMaxIterCondition
virtual ~equationMaxIterCondition()
Destructor.
Definition: equationMaxIterCondition.C:74
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::equationMaxIterCondition::threshold_
const label threshold_
Threshold for maximum number of iterations.
Definition: equationMaxIterCondition.H:62
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::equationMaxIterCondition::TypeName
TypeName("equationMaxIter")
Runtime type information.
Foam::equationMaxIterCondition::equationMaxIterCondition
equationMaxIterCondition(const word &name, const objectRegistry &obr, const dictionary &dict, functionObjectState &state)
Constructor.
Definition: equationMaxIterCondition.C:48