00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2005 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: MeshTransformer.hpp,v 1.3 2007/02/26 01:13:47 delpinux Exp $ 00019 00020 #ifndef MESH_TRANSFORMER_HPP 00021 #define MESH_TRANSFORMER_HPP 00022 00023 #include <MeshGenerator.hpp> 00024 00025 class VerticesSet; 00026 class FieldOfScalarFunction; 00027 00036 class MeshTransformer 00037 : public MeshGenerator 00038 { 00039 protected: 00040 ConstReferenceCounting<Mesh> 00041 __input; 00043 ConstReferenceCounting<FieldOfScalarFunction> 00044 __field; 00046 private: 00052 MeshTransformer(const MeshTransformer& M); 00053 00058 template <typename MeshType> 00059 void __transformVolume(); 00060 00065 template <typename MeshType> 00066 void __transformSurface(); 00067 00077 template <typename CellType, 00078 typename OriginalCellType> 00079 CellType __getCell(VerticesSet& V, 00080 const OriginalCellType& originalCell); 00081 public: 00086 void transform(); 00087 00094 MeshTransformer(ConstReferenceCounting<Mesh> inputMesh, 00095 ConstReferenceCounting<FieldOfScalarFunction> field) 00096 : MeshGenerator(), 00097 __input(inputMesh), 00098 __field(field) 00099 { 00100 ; 00101 } 00102 00107 virtual ~MeshTransformer() 00108 { 00109 ; 00110 } 00111 }; 00112 00113 #endif // MESH_TRANSFORMER_HPP
1.5.6