badQualityToFace.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) 2012 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::badQualityToFace
29 
30 Description
31  Selects bad quality faces (using snappyHexMesh/cvMesh mesh quality selector)
32 
33 SourceFiles
34  badQualityToFace.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef badQualityToFace_H
39 #define badQualityToFace_H
40 
41 #include "topoSetFaceSource.H"
42 #include "bitSet.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class badQualityToFace Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class badQualityToFace
54 :
55  public topoSetFaceSource
56 {
57 
58  // Private data
59 
60  //- Add usage string
61  static addToUsageTable usage_;
62 
63  //- Mesh quality dictionary
64  const dictionary dict_;
65 
66 
67  // Private Member Functions
68 
69  void combine(topoSet& set, const bool add) const;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("badQualityToFace");
76 
77  // Constructors
78 
79  //- Construct from dictionary
81  (
82  const polyMesh& mesh,
83  const dictionary& dict
84  );
85 
86  //- Construct from Istream
88  (
89  const polyMesh& mesh,
90  Istream&
91  );
92 
93 
94  //- Destructor
95  virtual ~badQualityToFace() = default;
96 
97 
98  // Member Functions
99 
100  virtual void applyToSet
101  (
102  const topoSetSource::setAction action,
103  topoSet& set
104  ) const;
105 
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Foam::BitOps::set
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
Definition: BitOps.C:37
Foam::combine
Definition: FaceCellWave.C:57
Foam::badQualityToFace
Selects bad quality faces (using snappyHexMesh/cvMesh mesh quality selector)
Definition: badQualityToFace.H:52
Foam::topoSetSource::setAction
setAction
Enumeration defining the valid actions.
Definition: topoSetSource.H:99
Foam::topoSetFaceSource
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
Definition: topoSetFaceSource.H:54
Foam::badQualityToFace::TypeName
TypeName("badQualityToFace")
Runtime type information.
Foam::topoSetSource::mesh
const polyMesh & mesh() const
Reference to the mesh.
Definition: topoSetSource.H:333
bitSet.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::badQualityToFace::~badQualityToFace
virtual ~badQualityToFace()=default
Destructor.
Foam::badQualityToFace::badQualityToFace
badQualityToFace(const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Definition: badQualityToFace.C:87
Foam::topoSet
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:63
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::add
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:939
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::badQualityToFace::applyToSet
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: badQualityToFace.C:111
topoSetFaceSource.H