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