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 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  break;
41  return mesh_.nInternalFaces();
42  break;
44  return mesh_.nCells();
45  break;
46  default:
47  break;
48  }
49  return 0;
50 }
51 
52 
54 Foam::expressions::volumeExpr::parseDriver::parseDriver::field_cellSet
55 (
56  const word& name
57 ) const
58 {
59  return field_cellSelection
60  (
61  name,
62  topoSetSource::sourceType::CELLSET_SOURCE
63  );
64 }
65 
66 
69 (
70  const word& name
71 ) const
72 {
73  return field_cellSelection
74  (
75  name,
76  topoSetSource::sourceType::CELLZONE_SOURCE
77  );
78 }
79 
80 
83 (
84  const word& name
85 ) const
86 {
87  return field_faceSelection
88  (
89  name,
90  topoSetSource::sourceType::FACESET_SOURCE
91  );
92 }
93 
94 
97 (
98  const word& name
99 ) const
100 {
101  return field_faceSelection
102  (
103  name,
104  topoSetSource::sourceType::FACEZONE_SOURCE
105  );
106 }
107 
108 
111 (
112  const word& name
113 ) const
114 {
115  return field_pointSelection
116  (
117  name,
118  topoSetSource::sourceType::POINTSET_SOURCE
119  );
120 }
121 
122 
125 (
126  const word& name
127 ) const
128 {
129  return field_pointSelection
130  (
131  name,
132  topoSetSource::sourceType::POINTZONE_SOURCE
133  );
134 }
135 
136 
137 // ************************************************************************* //
Foam::expressions::volumeExpr::parseDriver::field_pointZone
tmp< pointScalarField > field_pointZone(const word &name) const
Point selection (zone)
Definition: volumeExprDriverI.H:125
Foam::expressions::volumeExpr::parseDriver::size
virtual label size() const
The underlying field size for the expression.
Definition: volumeExprDriver.H:346
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::expressions::patchExpr::POINT_DATA
Point data.
Definition: patchExprFwd.H:60
Foam::expressions::patchExpr::SURFACE_DATA
Surface data.
Definition: patchExprFwd.H:61
Foam::expressions::volumeExpr::VOLUME_DATA
Volume data.
Definition: volumeExprFwd.H:60
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::expressions::volumeExpr::FieldAssociation
FieldAssociation
The field association for volume expressions (mutually exclusive)
Definition: volumeExprFwd.H:55
Foam::expressions::volumeExpr::parseDriver::field_pointSet
tmp< pointScalarField > field_pointSet(const word &name) const
Point selection (set)
Definition: volumeExprDriverI.H:111
Foam::expressions::volumeExpr::parseDriver::field_faceZone
tmp< surfaceScalarField > field_faceZone(const word &name) const
Face selection (zone)
Definition: volumeExprDriverI.H:97
Foam::expressions::volumeExpr::parseDriver::field_faceSet
tmp< surfaceScalarField > field_faceSet(const word &name) const
Face selection (set)
Definition: volumeExprDriverI.H:83
Foam::expressions::volumeExpr::parseDriver::field_cellZone
tmp< volScalarField > field_cellZone(const word &name) const
Cell selection (zone)
Definition: volumeExprDriverI.H:69