![]() |
|
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 objectMap 00027 00028 Description 00029 An objectMap is a pair of labels defining the mapping of an object from 00030 another object, e.g. a cell mapped from a point. 00031 00032 SourceFiles 00033 objectMapI.H 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef objectMap_H 00038 #define objectMap_H 00039 00040 #include "labelList.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 /*---------------------------------------------------------------------------*\ 00048 Class objectMap Declaration 00049 \*---------------------------------------------------------------------------*/ 00050 00051 class objectMap 00052 { 00053 // Private data 00054 00055 //- Object index 00056 label index_; 00057 00058 //- Master object index 00059 labelList masterObjects_; 00060 00061 00062 public: 00063 00064 // Constructors 00065 00066 //- Null constructor for lists 00067 inline objectMap(); 00068 00069 //- Construct from components 00070 inline objectMap(const label index, const labelList& master); 00071 00072 //- Construct from Istream 00073 inline objectMap(Istream&); 00074 00075 00076 // Member Functions 00077 00078 //- Return object index 00079 inline label index() const; 00080 00081 //- Return master object index 00082 inline const labelList& masterObjects() const; 00083 00084 00085 // Friend Operators 00086 00087 inline friend bool operator==(const objectMap& a, const objectMap& b); 00088 inline friend bool operator!=(const objectMap& a, const objectMap& b); 00089 00090 00091 // IOstream Operators 00092 00093 inline friend Ostream& operator<<(Ostream&, const objectMap&); 00094 }; 00095 00096 00097 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00098 00099 } // End namespace Foam 00100 00101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00102 00103 #include "objectMapI.H" 00104 00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00106 00107 #endif 00108 00109 // ************************************************************************* //