objectMap.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::objectMap
28
29Description
30 An objectMap is a pair of labels defining the mapping of an object from
31 another object, e.g. a cell mapped from a point.
32
33SourceFiles
34 objectMapI.H
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef objectMap_H
39#define objectMap_H
40
41#include "labelList.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48// Forward Declarations
49
50class objectMap;
51inline bool operator==(const objectMap& a, const objectMap& b);
52inline bool operator!=(const objectMap& a, const objectMap& b);
53inline Ostream& operator<<(Ostream&, const objectMap&);
54inline Istream& operator>>(Istream&, objectMap&);
55
56
57/*---------------------------------------------------------------------------*\
58 Class objectMap Declaration
59\*---------------------------------------------------------------------------*/
61class objectMap
62{
63 // Private data
64
65 //- Object index
66 label index_;
67
68 //- Master object index
69 labelList masterObjects_;
70
71
72public:
73
74 // Constructors
75
76 //- Null constructor, with index=-1 and no objects
77 inline objectMap();
78
79 //- Construct from components
80 inline objectMap(const label index, const UList<label>& master);
81
82 //- Construct from Istream
83 inline objectMap(Istream& is);
84
85
86 // Member Functions
87
88 //- Return object index
89 inline label& index();
90 inline label index() const;
91
92 //- Return master object index
93 inline labelList& masterObjects();
94 inline const labelList& masterObjects() const;
95
96
97 // Friend Operators
99 friend bool operator==(const objectMap& a, const objectMap& b);
100 friend bool operator!=(const objectMap& a, const objectMap& b);
101
102
103 // IOstream Operators
107};
108
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112} // End namespace Foam
113
114// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115
116#include "objectMapI.H"
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120#endif
121
122// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: UList.H:94
An objectMap is a pair of labels defining the mapping of an object from another object,...
Definition: objectMap.H:61
friend Ostream & operator<<(Ostream &, const objectMap &)
label & index()
Return object index.
Definition: objectMapI.H:59
friend bool operator==(const objectMap &a, const objectMap &b)
labelList & masterObjects()
Return master object index.
Definition: objectMapI.H:71
friend bool operator!=(const objectMap &a, const objectMap &b)
objectMap()
Null constructor, with index=-1 and no objects.
Definition: objectMapI.H:32
friend Istream & operator>>(Istream &, objectMap &)
Namespace for OpenFOAM.
bool operator!=(const eddy &a, const eddy &b)
Definition: eddy.H:239
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
volScalarField & b
Definition: createFields.H:27