hexMatcher.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-2015 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::hexMatcher
26 
27 Description
28  A cellMatcher for hex cells
29 
30 See Also
31  cellMatcher
32 
33 SourceFiles
34  hexMatcher.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef hexMatcher_H
39 #define hexMatcher_H
40 
41 #include "cellMatcher.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class hexMatcher Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class hexMatcher
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  // Private Member Functions
65 
66  //- Disallow default bitwise copy construct
67  hexMatcher(const hexMatcher&);
68 
69  //- Disallow default bitwise assignment
70  void operator=(const hexMatcher&);
71 
72 
73 public:
74 
75  // Constructors
76 
77  //- Construct null
78  hexMatcher();
79 
80  //- Destructor
81  ~hexMatcher();
82 
83 
84  // Member Functions
85 
86  virtual label nVertPerCell() const
87  {
88  return vertPerCell;
89  }
90 
91  virtual label nFacePerCell() const
92  {
93  return facePerCell;
94  }
95 
96  virtual label nMaxVertPerFace() const
97  {
98  return maxVertPerFace;
99  }
100 
101  virtual label faceHashValue() const;
102 
103  virtual bool faceSizeMatch(const faceList&, const labelList&) const;
104 
105  virtual bool matchShape
106  (
107  const bool checkOnly,
108  const faceList& faces,
109  const labelList& faceOwner,
110  const label cellI,
111  const labelList& myFaces
112  );
113 
114  virtual bool isA(const primitiveMesh& mesh, const label cellI);
115 
116  virtual bool isA(const faceList&);
117 
118  virtual bool matches
119  (
120  const primitiveMesh& mesh,
121  const label cellI,
122  cellShape& shape
123  );
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
Definition: cellMatcher.H:99
virtual bool isA(const primitiveMesh &mesh, const label cellI)
Exact match. Uses faceSizeMatch.
Definition: hexMatcher.C:278
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: hexMatcher.C:60
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
hexMatcher()
Construct null.
Definition: hexMatcher.C:39
dynamicFvMesh & mesh
Namespace for OpenFOAM.
virtual label nFacePerCell() const
Definition: hexMatcher.H:90
An analytical geometric cellShape.
Definition: cellShape.H:69
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:74
virtual label nVertPerCell() const
Definition: hexMatcher.H:85
virtual bool matches(const primitiveMesh &mesh, const label cellI, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
Definition: hexMatcher.C:306
virtual label nMaxVertPerFace() const
Definition: hexMatcher.H:95
A cellMatcher for hex cells.
Definition: hexMatcher.H:51
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
Definition: hexMatcher.C:247
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
Definition: hexMatcher.C:254
~hexMatcher()
Destructor.
Definition: hexMatcher.C:53