FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::degenerateMatcher
00026 
00027 Description
00028     Collection of all hex degenerate matchers (hex, wedge, prism etc.)
00029     Has static member function to match a shape.
00030 
00031 See Also
00032     cellMatcher
00033 
00034 SourceFiles
00035     degenerateMatcher.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef degenerateMatcher_H
00040 #define degenerateMatcher_H
00041 
00042 #include <OpenFOAM/hexMatcher.H>
00043 #include <OpenFOAM/wedgeMatcher.H>
00044 #include <OpenFOAM/prismMatcher.H>
00045 #include <OpenFOAM/tetWedgeMatcher.H>
00046 #include <OpenFOAM/pyrMatcher.H>
00047 #include <OpenFOAM/tetMatcher.H>
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 
00054 /*---------------------------------------------------------------------------*\
00055                            Class degenerateMatcher Declaration
00056 \*---------------------------------------------------------------------------*/
00057 
00058 class degenerateMatcher
00059 {
00060 
00061     // Static data members
00062 
00063         //- Matchers for all degenerate hex shapes
00064         static hexMatcher hex;
00065         static wedgeMatcher wedge;
00066         static prismMatcher prism;
00067         static tetWedgeMatcher tetWedge;
00068         static pyrMatcher pyr;
00069         static tetMatcher tet;
00070 
00071     // Static functions
00072 
00073         //- Recognize basic shape
00074         static cellShape match
00075         (
00076             const faceList& faces,
00077             const labelList& faceOwner,
00078             const label cellI,
00079             const labelList& cellFaces
00080         );
00081 
00082 public:
00083 
00084     // Static data members
00085 
00086         //- Recognize shape given faces of a cell
00087         static cellShape match(const faceList& faces);
00088 
00089         //- Recognize given uncollapsed shape (usually hex) with duplicate
00090         //  vertices. cellShape just used to extract faces.
00091         static cellShape match(const cellShape& shape);
00092 
00093         //- Recognize shape given mesh and cellI
00094         static cellShape match(const primitiveMesh& mesh, const label cellI);
00095 };
00096 
00097 
00098 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00099 
00100 } // End namespace Foam
00101 
00102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00103 
00104 #endif
00105 
00106 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines