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

tetCell.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::tetCell
00026 
00027 Description
00028     A tetrahedral cell primitive.
00029 
00030     It is important that the ordering of edges is the same for a tetrahedron
00031     class, a tetrahedron cell shape model and a tetCell
00032 
00033 SourceFiles
00034     tetCell.C
00035     tetCellI.H
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef tetCell_H
00040 #define tetCell_H
00041 
00042 #include <OpenFOAM/FixedList.H>
00043 #include <OpenFOAM/triFace.H>
00044 #include <OpenFOAM/edge.H>
00045 #include <OpenFOAM/pointField.H>
00046 #include <OpenFOAM/tetPointRef.H>
00047 
00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00049 
00050 namespace Foam
00051 {
00052 
00053 class cellShape;
00054 
00055 /*---------------------------------------------------------------------------*\
00056                            class tetCell Declaration
00057 \*---------------------------------------------------------------------------*/
00058 
00059 class tetCell
00060 :
00061     public FixedList<label, 4>
00062 {
00063 
00064 public:
00065 
00066     // Constructors
00067 
00068         //- Construct null
00069         inline tetCell();
00070 
00071         //- Construct from four points
00072         inline tetCell
00073         (
00074             const label a,
00075             const label b,
00076             const label c,
00077             const label d
00078         );
00079 
00080         //- Construct from FixedList
00081         inline tetCell(const FixedList<label, 4>&);
00082 
00083         //- Construct from Istream
00084         inline tetCell(Istream&);
00085 
00086 
00087     // Member Functions
00088 
00089         // Access
00090 
00091             //- Return i-th face
00092             inline triFace face(const label faceI) const;
00093 
00094             //- Return first face adjacent to the given edge
00095             inline label edgeFace(const label edgeI) const;
00096 
00097             //- Return face adjacent to the given face sharing the same edge
00098             inline label edgeAdjacentFace
00099             (
00100                 const label edgeI,
00101                 const label faceI
00102             ) const;
00103 
00104             //- Return i-th edge
00105             inline edge tetEdge(const label edgeI) const;
00106 
00107 
00108         // Operations
00109 
00110             //- Return tet shape cell
00111             cellShape tetCellShape() const;
00112 
00113             //- Return the tetrahedron
00114             inline tetPointRef tet(const pointField&) const;
00115 };
00116 
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 } // End namespace Foam
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 #include <OpenFOAM/tetCellI.H>
00125 
00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00127 
00128 #endif
00129 
00130 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines