makeFunction1s.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) 2011-2017 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 "Constant.H"
30 #include "Uniform.H"
31 #include "ZeroConstant.H"
32 #include "OneConstant.H"
33 #include "PolynomialEntry.H"
34 #include "Sine.H"
35 #include "Cosine.H"
36 #include "Square.H"
37 #include "CSV.H"
38 #include "Table.H"
39 #include "TableFile.H"
40 #include "Scale.H"
41 #include "LimitRange.H"
42 #include "fieldTypes.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 #define makeFunction1s(Type) \
47  makeFunction1(Type); \
48  makeFunction1Type(Constant, Type); \
49  makeFunction1Type(Uniform, Type); \
50  makeFunction1Type(ZeroConstant, Type); \
51  makeFunction1Type(OneConstant, Type); \
52  makeFunction1Type(Polynomial, Type); \
53  makeFunction1Type(Cosine, Type); \
54  makeFunction1Type(Sine, Type); \
55  makeFunction1Type(Square, Type); \
56  makeFunction1Type(CSV, Type); \
57  makeFunction1Type(Table, Type); \
58  makeFunction1Type(TableFile, Type); \
59  makeFunction1Type(Scale, Type); \
60  makeFunction1Type(LimitRange, Type);
61 
62 namespace Foam
63 {
64  makeFunction1(label);
65  makeFunction1Type(Constant, label);
66 
67  makeFunction1s(scalar);
72 }
73 
74 
75 template<>
78 (
79  const scalarField& x1,
80  const scalarField& x2
81 ) const
82 {
84  return tmp<Field<label>>::New(x1.size());
85 }
86 
87 
88 // ************************************************************************* //
Table.H
Foam::sphericalTensor
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
Definition: sphericalTensor.H:54
TableFile.H
Sine.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
LimitRange.H
Uniform.H
Scale.H
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:445
Foam::Field< scalar >
Square.H
Foam::symmTensor
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition: symmTensor.H:59
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
PolynomialEntry.H
Foam::Function1Types::Constant::integrate
virtual Type integrate(const scalar x1, const scalar x2) const
Integrate between two values.
Definition: ConstantI.H:41
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
makeFunction1s
#define makeFunction1s(Type)
Definition: makeFunction1s.C:46
Foam::makeFunction1Type
makeFunction1Type(Function1Expression, scalar)
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Cosine.H
CSV.H
OneConstant.H
Foam::makeFunction1
makeFunction1(label)
Constant.H
fieldTypes.H
Header files for all the primitive types that Fields are instantiated for.
Foam::tensor
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
Definition: symmTensor.H:61
ZeroConstant.H