volumeExprDriverI.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) 2019-2021 OpenCFD Ltd.
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 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
29 
31 (
32  const FieldAssociation geoType
33 ) const
34 {
35  switch (geoType)
36  {
38  return mesh_.nPoints();
39 
41  return mesh_.nInternalFaces();
42 
44  return mesh_.nCells();
45 
46  default:
47  break;
48  }
49  return 0;
50 }
51 
52 
54 const noexcept
55 {
56  return hasDimensions_;
57 }
58 
59 
60 inline const Foam::dimensionSet&
62 {
63  return resultDimensions_;
64 }
65 
66 
68 Foam::expressions::volumeExpr::parseDriver::parseDriver::field_cellSet
69 (
70  const word& name
71 ) const
72 {
73  return field_cellSelection
74  (
75  name,
76  topoSetSource::sourceType::CELLSET_SOURCE
77  );
78 }
79 
80 
83 (
84  const word& name
85 ) const
86 {
87  return field_cellSelection
88  (
89  name,
90  topoSetSource::sourceType::CELLZONE_SOURCE
91  );
92 }
93 
94 
97 (
98  const word& name
99 ) const
100 {
101  return field_faceSelection
102  (
103  name,
104  topoSetSource::sourceType::FACESET_SOURCE
105  );
106 }
107 
108 
111 (
112  const word& name
113 ) const
114 {
115  return field_faceSelection
116  (
117  name,
118  topoSetSource::sourceType::FACEZONE_SOURCE
119  );
120 }
121 
122 
125 (
126  const word& name
127 ) const
128 {
129  return field_pointSelection
130  (
131  name,
132  topoSetSource::sourceType::POINTSET_SOURCE
133  );
134 }
135 
136 
139 (
140  const word& name
141 ) const
142 {
143  return field_pointSelection
144  (
145  name,
146  topoSetSource::sourceType::POINTZONE_SOURCE
147  );
148 }
149 
150 
151 // ************************************************************************* //
Foam::expressions::volumeExpr::parseDriver::field_pointZone
tmp< pointScalarField > field_pointZone(const word &name) const
Point selection (zone)
Definition: volumeExprDriverI.H:139
Foam::expressions::volumeExpr::parseDriver::dimensions
const dimensionSet & dimensions() const noexcept
The preferred result dimensions (if any)
Definition: volumeExprDriverI.H:61
Foam::expressions::volumeExpr::parseDriver::size
virtual label size() const
The natural field size for the expression.
Definition: volumeExprDriver.H:348
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::dimensionSet
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:108
Foam::expressions::VOLUME_DATA
Volume data.
Definition: exprFieldAssociation.H:48
Foam::expressions::FieldAssociation
FieldAssociation
Definition: exprFieldAssociation.H:43
Foam::expressions::FACE_DATA
Face data.
Definition: exprFieldAssociation.H:47
Foam::expressions::volumeExpr::parseDriver::hasDimensions_
bool hasDimensions_
Requested use of dimensions.
Definition: volumeExprDriver.H:254
Foam::expressions::volumeExpr::parseDriver::field_pointSet
tmp< pointScalarField > field_pointSet(const word &name) const
Point selection (set)
Definition: volumeExprDriverI.H:125
Foam::expressions::volumeExpr::parseDriver::field_faceZone
tmp< surfaceScalarField > field_faceZone(const word &name) const
Face selection (zone)
Definition: volumeExprDriverI.H:111
Foam::expressions::volumeExpr::parseDriver::field_faceSet
tmp< surfaceScalarField > field_faceSet(const word &name) const
Face selection (set)
Definition: volumeExprDriverI.H:97
Foam::expressions::volumeExpr::parseDriver::hasDimensions
bool hasDimensions() const noexcept
Apply dimensions() to geometric fields.
Definition: volumeExprDriverI.H:53
Foam::expressions::POINT_DATA
Point data.
Definition: exprFieldAssociation.H:46
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::expressions::volumeExpr::parseDriver::field_cellZone
tmp< volScalarField > field_cellZone(const word &name) const
Cell selection (zone)
Definition: volumeExprDriverI.H:83