WallSiteData.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) 2011-2016 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::WallSiteData
26 
27 Description
28  Stores the patch ID and templated data to represent a collision
29  with a wall to be passed to the wall model.
30 
31 SourceFiles
32  WallSiteDataI.H
33  WallSiteData.C
34  WallSiteDataIO.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef WallSiteData_H
39 #define WallSiteData_H
40 
41 #include "label.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of friend functions and operators
49 
50 template<class Type>
51 class WallSiteData;
52 
53 template<class Type>
55 
56 template<class Type>
57 Ostream& operator<<(Ostream&, const WallSiteData<Type>&);
58 
59 
60 /*---------------------------------------------------------------------------*\
61  Class WallSiteData Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 template<class Type>
65 class WallSiteData
66 {
67  // Private data
68 
69  //- Index of originating patch
70  label patchi_;
71 
72  //- Wall data
73  Type wallData_;
74 
75 
76 public:
77 
78  // Constructors
79 
80  //- Construct null
81  WallSiteData();
82 
83  //- Construct from components
85  (
86  label patchi,
87  const Type& wallData
88  );
89 
90 
91  //- Destructor
92  ~WallSiteData();
93 
94 
95  // Member Functions
96 
97  //- Return access to the patch index
98  inline label patchIndex() const;
99 
100  //- Return non-const access to the patch index
101  inline label& patchIndex();
102 
103  //- Return access to wall data
104  inline const Type& wallData() const;
105 
106  //- Return non-const access to wall data
107  inline Type& wallData();
108 
109 
110  // Member Operators
111 
112  bool operator==(const WallSiteData<Type>&) const;
113  bool operator!=(const WallSiteData<Type>&) const;
114 
115 
116  // IOstream Operators
117 
118  friend Istream& operator>> <Type>
120 
121  friend Ostream& operator<< <Type>
122  (Ostream&, const WallSiteData<Type>&);
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #include "WallSiteDataI.H"
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137  #include "WallSiteData.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
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
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
label patchIndex() const
Return access to the patch index.
Definition: WallSiteDataI.H:31
bool operator==(const WallSiteData< Type > &) const
Definition: WallSiteData.C:61
const Type & wallData() const
Return access to wall data.
Definition: WallSiteDataI.H:45
bool operator!=(const WallSiteData< Type > &) const
Definition: WallSiteData.C:71
Istream & operator>>(Istream &, directionInfo &)
Stores the patch ID and templated data to represent a collision with a wall to be passed to the wall ...
Definition: WallSiteData.H:50
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
label patchi
WallSiteData()
Construct null.
Definition: WallSiteData.C:31
~WallSiteData()
Destructor.
Definition: WallSiteData.C:53
Namespace for OpenFOAM.