FreeFOAM The Cross-Platform CFD Toolkit
degenerateMatcher.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) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/hexMatcher.H>
43 #include <OpenFOAM/wedgeMatcher.H>
44 #include <OpenFOAM/prismMatcher.H>
46 #include <OpenFOAM/pyrMatcher.H>
47 #include <OpenFOAM/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  //- Recognize 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  //- Recognize shape given faces of a cell
87  static cellShape match(const faceList& faces);
88 
89  //- Recognize given uncollapsed shape (usually hex) with duplicate
90  // vertices. cellShape just used to extract faces.
91  static cellShape match(const cellShape& shape);
92 
93  //- Recognize 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 // ************************ vim: set sw=4 sts=4 et: ************************ //