![]() |
|
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 cellPointWeight 00027 00028 Description 00029 00030 SourceFiles 00031 cellPointWeight.C 00032 findCellPointTet.H 00033 findCellPointTriangle.H 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef cellPointWeight_H 00038 #define cellPointWeight_H 00039 00040 #include "vector.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 class polyMesh; 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class cellPointWeight Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class cellPointWeight 00054 { 00055 // Private data 00056 00057 vector position_; 00058 label cellNo_; 00059 label face_; 00060 FixedList<scalar, 4> weights_; 00061 FixedList<label, 3> faceVertices_; 00062 label cellFace_; 00063 00064 00065 // Private Member Functions 00066 00067 bool findTet 00068 ( 00069 const polyMesh& mesh, 00070 const label nFace, 00071 vector tetPoints[], 00072 label tetLabelCandidate[], 00073 scalar phiCandidate[], 00074 label& closestFace, 00075 scalar& minDistance 00076 ); 00077 00078 bool findTriangle 00079 ( 00080 const polyMesh& mesh, 00081 const label nFace 00082 ); 00083 00084 00085 public: 00086 00087 // Constructors 00088 00089 //- Construct from components 00090 cellPointWeight 00091 ( 00092 const polyMesh& mesh, 00093 const vector& position, 00094 const label nCell, 00095 const label facei = -1 00096 ); 00097 00098 00099 // Member Functions 00100 00101 //- cell label 00102 inline label cell() const 00103 { 00104 return cellNo_; 00105 } 00106 00107 //- face label 00108 inline label face() const 00109 { 00110 return face_; 00111 } 00112 00113 //- interpolation weights 00114 inline const FixedList<scalar, 4>& weights() const 00115 { 00116 return weights_; 00117 } 00118 00119 //- interpolation addressing for points on face 00120 inline const FixedList<label, 3>& faceVertices() const 00121 { 00122 return faceVertices_; 00123 } 00124 00125 //- face label 00126 inline label cellFace() const 00127 { 00128 return cellFace_; 00129 } 00130 }; 00131 00132 00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00134 00135 } // End namespace Foam 00136 00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00138 00139 #endif 00140 00141 // ************************************************************************* //