Loading...
Searching...
No Matches
meshedSurf.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) 2016-2022 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::meshedSurf
28
29Description
30 Abstract definition of a meshed surface defined by faces and points.
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef Foam_meshedSurf_H
35#define Foam_meshedSurf_H
36
37#include "pointField.H"
38#include "faceList.H"
39#include "labelList.H"
40
41// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43namespace Foam
44{
45
46/*---------------------------------------------------------------------------*\
47 Class meshedSurf Declaration
48\*---------------------------------------------------------------------------*/
49
50class meshedSurf
51{
52public:
53
54 // Forward Declarations
55 class emptySurface;
57
58 // Constructors
59
60 //- Default construct
61 constexpr meshedSurf() noexcept = default;
63
64 //- Destructor
65 virtual ~meshedSurf() = default;
66
67
68 // Member Functions
69
70 //- The points used for the surface
71 virtual const pointField& points() const = 0;
72
73 //- The faces used for the surface
74 virtual const faceList& faces() const = 0;
76 //- Per-face zone/region information.
77 // Default is zero-sizes (ie, no zone information)
78 virtual const labelList& zoneIds() const
79 {
80 return labelList::null();
81 }
83 //- Per-face identifier (eg, element Id)
84 virtual const labelList& faceIds() const
85 {
86 return labelList::null();
87 }
88};
89
91/*---------------------------------------------------------------------------*\
92 Class meshedSurf::emptySurface Declaration
93\*---------------------------------------------------------------------------*/
94
95//- A concrete meshedSurf class without faces, points, etc.
97:
98 public meshedSurf
99{
100public:
101
102 // Constructors
103
104 //- Default construct
105 constexpr emptySurface() noexcept = default;
106
107
108 //- Destructor
109 virtual ~emptySurface() = default;
110
111
112 // Member Functions
113
114 //- Zero-sized point field
115 virtual const pointField& points() const
116 {
117 return pointField::null();
118 }
119
120 //- Zero-sized face list
121 virtual const faceList& faces() const
122 {
123 return faceList::null();
124 }
125};
126
127
128// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130} // End namespace Foam
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134#endif
135
136// ************************************************************************* //
static const Field< vector > & null() noexcept
Definition Field.H:192
static const List< label > & null() noexcept
Definition List.H:138
A concrete meshedSurf class without faces, points, etc.
Definition meshedSurf.H:107
virtual const pointField & points() const
Zero-sized point field.
Definition meshedSurf.H:129
constexpr emptySurface() noexcept=default
Default construct.
virtual const faceList & faces() const
Zero-sized face list.
Definition meshedSurf.H:137
virtual const faceList & faces() const =0
The faces used for the surface.
constexpr meshedSurf() noexcept=default
Default construct.
virtual const labelList & faceIds() const
Per-face identifier (eg, element Id).
Definition meshedSurf.H:90
virtual const labelList & zoneIds() const
Per-face zone/region information.
Definition meshedSurf.H:82
virtual const pointField & points() const =0
The points used for the surface.
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
List< face > faceList
List of faces.
Definition faceListFwd.H:41
const direction noexcept
Definition scalarImpl.H:265
vectorField pointField
pointField is a vectorField.