OpenFOAM
12
The OpenFOAM Foundation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Uniform.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) 2017-2023 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::Function1s::Uniform
26
27
Description
28
Templated function that returns a constant value.
29
30
Provides backward-compatibility for cases where a field is spatially
31
"uniform" and may be treated as a constant value.
32
33
Usage
34
For entry <name> returning the value <value>:
35
\verbatim
36
<name> uniform <value>
37
\endverbatim
38
39
SourceFiles
40
Uniform.C
41
42
\*---------------------------------------------------------------------------*/
43
44
#ifndef Uniform_H
45
#define Uniform_H
46
47
#include "
Function1.H
"
48
49
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51
namespace
Foam
52
{
53
namespace
Function1s
54
{
55
56
/*---------------------------------------------------------------------------*\
57
Class Uniform Declaration
58
\*---------------------------------------------------------------------------*/
59
60
template
<
class
Type>
61
class
Uniform
62
:
63
public
Constant
<Type>
64
{
65
66
public
:
67
68
// Runtime type information
69
TypeName
(
"uniform"
);
70
71
72
// Constructors
73
74
//- Inherit constructors
75
using
Constant<Type>::Constant
;
76
77
//- Construct and return a clone
78
virtual
tmp<Function1<Type>
>
clone
()
const
79
{
80
return
tmp<Function1<Type>
>(
new
Uniform<Type>
(*
this
));
81
}
82
};
83
84
85
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
86
87
}
// End namespace Function1s
88
}
// End namespace Foam
89
90
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92
#endif
93
94
// ************************************************************************* //
Function1.H
Foam::Function1s::Constant
Templated function that returns a constant value.
Definition:
Constant.H:60
Foam::Function1s::Uniform
Templated function that returns a constant value.
Definition:
Uniform.H:63
Foam::Function1s::Uniform::TypeName
TypeName("uniform")
Foam::Function1s::Uniform::clone
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
Definition:
Uniform.H:77
Foam::tmp
A class for managing temporary objects.
Definition:
tmp.H:55
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.H:214
src
OpenFOAM
primitives
functions
Function1
Uniform
Uniform.H
Generated by
1.9.1