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 "MeshedSurface.H" 00027 00028 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // 00029 00030 namespace Foam 00031 { 00032 00033 // specialization: from face -> triFace 00034 template<> 00035 void Foam::MeshedSurface<triFace>::transcribe(MeshedSurface<face>& surf) 00036 { 00037 // first triangulate 00038 surf.triangulate(); 00039 this->storedPoints().transfer(surf.storedPoints()); 00040 this->storedZones().transfer(surf.storedZones()); 00041 00042 // transcribe from face -> triFace 00043 List<face>& origFaces = surf.storedFaces(); 00044 List<triFace> newFaces(origFaces.size()); 00045 forAll(origFaces, faceI) 00046 { 00047 newFaces[faceI] = triFace 00048 ( 00049 static_cast<const UList<label>&>(origFaces[faceI]) 00050 ); 00051 } 00052 surf.clear(); 00053 00054 this->storedFaces().transfer(newFaces); 00055 } 00056 00057 00058 // specialization: from face -> face 00059 template<> 00060 void Foam::MeshedSurface<face>::transcribe(MeshedSurface<face>& surf) 00061 { 00062 this->transfer(surf); 00063 } 00064 00065 00066 } // end of namespace Foam 00067 00068 00069 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // 00070 00071 00072 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // 00073 00074 00075 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00076 00077 // ************************ vim: set sw=4 sts=4 et: ************************ //