data.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) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::data
28 
29 Description
30  Database for solution data, solver performance and other reduced data.
31 
32  fvMesh is derived from data so that all fields have access to the data from
33  the mesh reference they hold.
34 
35 SourceFiles
36  data.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef data_H
41 #define data_H
42 
43 #include "IOdictionary.H"
44 #include "solverPerformance.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class data Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class data
56 :
57  public IOdictionary
58 {
59  // Private data
60 
61  //- Previously used time-index, used for reset between iterations
62  mutable label prevTimeIndex_;
63 
64 
65  // Private Member Functions
66 
67  //- No copy construct
68  data(const data&) = delete;
69 
70  //- No copy assignment
71  void operator=(const data&) = delete;
72 
73 
74 public:
75 
76  //- Debug switch
77  static int debug;
78 
79 
80  // Constructors
81 
82  //- Construct for objectRegistry
83  data(const objectRegistry& obr);
84 
85 
86  // Member Functions
87 
88  //- Return the dictionary of solver performance data which
89  //- includes initial and final residuals for convergence checking
90  const dictionary& solverPerformanceDict() const;
91 
92  //- Add/set the solverPerformance entry for the named field
93  template<class Type>
95  (
96  const word& name,
97  const SolverPerformance<Type>& sp
98  ) const;
99 
100  //- Add/set the solverPerformance entry, using its fieldName
101  template<class Type>
103  (
104  const SolverPerformance<Type>& sp
105  ) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #ifdef NoRepository
116  #include "dataTemplates.C"
117 #endif
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Foam::data::debug
static int debug
Debug switch.
Definition: data.H:76
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::data::setSolverPerformance
void setSolverPerformance(const word &name, const SolverPerformance< Type > &sp) const
Add/set the solverPerformance entry for the named field.
Definition: dataTemplates.C:36
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::baseIOdictionary::name
const word & name() const
Definition: baseIOdictionary.C:82
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:60
dataTemplates.C
Foam::data::solverPerformanceDict
const dictionary & solverPerformanceDict() const
Definition: data.C:59
solverPerformance.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::SolverPerformance
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition: SolverPerformance.H:51
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:54