1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "referredWallFace.H"
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 Foam::referredWallFace::referredWallFace()
38 Foam::referredWallFace::referredWallFace
41 const pointField& pts,
49 if (this->size() != pts_.size())
53 "Foam::referredWallFace::referredWallFace"
56 "const pointField& pts, "
59 ) << "Face and pointField are not the same size. " << nl << (*this)
65 Foam::referredWallFace::referredWallFace(const referredWallFace& rWF)
71 if (this->size() != pts_.size())
75 "Foam::referredWallFace::referredWallFace"
77 "const referredWallFace& rWF"
79 ) << "Face and pointField are not the same size. " << nl << (*this)
85 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
87 Foam::referredWallFace::~referredWallFace()
91 // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
93 bool Foam::referredWallFace::operator==(const referredWallFace& rhs) const
97 static_cast<const face&>(rhs) == static_cast<face>(*this)
99 && rhs.patchI_ == patchI_
104 bool Foam::referredWallFace::operator!=(const referredWallFace& rhs) const
106 return !(*this == rhs);
110 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
112 Foam::Istream& Foam::operator>>(Istream& is, referredWallFace& rWF)
114 is >> static_cast<face&>(rWF) >> rWF.pts_ >> rWF.patchI_;
116 // Check state of Istream
120 "Foam::operator>>(Foam::Istream&, Foam::referredWallFace&)"
127 Foam::Ostream& Foam::operator<<(Ostream& os, const referredWallFace& rWF)
129 os << static_cast<const face&>(rWF) << token::SPACE
130 << rWF.pts_ << token::SPACE
133 // Check state of Ostream
136 "Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
137 "const Foam::referredWallFace&)"
144 // ************************************************************************* //