refineCell.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-2016 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::refineCell
28
29Description
30 Container with cells to refine. Refinement given as single direction.
31
32SourceFiles
33 refineCell.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef refineCell_H
38#define refineCell_H
39
40#include "label.H"
41#include "vector.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48// Forward Declarations
49class refineCell;
50Ostream& operator<<(Ostream&, const refineCell&);
51
52
53/*---------------------------------------------------------------------------*\
54 Class refineCell Declaration
55\*---------------------------------------------------------------------------*/
57class refineCell
58{
59 // Private Data
60
61 //- Cell label
62 label cellNo_;
63
64 //- Preferred refinement direction (always normalized).
65 vector direction_;
66
67
68public:
69
70 // Constructors
71
72 //- Default construct
73 refineCell();
74
75 //- From components. Vector will be normalized upon construction.
76 refineCell(const label celli, const vector& direction);
77
78 //- From Istream. Vector will be normalized upon construction.
79 explicit refineCell(Istream& is);
80
81
82 // Member Functions
84 label cellNo() const
85 {
86 return cellNo_;
87 }
89 const vector& direction() const
90 {
91 return direction_;
92 }
93
94
95 // Friend Operators
97 inline friend bool operator==
98 (
99 const refineCell& rc1,
100 const refineCell& rc2
101 )
102 {
103 return (rc1.cellNo() == rc2.cellNo());
104 }
106 inline friend bool operator!=
107 (
108 const refineCell& rc1,
109 const refineCell& rc2
110 )
111 {
112 return !(rc1 == rc2);
113 }
114
115
116 // IOstream Operators
118 friend Ostream& operator<<(Ostream&, const refineCell&);
119};
120
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124} // End namespace Foam
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
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
Container with cells to refine. Refinement given as single direction.
Definition: refineCell.H:57
refineCell()
Default construct.
Definition: refineCell.C:33
const vector & direction() const
Definition: refineCell.H:88
label cellNo() const
Definition: refineCell.H:83
friend Ostream & operator<<(Ostream &, const refineCell &)
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
uint8_t direction
Definition: direction.H:56