OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

degenerateMatcher.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::degenerateMatcher
00027 
00028 Description
00029     Collection of all hex degenerate matchers (hex, wedge, prism etc.)
00030     Has static member function to match a shape.
00031 
00032 See Also
00033     cellMatcher
00034 
00035 SourceFiles
00036     degenerateMatcher.C
00037 
00038 \*---------------------------------------------------------------------------*/
00039 
00040 #ifndef degenerateMatcher_H
00041 #define degenerateMatcher_H
00042 
00043 #include "hexMatcher.H"
00044 #include "wedgeMatcher.H"
00045 #include "prismMatcher.H"
00046 #include "tetWedgeMatcher.H"
00047 #include "pyrMatcher.H"
00048 #include "tetMatcher.H"
00049 
00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00051 
00052 namespace Foam
00053 {
00054 
00055 /*---------------------------------------------------------------------------*\
00056                            Class degenerateMatcher Declaration
00057 \*---------------------------------------------------------------------------*/
00058 
00059 class degenerateMatcher
00060 {
00061 
00062     // Static data members
00063 
00064         //- Matchers for all degenerate hex shapes
00065         static hexMatcher hex;
00066         static wedgeMatcher wedge;
00067         static prismMatcher prism;
00068         static tetWedgeMatcher tetWedge;
00069         static pyrMatcher pyr;
00070         static tetMatcher tet;
00071 
00072     // Static functions
00073 
00074         //- Recognize basic shape
00075         static cellShape match
00076         (
00077             const faceList& faces,
00078             const labelList& faceOwner,
00079             const label cellI,
00080             const labelList& cellFaces
00081         );
00082 
00083 public:
00084 
00085     // Static data members
00086 
00087         //- Recognize shape given faces of a cell
00088         static cellShape match(const faceList& faces);
00089 
00090         //- Recognize given uncollapsed shape (usually hex) with duplicate
00091         //  vertices. cellShape just used to extract faces.
00092         static cellShape match(const cellShape& shape);
00093 
00094         //- Recognize shape given mesh and cellI
00095         static cellShape match(const primitiveMesh& mesh, const label cellI);
00096 };
00097 
00098 
00099 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00100 
00101 } // End namespace Foam
00102 
00103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00104 
00105 #endif
00106 
00107 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd