OpenFOAM: API Guide
v2006
The open source CFD toolbox
Uniform.H
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) 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
Class
28
Foam::Function1Types::Uniform
29
30
Description
31
Templated function that returns a constant value.
32
33
Provides backward-compatibility for cases where a field is spatially
34
"uniform" and may be treated as a constant value.
35
36
Usage - for entry <entryName> returning the value <value>:
37
\verbatim
38
<entryName> uniform <value>
39
\endverbatim
40
41
SourceFiles
42
Uniform.C
43
44
\*---------------------------------------------------------------------------*/
45
46
#ifndef Uniform_H
47
#define Uniform_H
48
49
#include "
Function1.H
"
50
51
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53
namespace
Foam
54
{
55
namespace
Function1Types
56
{
57
58
/*---------------------------------------------------------------------------*\
59
Class Uniform Declaration
60
\*---------------------------------------------------------------------------*/
61
62
template
<
class
Type>
63
class
Uniform
64
:
65
public
Constant
<Type>
66
{
67
public
:
68
69
//- Declare type-name, virtual type (with debug switch)
70
TypeName
(
"uniform"
);
71
72
73
// Generated Methods
74
75
//- Copy construct
76
Uniform<Type>
(
const
Uniform
&) =
default
;
77
78
//- No copy assignment
79
void
operator=
(
const
Uniform<Type>
&) =
delete
;
80
81
82
// Constructors
83
84
//- Construct from entry name and dictionary
85
Uniform
(
const
word
&
entryName
,
const
dictionary
&
dict
);
86
};
87
88
89
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90
91
}
// End namespace Function1Types
92
}
// End namespace Foam
93
94
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95
96
#ifdef NoRepository
97
#include "
Uniform.C
"
98
#endif
99
100
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101
102
#endif
103
104
// ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:62
Foam::Function1::entryName
const word & entryName
Definition:
Function1.H:125
Function1.H
Foam::Function1::dict
const word const dictionary & dict
Definition:
Function1.H:127
Uniform.C
Foam::Function1Types::Uniform::TypeName
TypeName("uniform")
Declare type-name, virtual type (with debug switch)
Foam::Function1Types::Uniform::operator=
void operator=(const Uniform< Type > &)=delete
No copy assignment.
Foam::Function1Types::Constant
Templated function that returns a constant value.
Definition:
Constant.H:59
Foam::Function1Types::Uniform
Templated function that returns a constant value.
Definition:
Uniform.H:62
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition:
dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::Function1Types::Uniform::Uniform
Uniform(const Uniform &)=default
Copy construct.
src
OpenFOAM
primitives
functions
Function1
Uniform
Uniform.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.