polySurfaceGeoMesh.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-2025 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 Class
27  Foam::polySurfaceGeoMesh
28 
29 Description
30  The polySurface GeoMesh for face fields.
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef Foam_polySurfaceGeoMesh_H
35 #define Foam_polySurfaceGeoMesh_H
36 
37 #include "polySurface.H"
38 #include "GeoMesh.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class polySurfaceGeoMesh Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public GeoMesh<polySurface>
52 {
53 public:
54 
55  // Constructors
56 
57  //- Construct from polySurface reference
58  explicit polySurfaceGeoMesh(const polySurface& mesh)
59  :
61  {}
62 
63 
64  // Static Functions
65 
66  //- The geometric (internal) size - number of faces.
67  // Method name expected by GeoMesh interface
68  static label size(const polySurface& mesh)
69  {
70  return mesh.nFaces();
71  }
72 
73  //- The geometric boundary size - not used.
74  // Method name expected by GeoMesh interface
75  static label boundary_size(const polySurface& mesh) noexcept
76  {
77  return 0;
78  }
79 
80 
81  // Member Functions
82 
83  //- The geometric (internal) size - number of faces.
84  // Method name expected by GeoMesh interface
85  label size() const
86  {
87  return size(mesh_);
88  }
89 
90  // FUTURE?
91  // //- Return the object registry for face fields
92  // const objectRegistry& thisDb() const
93  // {
94  // return mesh_.faceData();
95  // }
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #endif
106 
107 // ************************************************************************* //
A surface mesh consisting of general polygon faces and capable of holding fields. ...
Definition: polySurface.H:62
label size() const
The geometric (internal) size - number of faces.
The polySurface GeoMesh for face fields.
static label boundary_size(const polySurface &mesh) noexcept
The geometric boundary size - not used.
dynamicFvMesh & mesh
const direction noexcept
Definition: scalarImpl.H:255
polySurfaceGeoMesh(const polySurface &mesh)
Construct from polySurface reference.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:45
const polySurface & mesh_
Reference to Mesh.
Definition: GeoMesh.H:54
Namespace for OpenFOAM.