OpenFOAM logo
Open Source CFD Toolkit

cellDecompCuts.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-2005 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     cellDecompCuts
00027 
00028 Description
00029     Container for cuts of edges of (implicit) tet decomposition. Used to
00030     collect data for meshCut. As much as possible cuts are defined using
00031     mesh information:
00032 
00033     - cut (exactly) through mesh vertex
00034     -   ,,              ,,       cell centre
00035 
00036     - cut through mesh edge. Both edge label and position on edge given.
00037 
00038     - cut through tet pyramidEdge (edge between vertex and cell centre).
00039       Edge and position on edge given.
00040 
00041     - cut through diagonalEdge (edge between vertices of a face)
00042       Edge and position on edge given.
00043 
00044 SourceFiles
00045 
00046 \*---------------------------------------------------------------------------*/
00047 
00048 #ifndef cellDecompCuts_H
00049 #define cellDecompCuts_H
00050 
00051 #include "meshEdgeCuts.H"
00052 #include "pyramidEdge.H"
00053 #include "diagonalEdge.H"
00054 
00055 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00056 
00057 namespace Foam
00058 {
00059 
00060 // Class forward declarations
00061 
00062 /*---------------------------------------------------------------------------*\
00063                            Class cellDecompCuts Declaration
00064 \*---------------------------------------------------------------------------*/
00065 
00066 class cellDecompCuts
00067 :
00068     public meshEdgeCuts
00069 {
00070 
00071 protected:
00072 
00073         labelList meshCellCentres_;
00074 
00075         List<pyramidEdge> pyrEdges_;
00076         scalarField pyrEdgeWeights_;
00077 
00078         List<diagonalEdge> diagEdges_;
00079         scalarField diagEdgeWeights_;
00080 
00081     // Private Member Functions
00082 
00083 
00084 public:
00085 
00086     // Constructors
00087 
00088         //- Construct from components
00089         cellDecompCuts
00090         (
00091             const primitiveMesh& mesh,
00092             const labelList& cells,
00093 
00094             const labelList& meshVerts,
00095             const labelList& meshCellCentres,
00096 
00097             const labelList& meshEdges,
00098             const scalarField& meshEdgeWeights,
00099 
00100             const List<pyramidEdge>& pyrEdges,
00101             const scalarField& pyrEdgeWeights,
00102 
00103             const List<diagonalEdge>& diagEdges,
00104             const scalarField& diagEdgeWeights
00105         )
00106         :
00107             meshEdgeCuts(mesh, cells, meshVerts, meshEdges, meshEdgeWeights),
00108             meshCellCentres_(meshCellCentres),
00109             pyrEdges_(pyrEdges),
00110             pyrEdgeWeights_(pyrEdgeWeights),
00111             diagEdges_(diagEdges),
00112             diagEdgeWeights_(diagEdgeWeights)
00113         {}
00114 
00115 
00116     // Member Functions
00117 
00118         const labelList& meshCellCentres() const
00119         {
00120             return meshCellCentres_;
00121         }
00122 
00123         const List<pyramidEdge>& pyrEdges() const
00124         {
00125             return pyrEdges_;
00126         }
00127 
00128         const scalarField& pyrEdgeWeights() const
00129         {
00130             return pyrEdgeWeights_;
00131         }
00132 
00133         const List<diagonalEdge>& diagEdges() const
00134         {
00135             return diagEdges_;
00136         }
00137 
00138         const scalarField& diagEdgeWeights() const
00139         {
00140             return diagEdgeWeights_;
00141         }
00142 
00143         label size() const
00144         {
00145             return
00146                 meshEdgeCuts::size() + meshCellCentres_.size()
00147               + pyrEdges_.size() + diagEdges_.size();       
00148         }
00149 
00150 };
00151 
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 } // End namespace Foam
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 #endif
00160 
00161 // ************************************************************************* //
For further information go to www.openfoam.org