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-------------------------------------------------------------------------------
10License
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
54const noexcept
55{
56 return hasDimensions_;
57}
58
59
60inline const Foam::dimensionSet&
62{
63 return resultDimensions_;
64}
65
66
68Foam::expressions::volumeExpr::parseDriver::parseDriver::field_cellSet
69(
70 const word& name
71) const
72{
73 return field_cellSelection
74 (
75 name,
77 );
78}
79
80
83(
84 const word& name
85) const
86{
87 return field_cellSelection
88 (
89 name,
91 );
92}
93
94
97(
98 const word& name
99) const
100{
101 return field_faceSelection
102 (
103 name,
105 );
106}
107
108
111(
112 const word& name
113) const
114{
115 return field_faceSelection
116 (
117 name,
119 );
120}
121
122
125(
126 const word& name
127) const
128{
129 return field_pointSelection
130 (
131 name,
133 );
134}
135
136
139(
140 const word& name
141) const
142{
143 return field_pointSelection
144 (
145 name,
147 );
148}
149
150
151// ************************************************************************* //
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:109
virtual label size() const
The natural field size for the expression.
const fvMesh & mesh_
The referenced mesh.
tmp< surfaceScalarField > field_faceZone(const word &name) const
Face selection (zone)
tmp< pointScalarField > field_pointSet(const word &name) const
Point selection (set)
tmp< pointScalarField > field_pointZone(const word &name) const
Point selection (zone)
bool hasDimensions() const noexcept
Apply dimensions() to geometric fields.
tmp< surfaceScalarField > field_faceSet(const word &name) const
Face selection (set)
tmp< volScalarField > field_cellZone(const word &name) const
Cell selection (zone)
const dimensionSet & dimensions() const noexcept
The preferred result dimensions (if any)
label nInternalFaces() const noexcept
Number of internal faces.
label nPoints() const noexcept
Number of mesh points.
label nCells() const noexcept
Number of mesh cells.
A class for managing temporary objects.
Definition: tmp.H:65
@ POINTSET_SOURCE
Points as set.
Definition: topoSetSource.H:84
@ FACESET_SOURCE
Faces as set.
Definition: topoSetSource.H:83
@ FACEZONE_SOURCE
Faces as zone.
Definition: topoSetSource.H:88
@ POINTZONE_SOURCE
Points as zone.
Definition: topoSetSource.H:89
@ CELLSET_SOURCE
Cells as set.
Definition: topoSetSource.H:82
@ CELLZONE_SOURCE
Cells as zone.
Definition: topoSetSource.H:87
A class for handling words, derived from Foam::string.
Definition: word.H:68
@ VOLUME_DATA
Volume data.
const direction noexcept
Definition: Scalar.H:223
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59