oppositeFace.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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::oppositeFace
28
29Description
30 Class containing opposite face for a prismatic cell with addressing
31 and a possibility of failure.
32
33SourceFiles
34 oppositeFace.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef oppositeFace_H
39#define oppositeFace_H
40
41#include "face.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class oppositeFace Declaration
50\*---------------------------------------------------------------------------*/
52class oppositeFace
53:
54 public face
55{
56 // Private data
57
58 //- Master face index
59 const label masterIndex_;
60
61 //- Opposite face index
62 const label oppositeIndex_;
63
64
65public:
66
67 // Constructors
68
69 //- Construct from components
71 (
72 const face& f,
73 const label masterIndex,
74 const label oppositeIndex
75 )
76 :
77 face(f),
78 masterIndex_(masterIndex),
79 oppositeIndex_(oppositeIndex)
80
81 {}
82
83
84 // Member Functions
85
86 //- Master face index
87 inline label masterIndex() const
88 {
89 return masterIndex_;
90 }
91
92 //- Slave face index
93 inline label oppositeIndex() const
94 {
95 return oppositeIndex_;
96 }
97
98 //- Does the opposite face exist?
99 inline bool found() const
100 {
101 return oppositeIndex_ >= 0;
102 }
103};
104
105
106// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108} // End namespace Foam
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112#endif
113
114// ************************************************************************* //
A face is a list of labels corresponding to mesh vertices.
Definition: face.H:75
Class containing opposite face for a prismatic cell with addressing and a possibility of failure.
Definition: oppositeFace.H:54
bool found() const
Does the opposite face exist?
Definition: oppositeFace.H:98
label oppositeIndex() const
Slave face index.
Definition: oppositeFace.H:92
oppositeFace(const face &f, const label masterIndex, const label oppositeIndex)
Construct from components.
Definition: oppositeFace.H:70
label masterIndex() const
Master face index.
Definition: oppositeFace.H:86
Namespace for OpenFOAM.
labelList f(nPoints)