1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 const char* const Foam::equation::typeName = "equation";
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 Foam::equation::equation()
37 equationName_(word::null),
40 lastResult_(word::null, dimless, 0),
41 overrideDimensions_(dimless),
42 changeDimensions_(false)
46 Foam::equation::equation(const equation& newEqn)
48 equationName_(newEqn.equationName_),
50 rawText_(newEqn.rawText_),
51 lastResult_(word::null, dimless, 0),
52 overrideDimensions_(newEqn.overrideDimensions_),
53 changeDimensions_(newEqn.changeDimensions_)
56 Foam::equation::equation(Istream& is, const word& name)
61 lastResult_(word::null, dimless, 0),
62 overrideDimensions_(dimless),
63 changeDimensions_(false)
65 operator>>(is, *this);
69 Foam::equation::equation
71 const Foam::word& equationName,
72 const Foam::string& rawText,
73 const Foam::dimensionSet& overrideDimensions,
74 const bool& changeDimensions
77 equationName_(equationName),
80 lastResult_(equationName, dimless, 0),
81 overrideDimensions_(overrideDimensions),
82 changeDimensions_(changeDimensions)
86 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
88 Foam::equation::~equation()
92 // * * * * * * * * * * * * * * Member functions * * * * * * * * * * * * * * //
94 void Foam::equation::clear() const
100 // * * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * //
102 void Foam::equation::operator=(Foam::equation& eqn)
104 equationName_ = eqn.equationName_;
105 rawText_ = eqn.rawText_;
106 // this->operations() = eqn.operations();
107 overrideDimensions_.reset(eqn.overrideDimensions_);
108 changeDimensions_ = eqn.changeDimensions_;
111 // ************************************************************************* //