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 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
28 inline Foam::forceSuSp::forceSuSp()
32 inline Foam::forceSuSp::forceSuSp
34 const Tuple2<vector, scalar>& fs
37 Tuple2<vector, scalar>(fs)
41 inline Foam::forceSuSp::forceSuSp(const vector& Su, const scalar Sp)
48 inline Foam::forceSuSp::forceSuSp(Istream& is)
50 Tuple2<vector, scalar>(is)
54 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
56 inline const Foam::vector& Foam::forceSuSp::Su() const
62 inline Foam::scalar Foam::forceSuSp::Sp() const
68 inline Foam::vector& Foam::forceSuSp::Su()
74 inline Foam::scalar& Foam::forceSuSp::Sp()
80 // * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * * //
82 inline void Foam::forceSuSp::operator=(const forceSuSp& susp)
84 first() = susp.first();
85 second() = susp.second();
89 inline void Foam::forceSuSp::operator+=(const forceSuSp& susp)
91 first() += susp.first();
92 second() += susp.second();
96 inline void Foam::forceSuSp::operator-=(const forceSuSp& susp)
98 first() -= susp.first();
99 second() -= susp.second();
103 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
105 inline Foam::forceSuSp Foam::operator+
107 const forceSuSp& susp1,
108 const forceSuSp& susp2
113 susp1.first() + susp2.first(),
114 susp1.second() + susp2.second()
119 inline Foam::forceSuSp Foam::operator*
122 const forceSuSp& susp
125 return forceSuSp(susp.first()*s, susp.second()*s);
129 // ************************************************************************* //