thresholdCellFaces.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) 2011 OpenFOAM Foundation
9 Copyright (C) 2018-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::thresholdCellFaces
29
30Description
31 Selects the mesh cell faces specified by a threshold value.
32 Non-triangulated by default.
33
34SourceFiles
35 thresholdCellFaces.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef thresholdCellFaces_H
40#define thresholdCellFaces_H
41
42#include "MeshedSurface.H"
43#include "MeshedSurfacesFwd.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// Forward Declarations
51class polyMesh;
52
53/*---------------------------------------------------------------------------*\
54 Class thresholdCellFaces Declaration
55\*---------------------------------------------------------------------------*/
58:
59 public meshedSurface
60{
61 // Private typedefs for convenience
62 typedef meshedSurface Mesh;
63
64
65 // Private Data
66
67 //- Reference to mesh
68 const polyMesh& mesh_;
69
70 //- For each face, the original cell in mesh
71 labelList meshCells_;
72
73
74 // Private Member Functions
75
76 void calculate
77 (
78 const scalarField& field,
79 const scalar lowerThreshold,
80 const scalar upperThreshold,
81 const bool triangulate
82 );
83
84public:
85
86 //- Runtime type information
87 TypeName("thresholdCellFaces");
88
89
90 // Constructors
91
92 //- Construct from mesh, field and threshold values
94 (
95 const polyMesh& mesh,
96 const scalarField& field,
97 const scalar lowerThreshold,
98 const scalar upperThreshold,
99 const bool triangulate = false
100 );
101
102
103 // Member Functions
104
105 //- For each face, the original cell in mesh
106 const labelList& meshCells() const
107 {
108 return meshCells_;
109 }
110
111 //- For each face, the original cell in mesh
113 {
114 return meshCells_;
115 }
116};
117
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121} // End namespace Foam
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Selects the mesh cell faces specified by a threshold value. Non-triangulated by default.
TypeName("thresholdCellFaces")
Runtime type information.
labelList & meshCells()
For each face, the original cell in mesh.
const labelList & meshCells() const
For each face, the original cell in mesh.
rDeltaTY field()
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73