![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 oppositeFace 00027 00028 Description 00029 Class containing opposite face for a prismatic cell with addresing 00030 and a possibility of failure. 00031 00032 SourceFiles 00033 oppositeFace.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef oppositeFace_H 00038 #define oppositeFace_H 00039 00040 #include "face.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class oppositeFace Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 class oppositeFace 00052 : 00053 public face 00054 { 00055 // Private data 00056 00057 //- Master face index 00058 const label masterIndex_; 00059 00060 //- Opposite face index 00061 const label oppositeIndex_; 00062 00063 00064 public: 00065 00066 // Constructors 00067 00068 //- Construct from components 00069 oppositeFace 00070 ( 00071 const face& f, 00072 const label masterIndex, 00073 const label oppositeIndex 00074 ) 00075 : 00076 face(f), 00077 masterIndex_(masterIndex), 00078 oppositeIndex_(oppositeIndex) 00079 00080 {} 00081 00082 00083 // Member Functions 00084 00085 //- Master face index 00086 inline label masterIndex() const 00087 { 00088 return masterIndex_; 00089 } 00090 00091 //- Slave face index 00092 inline label oppositeIndex() const 00093 { 00094 return oppositeIndex_; 00095 } 00096 00097 //- Does the opposite face exist? 00098 inline bool found() const 00099 { 00100 return oppositeIndex_ >= 0; 00101 } 00102 }; 00103 00104 00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00106 00107 } // End namespace Foam 00108 00109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00110 00111 #endif 00112 00113 // ************************************************************************* //