ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / submodels / Kinematic / ParticleForces / forceSuSp / forceSuSpI.H
blobe9919fde4d0df2a103020f4f4637006430f64cfe
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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)
43     first() = Su;
44     second() = 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
58     return first();
62 inline Foam::scalar Foam::forceSuSp::Sp() const
64     return second();
68 inline Foam::vector& Foam::forceSuSp::Su()
70     return first();
74 inline Foam::scalar& Foam::forceSuSp::Sp()
76     return second();
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
111     return forceSuSp
112     (
113         susp1.first() + susp2.first(),
114         susp1.second() + susp2.second()
115     );
119 inline Foam::forceSuSp Foam::operator*
121     const scalar s,
122     const forceSuSp& susp
125     return forceSuSp(susp.first()*s, susp.second()*s);
129 // ************************************************************************* //