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 // ************************************************************************* //
dictionary dict
badQualityToFace(const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces...
const polyMesh & mesh() const noexcept
Reference to the mesh.
setAction
Enumeration defining various actions.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:59
Class with constructor to add usage string to table.
virtual ~badQualityToFace()=default
Destructor.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Selects bad quality faces (using snappyHexMesh/cvMesh mesh quality selector)
TypeName("badQualityToFace")
Runtime type information.
Namespace for OpenFOAM.