Loading...
Searching...
No Matches
UniformField.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) 2013 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::UniformField
29
30Description
31 A class representing the concept of a uniform field which stores only
32 the single value and providing the operator[] to return it.
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef Foam_UniformField_H
37#define Foam_UniformField_H
38
39#include "UniformList.H"
40
41// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43namespace Foam
45
46/*---------------------------------------------------------------------------*\
47 Class UniformField Declaration
48\*---------------------------------------------------------------------------*/
49
50template<class Type>
51class UniformField
52:
53 public UniformList<Type>
54{
55public:
56
57 // Constructors
58
59 //- Inherit constructors from UniformList
60 using UniformList<Type>::UniformList;
61
62
63 // Member Functions
64
65 //- Method name compatibility with DimensionedField
66 UniformField field() const
67 {
69 }
70};
71
72
73// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74
75} // End namespace Foam
76
77// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78
79#include "UniformFieldI.H"
80
81// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82
83#endif
84
85// ************************************************************************* //
A class representing the concept of a uniform field which stores only the single value and providing ...
UniformField field() const
Method name compatibility with DimensionedField.
UniformList(const Type &val) noexcept
Construct from given value.
Definition UniformList.H:64
const Type & value() const noexcept
Return the value.
Definition UniformList.H:83
Namespace for OpenFOAM.