geometricZeroField.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) 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 Class
27  Foam::geometricZeroField
28 
29 Description
30  A class representing the concept of a GeometricField of 0 used to avoid
31  unnecessary manipulations for objects which are known to be zero at
32  compile-time.
33 
34  Used for example as the density argument to a function written for
35  compressible to be used for incompressible flow.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef geometricZeroField_H
40 #define geometricZeroField_H
41 
42 #include "zeroFieldField.H"
43 #include "dimensionSet.H"
44 #include "scalar.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class geometricZeroField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public zero
58 {
59 
60 public:
61 
62  // Public typedefs
63 
65  typedef zeroField Patch;
67  typedef zero cmptType;
68 
69 
70  // Constructors
71 
72  //- Construct null
74  {}
75 
76 
77  // Member Operators
78 
79  inline const dimensionSet& dimensions() const;
80 
81  inline scalar operator[](const label) const;
82 
83  inline zeroField field() const;
84 
85  inline zeroField operator()() const;
86 
87  inline zeroField oldTime() const;
88 
89  inline zeroFieldField boundaryField() const;
90 };
91 
92 
93 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
94 
95 } // End namespace Foam
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 #include "geometricZeroFieldI.H"
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #endif
104 
105 // ************************************************************************* //
Foam::geometricZeroField::Patch
zeroField Patch
Definition: geometricZeroField.H:64
Foam::geometricZeroField::Boundary
zeroFieldField Boundary
Definition: geometricZeroField.H:65
Foam::zeroField
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
Definition: zeroField.H:53
zeroFieldField.H
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::geometricZeroField::geometricZeroField
geometricZeroField()
Construct null.
Definition: geometricZeroField.H:72
Foam::geometricZeroField::field
zeroField field() const
Definition: geometricZeroFieldI.H:42
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::geometricZeroField
A class representing the concept of a GeometricField of 0 used to avoid unnecessary manipulations for...
Definition: geometricZeroField.H:54
Foam::geometricZeroField::operator()
zeroField operator()() const
Definition: geometricZeroFieldI.H:47
Foam::geometricZeroField::Internal
zeroField Internal
Definition: geometricZeroField.H:63
dimensionSet.H
scalar.H
Foam::geometricZeroField::cmptType
zero cmptType
Definition: geometricZeroField.H:66
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::geometricZeroField::dimensions
const dimensionSet & dimensions() const
Definition: geometricZeroFieldI.H:32
Foam::zeroFieldField
A class representing the concept of a field of zeroFields used to avoid unnecessary manipulations for...
Definition: zeroFieldField.H:53
Foam::geometricZeroField::operator[]
scalar operator[](const label) const
Definition: geometricZeroFieldI.H:37
Foam::geometricZeroField::oldTime
zeroField oldTime() const
Definition: geometricZeroFieldI.H:52
Foam::geometricZeroField::boundaryField
zeroFieldField boundaryField() const
Definition: geometricZeroFieldI.H:57
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition: zero.H:61
geometricZeroFieldI.H