OpenFOAM logo
Open Source CFD Toolkit

faceDecompCuts.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     faceDecompCuts
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     -   ,,              ,,       face centre
00036 
00037     - cut through mesh edge. Both edge label and position on edge given.
00038 
00039     - cut through tet pyramidEdge (edge between vertex and cell centre).
00040       Edge and position on edge given.
00041     - cut through tet faceEdge (edge between vertex and face centre).
00042       Edge and position on edge given.
00043     - cut through tet centreEdge (edge between face centre and cell centre).
00044       Edge and position on edge given.
00045 
00046 SourceFiles
00047 
00048 \*---------------------------------------------------------------------------*/
00049 
00050 #ifndef faceDecompCuts_H
00051 #define faceDecompCuts_H
00052 
00053 #include "meshEdgeCuts.H"
00054 #include "pyramidEdge.H"
00055 #include "faceEdge.H"
00056 #include "centreEdge.H"
00057 
00058 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00059 
00060 namespace Foam
00061 {
00062 
00063 // Class forward declarations
00064 
00065 /*---------------------------------------------------------------------------*\
00066                            Class faceDecompCuts Declaration
00067 \*---------------------------------------------------------------------------*/
00068 
00069 class faceDecompCuts
00070 :
00071     public meshEdgeCuts
00072 {
00073 
00074 protected:
00075 
00076         //- List of faces whose centre is exactly cut
00077         labelList meshFaceCentres_;
00078 
00079         //- List of cells whose centre is exactly cut
00080         labelList meshCellCentres_;
00081 
00082         //- List of pyramid edge descriptions
00083         List<pyramidEdge> pyrEdges_;
00084 
00085         //- For each pyramid edge description the position of the cut
00086         scalarField pyrEdgeWeights_;
00087 
00088         //- List of face edge descriptions
00089         List<faceEdge> faceEdges_;
00090 
00091         //- For each face edge description the position of the cut
00092         scalarField faceEdgeWeights_;
00093 
00094         //- List of centre edge descriptions
00095         List<centreEdge> centreEdges_;
00096 
00097         //- For each centre edge description the position of the cut
00098         scalarField centreEdgeWeights_;
00099 
00100 public:
00101 
00102     // Constructors
00103 
00104         //- Construct from components
00105         faceDecompCuts
00106         (
00107             const primitiveMesh& mesh,
00108             const labelList& cells,
00109 
00110             const labelList& meshVerts,
00111             const labelList& meshFaceCentres,
00112             const labelList& meshCellCentres,
00113 
00114             const labelList& meshEdges,
00115             const scalarField& meshEdgeWeights,
00116 
00117             const List<pyramidEdge>& pyrEdges,
00118             const scalarField& pyrEdgeWeights,
00119 
00120             const List<faceEdge>& faceEdges,
00121             const scalarField& faceEdgeWeights,
00122 
00123             const List<centreEdge>& centreEdges,
00124             const scalarField& centreEdgeWeights
00125         )
00126         :
00127             meshEdgeCuts(mesh, cells, meshVerts, meshEdges, meshEdgeWeights),
00128             meshFaceCentres_(meshFaceCentres),
00129             meshCellCentres_(meshCellCentres),
00130             pyrEdges_(pyrEdges),
00131             pyrEdgeWeights_(pyrEdgeWeights),
00132             faceEdges_(faceEdges),
00133             faceEdgeWeights_(faceEdgeWeights),
00134             centreEdges_(centreEdges),
00135             centreEdgeWeights_(centreEdgeWeights)
00136         {}
00137 
00138 
00139     // Member Functions
00140 
00141         const labelList& meshFaceCentres() const
00142         {
00143             return meshFaceCentres_;
00144         }
00145 
00146         const labelList& meshCellCentres() const
00147         {
00148             return meshCellCentres_;
00149         }
00150 
00151         const List<pyramidEdge>& pyrEdges() const
00152         {
00153             return pyrEdges_;
00154         }
00155 
00156         const scalarField& pyrEdgeWeights() const
00157         {
00158             return pyrEdgeWeights_;
00159         }
00160 
00161         const List<centreEdge>& centreEdges() const
00162         {
00163             return centreEdges_;
00164         }
00165 
00166         const scalarField& centreEdgeWeights() const
00167         {
00168             return centreEdgeWeights_;
00169         }
00170 
00171         const List<faceEdge>& faceEdges() const
00172         {
00173             return faceEdges_;
00174         }
00175 
00176         const scalarField& faceEdgeWeights() const
00177         {
00178             return faceEdgeWeights_;
00179         }
00180 
00181         label size() const
00182         {
00183             return
00184                 meshEdgeCuts::size()
00185               + meshFaceCentres_.size() + meshCellCentres_.size()
00186               + pyrEdges_.size() + centreEdges_.size() + faceEdges_.size();       
00187         }
00188 
00189 };
00190 
00191 
00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00193 
00194 } // End namespace Foam
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************************************************************* //
For further information go to www.openfoam.org