Loading...
Searching...
No Matches
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
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 (
86{
87 return field_cellSelection
88 (
100{
101 return field_faceSelection
102 (
114{
115 return field_faceSelection
116 (
128{
129 return field_pointSelection
130 (
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...
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).
tmp< surfaceScalarField > field_faceSelection(const word &name, enum topoSetSource::sourceType setType) const
Face selections (as logical).
bool hasDimensions_
Requested use of dimensions.
bool hasDimensions() const noexcept
Apply dimensions() to geometric fields.
tmp< surfaceScalarField > field_faceSet(const word &name) const
Face selection (set).
tmp< volScalarField > field_cellSelection(const word &name, enum topoSetSource::sourceType setType) const
Cell selections (as logical).
tmp< volScalarField > field_cellZone(const word &name) const
Cell selection (zone).
const dimensionSet & dimensions() const noexcept
The preferred result dimensions (if any).
tmp< pointScalarField > field_pointSelection(const word &name, enum topoSetSource::sourceType setType) const
Point selections (as logical).
dimensionSet resultDimensions_
The result dimensions.
A class for managing temporary objects.
Definition tmp.H:75
@ POINTSET_SOURCE
Points as set.
@ FACESET_SOURCE
Faces as set.
@ FACEZONE_SOURCE
Faces as zone.
@ POINTZONE_SOURCE
Points as zone.
@ CELLSET_SOURCE
Cells as set.
@ CELLZONE_SOURCE
Cells as zone.
A class for handling words, derived from Foam::string.
Definition word.H:66
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127