averageCondition.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2022 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::functionObjects::runTimeControls::averageCondition
28
29Description
30 Average run time condition - satisfied when average does not change by
31 more than a given value.
32
33See also
34 - Foam::functionObjects::valueAverageBase
35
36SourceFiles
37 averageCondition.H
38 averageCondition.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef functionObjects_runTimeControls_averageCondition_H
43#define functionObjects_runTimeControls_averageCondition_H
44
45#include "runTimeCondition.H"
46#include "valueAverageBase.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52namespace functionObjects
53{
54namespace runTimeControls
55{
56
57/*---------------------------------------------------------------------------*\
58 Class averageCondition Declaration
59\*---------------------------------------------------------------------------*/
62:
63 public runTimeCondition,
64 public valueAverageBase
65{
66protected:
67
68 // Protected Data
69
70 //- Number of start-up iterations before allowing satisfied checks
71 label nIterStartUp_;
72
73 //- Current iteration count
74 label iter_;
75
76
77public:
78
79 //- Runtime type information
80 TypeName("average");
81
82 //- Constructor
84 (
85 const word& name,
86 const objectRegistry& obr,
87 const dictionary& dict,
89 );
90
91 //- Destructor
92 virtual ~averageCondition() = default;
93
94
95 // Public Member Functions
96
97 //- Apply the condition
98 virtual bool apply();
99
100 //- Write
101 virtual void write();
102
103 //- Reset
104 virtual void reset();
105};
106
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110} // End namespace runTimeControls
111} // End namespace functionObjects
112} // End namespace Foam
113
114// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116#endif
117
118// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Average run time condition - satisfied when average does not change by more than a given value.
TypeName("average")
Runtime type information.
label nIterStartUp_
Number of start-up iterations before allowing satisfied checks.
virtual const word & name() const
Return the condition name.
Base class for function objects, adding functionality to read/write state information (data required ...
Base class that computes the ensemble- or time-based singular-value average values,...
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73