$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library 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 GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_MESH_MODIFICATION_H 00021 #define LIBMESH_MESH_MODIFICATION_H 00022 00023 00024 00025 // Local Includes ----------------------------------- 00026 #include "libmesh/libmesh_common.h" 00027 #include "libmesh/id_types.h" // for boundary_id_type, subdomain_id_type 00028 00029 // C++ Includes ----------------------------------- 00030 00031 namespace libMesh 00032 { 00033 00034 // forward declarations 00035 template <typename Output> class FunctionBase; 00036 class MeshBase; 00037 00038 00039 // ------------------------------------------------------------ 00040 // MeshTools::Modification namespace 00041 namespace MeshTools 00042 { 00049 namespace Modification 00050 { 00058 void distort (MeshBase& mesh, 00059 const Real factor, const bool perturb_boundary=false); 00060 00074 void redistribute (MeshBase& mesh, 00075 const FunctionBase<Real> &mapfunc); 00076 00077 00083 void translate (MeshBase& mesh, 00084 const Real xt=0., const Real yt=0., const Real zt=0.); 00085 00086 // /** 00087 // * Rotates the mesh in the xy plane. The rotation is 00088 // * counter-clock-wise (mathematical definition). 00089 // * The angle is in degrees (360 make a full circle) 00090 // */ 00091 // void rotate2D (MeshBase& mesh, 00092 // const Real alpha=0.); 00093 00100 void rotate (MeshBase& mesh, 00101 const Real phi, const Real theta=0., const Real psi=0.); 00102 00109 void scale (MeshBase& mesh, 00110 const Real xs, const Real ys=0., const Real zs=0.); 00111 00119 void all_tri (MeshBase& mesh); 00120 00133 void smooth(MeshBase&, unsigned int, Real); 00134 00135 #ifdef LIBMESH_ENABLE_AMR 00136 00145 void flatten(MeshBase& mesh); 00146 #endif // #ifdef LIBMESH_ENABLE_AMR 00147 00152 void change_boundary_id (MeshBase &mesh, 00153 const boundary_id_type old_id, 00154 const boundary_id_type new_id); 00155 00160 void change_subdomain_id (MeshBase &mesh, 00161 const subdomain_id_type old_id, 00162 const subdomain_id_type new_id); 00163 00164 } // end namespace Meshtools::Modification 00165 } // end namespace MeshTools 00166 00167 } // namespace libMesh 00168 00169 00170 #endif // LIBMESH_MESH_MODIFICATION_H