subtract.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "subtract.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace functionObjects
37 {
39  addToRunTimeSelectionTable(functionObject, subtract, dictionary);
40 }
41 }
42 
43 
44 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
45 
46 bool Foam::functionObjects::subtract::calc()
47 {
48  return calcAllTypes(*this);
49 }
50 
51 
52 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53 
55 (
56  const word& name,
57  const Time& runTime,
58  const dictionary& dict
59 )
60 :
62 {
63  setResultName("subtract");
64 }
65 
66 
67 // ************************************************************************* //
dictionary dict
defineTypeNameAndDebug(ObukhovLength, 0)
Intermediate class for handling field expression function objects (e.g. add, subtract etc...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
bool calcAllTypes(FOType &fo)
Call &#39;calcType&#39; for the given functionObject.
engineTime & runTime
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
Macros for easy insertion into run-time selection tables.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:52
void setResultName(const word &typeName, const wordList &defaultArg=wordList::null())
subtract(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: subtract.C:48
A class for handling words, derived from Foam::string.
Definition: word.H:63
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
Namespace for OpenFOAM.