multiply.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::functionObjects::multiply
26 
27 Description
28  Multiply a list of fields.
29 
30  The operation can be applied to any volume or surface fields provided that
31  the resulting multiplication does not produce a tensor of rank greater than
32  two.
33 
34  Example of function object specification:
35  \verbatim
36  Ttot
37  {
38  type multiply;
39  libs ("libfieldFunctionObjects.so");
40  fields (rho U);
41  result rhoU;
42  executeControl writeTime;
43  writeControl writeTime;
44  }
45  \endverbatim
46 
47 See also
48  Foam::functionObjects::fieldsExpression
49  Foam::functionObjects::fvMeshFunctionObject
50 
51 SourceFiles
52  multiply.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef functionObjects_multiply_H
57 #define functionObjects_multiply_H
58 
59 #include "fieldsExpression.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 namespace functionObjects
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class multiply Declaration
70 \*---------------------------------------------------------------------------*/
71 
72 class multiply
73 :
74  public fieldsExpression
75 {
76  // Private Member Functions
77 
78  //- Multiply the list of fields and return true if successful
79  virtual bool calc();
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("multiply");
86 
87 
88  // Constructors
89 
90  //- Construct from Time and dictionary
91  multiply
92  (
93  const word& name,
94  const Time& runTime,
95  const dictionary& dict
96  );
97 
98 
99  //- Destructor
100  virtual ~multiply();
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace functionObjects
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
const word & name() const
Return the name of this functionObject.
Multiply a list of fields.
Definition: multiply.H:74
TypeName("multiply")
Runtime type information.
virtual ~multiply()
Destructor.
Definition: multiply.C:83
multiply(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: multiply.C:69
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict