coupledFacePair.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 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::coupledFacePair
26 
27 Description
28  Data associated with a pair of coupled faces
29 
30 SourceFiles
31  coupledFacePair.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef coupledFacePair_H
36 #define coupledFacePair_H
37 
38 #include "label.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward declaration of friend functions and operators
46 
47 class coupledFacePair;
48 
50 
51 
52 /*---------------------------------------------------------------------------*\
53  Class coupledFacePair Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class coupledFacePair
57 {
58  // Private Data
59 
60  //- STAR couple ID
61  label coupleIndex_;
62 
63  //- Master cell (lower cell label)
64  label masterCellIndex_;
65 
66  //- Master face (lower cell label)
67  label masterFaceIndex_;
68 
69  //- Slave cell (higher cell label)
70  label slaveCellIndex_;
71 
72  //- Slave face (higher cell label)
73  label slaveFaceIndex_;
74 
75  //- Integral or arbitrary flag
76  bool integralMatch_;
77 
78 
79 public:
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const label coupleNo, // STAR couple ID
88  const label mC, const label mF, // master cell and face
89  const label sC, const label sF, // slave cell and face
90  const label integral
91  );
92 
93 
94  // Member Functions
95 
96  //- Return STAR couple ID
97  label coupleIndex() const
98  {
99  return coupleIndex_;
100  }
101 
102  //- Return master cell
103  label masterCell() const
104  {
105  return masterCellIndex_;
106  }
107 
108  //- Return master face
109  label masterFace() const
110  {
111  return masterFaceIndex_;
112  }
113 
114  //- Return slave cell
115  label slaveCell() const
116  {
117  return slaveCellIndex_;
118  }
119 
120  //- Return slave face
121  label slaveFace() const
122  {
123  return slaveFaceIndex_;
124  }
125 
126  //- Is this an integral match?
127  bool integralMatch() const
128  {
129  return integralMatch_;
130  }
131 
132  // IOstream Operators
133 
134  friend Ostream& operator<<(Ostream&, const coupledFacePair&);
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Data associated with a pair of coupled faces.
label coupleIndex() const
Return STAR couple ID.
label slaveFace() const
Return slave face.
friend Ostream & operator<<(Ostream &, const coupledFacePair &)
bool integralMatch() const
Is this an integral match?
label masterCell() const
Return master cell.
label slaveCell() const
Return slave cell.
label masterFace() const
Return master face.
coupledFacePair(const label coupleNo, const label mC, const label mF, const label sC, const label sF, const label integral)
Construct from components.
Namespace for OpenFOAM.
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
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)