All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
degenerateMatcher.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-2021 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::degenerateMatcher
26 
27 Description
28  Collection of all hex degenerate matchers (hex, wedge, prism etc.)
29  Has static member function to match a shape.
30 
31 See also
32  cellMatcher
33 
34 SourceFiles
35  degenerateMatcher.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef degenerateMatcher_H
40 #define degenerateMatcher_H
41 
42 #include "hexMatcher.H"
43 #include "wedgeMatcher.H"
44 #include "prismMatcher.H"
45 #include "tetWedgeMatcher.H"
46 #include "pyrMatcher.H"
47 #include "tetMatcher.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class degenerateMatcher Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60 
61  // Static Data Members
62 
63  //- Matchers for all degenerate hex shapes
64  static hexMatcher hex;
65  static wedgeMatcher wedge;
66  static prismMatcher prism;
67  static tetWedgeMatcher tetWedge;
68  static pyrMatcher pyr;
69  static tetMatcher tet;
70 
71  // Static functions
72 
73  //- Recognise basic shape
74  static cellShape match
75  (
76  const faceList& faces,
77  const labelList& faceOwner,
78  const label celli,
79  const labelList& cellFaces
80  );
81 
82 public:
83 
84  // Static Data Members
85 
86  //- Recognise shape given faces of a cell
87  static cellShape match(const faceList& faces);
88 
89  //- Recognise given uncollapsed shape (usually hex) with duplicate
90  // vertices. cellShape just used to extract faces.
91  static cellShape match(const cellShape& shape);
92 
93  //- Recognise shape given mesh and celli
94  static cellShape match(const primitiveMesh& mesh, const label celli);
95 };
96 
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace Foam
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
A cellMatcher for tet cells.
Definition: tetMatcher.H:51
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
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:74
An analytical geometric cellShape.
Definition: cellShape.H:69
A cellMatcher for prism cells.
Definition: prismMatcher.H:51
A cellMatcher for pyr cells.
Definition: pyrMatcher.H:51
A cellMatcher for hex cells.
Definition: hexMatcher.H:51
dynamicFvMesh & mesh
A cellMatcher for wedge cells.
Definition: wedgeMatcher.H:51
A cellMatcher for tetWedge cells.
Collection of all hex degenerate matchers (hex, wedge, prism etc.) Has static member function to matc...
Namespace for OpenFOAM.