tetWedgeMatcher.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) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::tetWedgeMatcher
28 
29 Description
30  A cellMatcher for tetWedge cells (cellModel::TETWEDGE).
31 
32 See also
33  cellMatcher, cellModel
34 
35 SourceFiles
36  tetWedgeMatcher.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef tetWedgeMatcher_H
41 #define tetWedgeMatcher_H
42 
43 #include "cellMatcher.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class tetWedgeMatcher Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class tetWedgeMatcher
55 :
56  public cellMatcher
57 {
58  // Static Data Members
59 
60  // Constants for this shape
61  static constexpr label vertPerCell = 5;
62  static constexpr label facePerCell = 4;
63  static constexpr label maxVertPerFace = 4;
64 
65 
66  // Private Member Functions
67 
68  //- No copy construct
69  tetWedgeMatcher(const tetWedgeMatcher&) = delete;
70 
71  //- No copy assignment
72  tetWedgeMatcher& operator=(const tetWedgeMatcher&) = delete;
73 
74 
75 public:
76 
77  // Constructors
78 
79  //- Default construct
81 
82 
83  //- Destructor
84  ~tetWedgeMatcher() = default;
85 
86 
87  // Member Functions
88 
89  virtual label nVertPerCell() const
90  {
91  return vertPerCell;
92  }
93 
94  virtual label nFacePerCell() const
95  {
96  return facePerCell;
97  }
98 
99  virtual label nMaxVertPerFace() const
100  {
101  return maxVertPerFace;
102  }
103 
104  virtual label faceHashValue() const;
105 
106  virtual bool faceSizeMatch(const faceList&, const labelList&) const;
107 
108  virtual bool matchShape
109  (
110  const bool checkOnly,
111  const faceList& faces,
112  const labelList& faceOwner,
113  const label celli,
114  const labelList& myFaces
115  );
116 
117  virtual bool isA(const primitiveMesh& mesh, const label celli);
118 
119  virtual bool isA(const faceList&);
120 
121  virtual bool matches
122  (
123  const primitiveMesh& mesh,
124  const label celli,
125  cellShape& shape
126  );
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::tetWedgeMatcher
A cellMatcher for tetWedge cells (cellModel::TETWEDGE).
Definition: tetWedgeMatcher.H:53
Foam::tetWedgeMatcher::~tetWedgeMatcher
~tetWedgeMatcher()=default
Destructor.
Foam::tetWedgeMatcher::nMaxVertPerFace
virtual label nMaxVertPerFace() const
Definition: tetWedgeMatcher.H:98
Foam::cellMatcher
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
Definition: cellMatcher.H:99
Foam::tetWedgeMatcher::tetWedgeMatcher
tetWedgeMatcher()
Default construct.
Definition: tetWedgeMatcher.C:36
Foam::tetWedgeMatcher::nFacePerCell
virtual label nFacePerCell() const
Definition: tetWedgeMatcher.H:93
Foam::tetWedgeMatcher::matches
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
Definition: tetWedgeMatcher.C:281
Foam::tetWedgeMatcher::nVertPerCell
virtual label nVertPerCell() const
Definition: tetWedgeMatcher.H:88
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::cellShape
An analytical geometric cellShape.
Definition: cellShape.H:69
Foam::tetWedgeMatcher::faceSizeMatch
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
Definition: tetWedgeMatcher.C:218
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::List< face >
cellMatcher.H
Foam::tetWedgeMatcher::isA
virtual bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
Definition: tetWedgeMatcher.C:253
Foam::tetWedgeMatcher::matchShape
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: tetWedgeMatcher.C:51
Foam::tetWedgeMatcher::faceHashValue
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
Definition: tetWedgeMatcher.C:211
Foam::primitiveMesh
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:78