equationInitialResidualCondition.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::equationInitialResidualCondition
26 
27 Description
28  Minimum or maximum initial residual run time condition
29 
30 SourceFiles
31  equationInitialResidualCondition.H
32  equationInitialResidualCondition.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef equationInitialResidualCondition_H
37 #define equationInitialResidualCondition_H
38 
39 #include "runTimeCondition.H"
40 #include "NamedEnum.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class equationInitialResidualCondition Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public runTimeCondition
54 {
55 public:
56 
57  enum operatingMode
58  {
60  omMax
61  };
62 
64 
65 
66 protected:
67 
68  // Protected data
69 
70  //- Field name
71  const wordList fieldNames_;
72 
73  //- Value to compare
74  const scalar value_;
75 
76  //- Start checking from time - always skips first iteration
77  scalar timeStart_;
78 
79  //- Operating mode
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("equationInitialResidual");
87 
88  //- Constructor
90  (
91  const word& name,
92  const objectRegistry& obr,
93  const dictionary& dict,
94  functionObjectState& state
95  );
96 
97  //- Destructor
99 
100 
101  // Public Member Functions
102 
103  //- Apply the condition
104  virtual bool apply();
105 
106  //- Write
107  virtual void write();
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
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::equationInitialResidualCondition::mode_
operatingMode mode_
Operating mode.
Definition: equationInitialResidualCondition.H:79
NamedEnum.H
Foam::equationInitialResidualCondition::operatingModeNames
static const NamedEnum< operatingMode, 2 > operatingModeNames
Definition: equationInitialResidualCondition.H:62
Foam::equationInitialResidualCondition::value_
const scalar value_
Value to compare.
Definition: equationInitialResidualCondition.H:73
Foam::equationInitialResidualCondition::omMin
@ omMin
Definition: equationInitialResidualCondition.H:58
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::equationInitialResidualCondition::timeStart_
scalar timeStart_
Start checking from time - always skips first iteration.
Definition: equationInitialResidualCondition.H:76
Foam::equationInitialResidualCondition
Minimum or maximum initial residual run time condition.
Definition: equationInitialResidualCondition.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::equationInitialResidualCondition::apply
virtual bool apply()
Apply the condition.
Definition: equationInitialResidualCondition.C:94
Foam::equationInitialResidualCondition::omMax
@ omMax
Definition: equationInitialResidualCondition.H:59
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::equationInitialResidualCondition::equationInitialResidualCondition
equationInitialResidualCondition(const word &name, const objectRegistry &obr, const dictionary &dict, functionObjectState &state)
Constructor.
Definition: equationInitialResidualCondition.C:62
Foam::equationInitialResidualCondition::fieldNames_
const wordList fieldNames_
Field name.
Definition: equationInitialResidualCondition.H:70
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::equationInitialResidualCondition::TypeName
TypeName("equationInitialResidual")
Runtime type information.
Foam::equationInitialResidualCondition::operatingMode
operatingMode
Definition: equationInitialResidualCondition.H:56
Foam::NamedEnum< operatingMode, 2 >
Foam::equationInitialResidualCondition::write
virtual void write()
Write.
Definition: equationInitialResidualCondition.C:203
Foam::equationInitialResidualCondition::~equationInitialResidualCondition
virtual ~equationInitialResidualCondition()
Destructor.
Definition: equationInitialResidualCondition.C:88