![]() |
|
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 faceTetPolyPatchCellDecomp 00027 00028 Description 00029 A tetPolyPatch based on a polyPatch 00030 00031 SourceFiles 00032 faceTetPolyPatchCellDecomp.C 00033 faceTetPolyPatchCellDecompM.C 00034 newTetPolyPatch.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef faceTetPolyPatchCellDecomp_H 00039 #define faceTetPolyPatchCellDecomp_H 00040 00041 #include "tetPolyPatchCellDecomp.H" 00042 #include "polyPatch.H" 00043 #include "autoPtr.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class faceTetPolyPatchCellDecomp Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class faceTetPolyPatchCellDecomp 00055 : 00056 public tetPolyPatchCellDecomp 00057 { 00058 // Private data 00059 00060 //- Index of polyPatch in boundary 00061 // Needs to be stored as faceTetPolyPatch does not hold a reference to 00062 // a polyPatch in order to enable topological changes 00063 const label boundaryIndex_; 00064 00065 00066 // Private Member Functions 00067 00068 //- Disallow default bitwise copy construct 00069 faceTetPolyPatchCellDecomp(const faceTetPolyPatchCellDecomp&); 00070 00071 //- Disallow default bitwise assignment 00072 void operator=(const faceTetPolyPatchCellDecomp&); 00073 00074 00075 public: 00076 00077 typedef tetPolyBoundaryMeshCellDecomp BoundaryMesh; 00078 00079 00080 //- Runtime type information 00081 TypeName("patch"); 00082 00083 // Declare run-time constructor selection tables 00084 00085 declareRunTimeSelectionTable 00086 ( 00087 autoPtr, 00088 faceTetPolyPatchCellDecomp, 00089 polyPatch, 00090 (const polyPatch& patch, const tetPolyBoundaryMeshCellDecomp& bm), 00091 (patch, bm) 00092 ); 00093 00094 00095 // Constructors 00096 00097 //- Construct from polyPatch 00098 faceTetPolyPatchCellDecomp 00099 ( 00100 const polyPatch&, 00101 const tetPolyBoundaryMeshCellDecomp& 00102 ); 00103 00104 00105 // Selectors 00106 00107 //- Return a pointer to a new patch created on freestore from polyPatch 00108 static autoPtr<faceTetPolyPatchCellDecomp> New 00109 ( 00110 const polyPatch&, 00111 const tetPolyBoundaryMeshCellDecomp& 00112 ); 00113 00114 00115 // Destructor 00116 00117 virtual ~faceTetPolyPatchCellDecomp() 00118 {} 00119 00120 00121 // Member Functions 00122 00123 //- Return the polyPatch 00124 const polyPatch& patch() const; 00125 00126 //- Return name 00127 virtual const word& name() const 00128 { 00129 return patch().name(); 00130 } 00131 00132 //- Return size 00133 virtual label size() const 00134 { 00135 return patch().nPoints(); 00136 } 00137 00138 //- Return number of faces 00139 virtual label nFaces() const 00140 { 00141 return patch().size(); 00142 } 00143 00144 //- Return the index of this patch in the tetPolyBoundaryMeshCellDecomp 00145 virtual label index() const 00146 { 00147 return boundaryIndex_; 00148 } 00149 00150 00151 // Access functions for demand driven data 00152 00153 //- Return mesh points 00154 virtual const labelList& meshPoints() const 00155 { 00156 return patch().meshPoints(); 00157 } 00158 00159 //- Return pointField of points in patch 00160 virtual const pointField& localPoints() const 00161 { 00162 return patch().localPoints(); 00163 } 00164 00165 //- Return point unit normals 00166 virtual const vectorField& pointNormals() const 00167 { 00168 return patch().pointNormals(); 00169 } 00170 00171 //- Face decomposition into triangle 00172 // Used for implementation of FEM boundary conditions 00173 virtual triFaceList faceTriangles(const label faceID) const; 00174 00175 //- Return complete list of faces. All are triangles 00176 virtual faceList triFaces() const; 00177 00178 00179 // Update topology - not required 00180 }; 00181 00182 00183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00184 00185 } // End namespace Foam 00186 00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00188 00189 #endif 00190 00191 // ************************************************************************* //