lduSchedule.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 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::lduScheduleEntry
28 
29 Description
30  Struct to hold the patch index and the initialisation flag for
31  the patch schedule
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef Foam_lduSchedule_H
36 #define Foam_lduSchedule_H
37 
38 #include "List.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward Declarations
46 
47 struct lduScheduleEntry;
49 
50 //- A List of lduSchedule entries.
52 
53 
54 /*---------------------------------------------------------------------------*\
55  Class lduScheduleEntry Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 struct lduScheduleEntry
59 {
60  label patch;
61  bool init;
62 
63  //- Define patch for initEvaluate()
64  void setInitEvaluate(const label patchi) noexcept
65  {
66  patch = patchi;
67  init = true;
68  }
69 
70  //- Define patch for evaluate()
71  void setEvaluate(const label patchi) noexcept
72  {
73  patch = patchi;
74  init = false;
75  }
76 
77  //- Always unequal: each entry is supposed to be unique!
78  friend bool operator!=(const lduScheduleEntry&, const lduScheduleEntry&)
79  {
80  return true;
81  }
82 
83  friend Ostream& operator<<(Ostream& os, const lduScheduleEntry& lb)
84  {
85  os << lb.patch << token::SPACE << lb.init;
86  return os;
87  }
88 };
89 
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 } // End namespace Foam
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 #endif
98 
99 // ************************************************************************* //
void setEvaluate(const label patchi) noexcept
Define patch for evaluate()
Definition: lduSchedule.H:70
Struct to hold the patch index and the initialisation flag for the patch schedule.
Definition: lduSchedule.H:53
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Definition: lduSchedule.H:46
Space [isspace].
Definition: token.H:131
void setInitEvaluate(const label patchi) noexcept
Define patch for initEvaluate()
Definition: lduSchedule.H:61
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
const direction noexcept
Definition: Scalar.H:258
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
friend Ostream & operator<<(Ostream &os, const lduScheduleEntry &lb)
Definition: lduSchedule.H:84
friend bool operator!=(const lduScheduleEntry &, const lduScheduleEntry &)
Always unequal: each entry is supposed to be unique!
Definition: lduSchedule.H:79
Namespace for OpenFOAM.