All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
wedgeMatcher.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::wedgeMatcher
26 
27 Description
28  A cellMatcher for wedge cells
29 
30 See also
31  cellMatcher
32 
33 SourceFiles
34  wedgeMatcher.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef wedgeMatcher_H
39 #define wedgeMatcher_H
40 
41 #include "cellMatcher.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class wedgeMatcher Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class wedgeMatcher
53 :
54  public cellMatcher
55 {
56  // Static Data Members
57 
58  //- Constants for this shape
59  static const label vertPerCell;
60  static const label facePerCell;
61  static const label maxVertPerFace;
62 
63 
64 public:
65 
66  // Constructors
67 
68  //- Construct null
69  wedgeMatcher();
70 
71  //- Disallow default bitwise copy construction
72  wedgeMatcher(const wedgeMatcher&) = delete;
73 
74 
75  //- Destructor
76  ~wedgeMatcher();
77 
78 
79  // Member Functions
80 
81  virtual label nVertPerCell() const
82  {
83  return vertPerCell;
84  }
85 
86  virtual label nFacePerCell() const
87  {
88  return facePerCell;
89  }
90 
91  virtual label nMaxVertPerFace() const
92  {
93  return maxVertPerFace;
94  }
95 
96  virtual label faceHashValue() const;
97 
98  virtual bool faceSizeMatch(const faceList&, const labelList&) const;
99 
100  virtual bool matchShape
101  (
102  const bool checkOnly,
103  const faceList& faces,
104  const labelList& faceOwner,
105  const label celli,
106  const labelList& myFaces
107  );
108 
109  virtual bool isA(const primitiveMesh& mesh, const label celli);
110 
111  virtual bool isA(const faceList&);
112 
113  virtual bool matches
114  (
115  const primitiveMesh& mesh,
116  const label celli,
117  cellShape& shape
118  );
119 
120 
121  // Member Operators
122 
123  //- Disallow default bitwise assignment
124  void operator=(const wedgeMatcher&) = delete;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
virtual label nVertPerCell() const
Definition: wedgeMatcher.H:80
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
Definition: cellMatcher.H:99
virtual label nFacePerCell() const
Definition: wedgeMatcher.H:85
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:74
An analytical geometric cellShape.
Definition: cellShape.H:69
virtual bool matchShape(const bool checkOnly, const faceList &faces, const labelList &faceOwner, const label celli, const labelList &myFaces)
Low level shape recognition. Return true if matches.
Definition: wedgeMatcher.C:60
wedgeMatcher()
Construct null.
Definition: wedgeMatcher.C:39
dynamicFvMesh & mesh
~wedgeMatcher()
Destructor.
Definition: wedgeMatcher.C:53
virtual label nMaxVertPerFace() const
Definition: wedgeMatcher.H:90
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
Definition: wedgeMatcher.C:322
A cellMatcher for wedge cells.
Definition: wedgeMatcher.H:51
virtual bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
Definition: wedgeMatcher.C:370
void operator=(const wedgeMatcher &)=delete
Disallow default bitwise assignment.
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
Definition: wedgeMatcher.C:398
Namespace for OpenFOAM.
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
Definition: wedgeMatcher.C:329