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