geometricOneField.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-2016 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::geometricOneField
28 
29 Description
30  A class representing the concept of a GeometricField of 1 used to avoid
31  unnecessary manipulations for objects which are known to be one 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 geometricOneField_H
40 #define geometricOneField_H
41 
42 #include "oneFieldField.H"
43 #include "dimensionSet.H"
44 #include "scalar.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class geometricOneField Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public one
58 {
59 
60 public:
61 
62  // Public typedefs
63 
64  typedef oneField Internal;
65  typedef oneField Patch;
67  typedef one cmptType;
68 
69  // Constructors
70 
71  //- Construct null
73  {}
74 
75 
76  // Member Operators
77 
78  inline const dimensionSet& dimensions() const;
79 
80  inline one operator[](const label) const;
81 
82  inline oneField field() const;
83 
84  inline oneField oldTime() const;
85 
86  inline Internal operator()() const;
87 
88  inline Internal v() const;
89 
90  inline typename Internal::FieldType primitiveField() const;
91 
92  inline Boundary boundaryField() const;
93 };
94 
95 
96 inline const geometricOneField& operator*
97 (
98  const geometricOneField&,
99  const geometricOneField&
100 );
101 
102 inline const geometricOneField::Internal& operator*
103 (
105  const geometricOneField&
106 );
107 
108 inline const geometricOneField::Internal& operator*
109 (
110  const geometricOneField&,
112 );
113 
114 inline const geometricOneField& operator/
115 (
116  const geometricOneField&,
117  const geometricOneField&
118 );
119 
120 inline const geometricOneField::Internal& operator/
121 (
123  const geometricOneField&
124 );
125 
126 inline const geometricOneField::Internal& operator/
127 (
128  const geometricOneField&,
130 );
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #include "geometricOneFieldI.H"
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::oneFieldField
A class representing the concept of a field of oneFields used to avoid unnecessary manipulations for ...
Definition: oneFieldField.H:53
Foam::geometricOneField::boundaryField
Boundary boundaryField() const
Definition: geometricOneFieldI.H:78
geometricOneFieldI.H
Foam::geometricOneField::geometricOneField
geometricOneField()
Construct null.
Definition: geometricOneField.H:71
Foam::geometricOneField::operator[]
one operator[](const label) const
Definition: geometricOneFieldI.H:38
Foam::geometricOneField::Patch
oneField Patch
Definition: geometricOneField.H:64
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:54
Foam::one
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Definition: one.H:61
Foam::geometricOneField::primitiveField
Internal::FieldType primitiveField() const
Definition: geometricOneFieldI.H:71
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::geometricOneField::dimensions
const dimensionSet & dimensions() const
Definition: geometricOneFieldI.H:32
Foam::geometricOneField::oldTime
oneField oldTime() const
Definition: geometricOneFieldI.H:50
Foam::geometricOneField::Internal
oneField Internal
Definition: geometricOneField.H:63
Foam::geometricOneField::Boundary
oneFieldField Boundary
Definition: geometricOneField.H:65
Foam::oneField::FieldType
oneField FieldType
Definition: oneField.H:61
dimensionSet.H
Foam::geometricOneField::cmptType
one cmptType
Definition: geometricOneField.H:66
scalar.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::geometricOneField::operator()
Internal operator()() const
Definition: geometricOneFieldI.H:57
Foam::geometricOneField::field
oneField field() const
Definition: geometricOneFieldI.H:44
Foam::oneField
A class representing the concept of a field of 1 used to avoid unnecessary manipulations for objects ...
Definition: oneField.H:53
oneFieldField.H
Foam::geometricOneField::v
Internal v() const
Definition: geometricOneFieldI.H:64