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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "Constant.H"
29 #include "Uniform.H"
30 #include "ZeroConstant.H"
31 #include "OneConstant.H"
32 #include "PolynomialEntry.H"
33 #include "Sine.H"
34 #include "Square.H"
35 #include "CSV.H"
36 #include "Table.H"
37 #include "TableFile.H"
38 #include "Scale.H"
39 
40 #include "fieldTypes.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 #define makeFunction1s(Type) \
45  makeFunction1(Type); \
46  makeFunction1Type(Constant, Type); \
47  makeFunction1Type(Uniform, Type); \
48  makeFunction1Type(ZeroConstant, Type); \
49  makeFunction1Type(OneConstant, Type); \
50  makeFunction1Type(Polynomial, Type); \
51  makeFunction1Type(Sine, Type); \
52  makeFunction1Type(Square, Type); \
53  makeFunction1Type(CSV, Type); \
54  makeFunction1Type(Table, Type); \
55  makeFunction1Type(TableFile, Type); \
56  makeFunction1Type(Scale, Type);
57 
58 namespace Foam
59 {
61  makeFunction1Type(Constant, label);
62 
63  makeFunction1s(scalar);
68 }
69 
70 
71 template<>
74 (
75  const scalarField& x1,
76  const scalarField& x2
77 ) const
78 {
80  return tmp<Field<label>>::New(x1.size());
81 }
82 
83 
84 // ************************************************************************* //
Table.H
Foam::sphericalTensor
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars.
Definition: sphericalTensor.H:51
TableFile.H
Sine.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::tensor
Tensor< scalar > tensor
Tensor of scalars.
Definition: tensor.H:53
Foam::makeFunction1Type
makeFunction1Type(Constant, label)
Uniform.H
Scale.H
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:419
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::Field< scalar >
Square.H
Foam::symmTensor
SymmTensor< scalar > symmTensor
SymmTensor of scalars.
Definition: symmTensor.H:50
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:44
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
CSV.H
OneConstant.H
Foam::makeFunction1
makeFunction1(label)
Constant.H
fieldTypes.H
Header files for all the primitive types that Fields are instantiated for.
ZeroConstant.H