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 \*---------------------------------------------------------------------------*/ 00025 00026 #include "cellPointWeightWallModified.H" 00027 #include <OpenFOAM/wallPolyPatch.H> 00028 #include <OpenFOAM/polyMesh.H> 00029 #include <OpenFOAM/polyBoundaryMesh.H> 00030 00031 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // 00032 00033 Foam::cellPointWeightWallModified::cellPointWeightWallModified 00034 ( 00035 const polyMesh& mesh, 00036 const vector& position, 00037 const label cellIndex, 00038 const label faceIndex 00039 ) 00040 : 00041 cellPointWeight(mesh, position, cellIndex, faceIndex) 00042 { 00043 if (faceIndex < 0) 00044 { 00045 findTetrahedron(mesh, position, cellIndex); 00046 } 00047 else 00048 { 00049 const polyBoundaryMesh& bm = mesh.boundaryMesh(); 00050 label patchI = bm.whichPatch(faceIndex); 00051 if (patchI != -1) 00052 { 00053 if (isA<wallPolyPatch>(bm[patchI])) 00054 { 00055 // Apply cell centre value wall faces 00056 weights_[0] = 0.0; 00057 weights_[1] = 0.0; 00058 weights_[2] = 0.0; 00059 weights_[3] = 1.0; 00060 } 00061 } 00062 else 00063 { 00064 // Interpolate 00065 findTriangle(mesh, position, faceIndex); 00066 } 00067 } 00068 } 00069 00070 00071 // ************************ vim: set sw=4 sts=4 et: ************************ //