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/>.
25 Foam::calcTypes::scalarMult
28 Multiplies base field with a scalar value.
30 New field name specified by -resultName option, or automatically as:
31 <baseFieldName>_scalarMult_value
34 scalarMult p scalarMult -value 100000 -resultName pAbs
38 writeScalarMultField.C
39 writeScalarMultValue.C
42 Dominik Christ, Wikki Ltd. All right reserved.
44 \*---------------------------------------------------------------------------*/
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 /*---------------------------------------------------------------------------*\
60 Class scalarMult Declaration
61 \*---------------------------------------------------------------------------*/
69 //- Name of base field (to scalarMult to)
72 //- String representation of scalar value
73 string scalarMultValueStr_;
75 //- Name of result field
79 // Private Member Functions
83 //- Calc and output field and value scalarMult
84 void writeScalarMultValues
88 const IOobject& baseFieldHeader
92 //- Disallow default bitwise copy construct
93 scalarMult(const scalarMult&);
95 //- Disallow default bitwise assignment
96 void operator=(const scalarMult&);
103 // Calculation routines
105 //- Initialise - typically setting static variables,
106 // e.g. command line arguments
109 //- Pre-time loop calculations
117 //- Time loop calculations
128 //- Write scalarMult value
130 void writeScalarMultValue
132 const IOobject& baseHeader,
133 const string& valueStr,
141 //- Runtime type information
142 TypeName("scalarMult");
153 virtual ~scalarMult();
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace calcTypes
160 } // End namespace Foam
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 # include "writeScalarMultValue.C"
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //