Loading...
Searching...
No Matches
polyGeoMesh.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) 2018-2025 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
26Class
27 Foam::polyGeoMesh
28
29Description
30 The polyMesh GeoMesh for holding internal fields without an fvMesh.
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef Foam_polyGeoMesh_H
35#define Foam_polyGeoMesh_H
36
37#include "GeoMesh.H"
38#include "polyMesh.H"
39
40// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42namespace Foam
43{
44
45/*---------------------------------------------------------------------------*\
46 Class polyGeoMesh Declaration
47\*---------------------------------------------------------------------------*/
48
49class polyGeoMesh
50:
51 public GeoMesh<polyMesh>
52{
53public:
54
55 // Constructors
56
57 //- Construct from polyMesh reference
58 explicit polyGeoMesh(const polyMesh& mesh)
59 :
61 {}
62
63
64 // Static Functions
65
66 //- The geometric (internal) mesh size - number of cells.
67 // Method name expected by GeoMesh interface
68 static label size(const polyMesh& mesh) noexcept
69 {
70 return mesh.nCells();
71 }
72
73 //- The geometric boundary size - not used (internal fields only).
74 // Method name expected by GeoMesh interface
75 static label boundary_size(const polyMesh& mesh) noexcept
76 {
77 return 0;
78 }
79
80
81 // Member Functions
82
83 //- The geometric (internal) mesh size - number of cells.
84 // Method name expected by GeoMesh interface
85 label size() const noexcept
86 {
87 return size(mesh_);
88 }
89};
90
91
92// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94} // End namespace Foam
95
96// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98#endif
99
100// ************************************************************************* //
const polyMesh & mesh_
Definition GeoMesh.H:54
GeoMesh(const polyMesh &mesh)
Definition GeoMesh.H:70
polyGeoMesh(const polyMesh &mesh)
Construct from polyMesh reference.
Definition polyGeoMesh.H:53
static label boundary_size(const polyMesh &mesh) noexcept
The geometric boundary size - not used (internal fields only).
Definition polyGeoMesh.H:76
static label size(const polyMesh &mesh) noexcept
The geometric (internal) mesh size - number of cells.
Definition polyGeoMesh.H:66
label size() const noexcept
The geometric (internal) mesh size - number of cells.
Definition polyGeoMesh.H:89
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
dynamicFvMesh & mesh
Namespace for OpenFOAM.
const direction noexcept
Definition scalarImpl.H:265