mesh_modification.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 class MeshBase; 00036 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 00066 void translate (MeshBase& mesh, 00067 const Real xt=0., const Real yt=0., const Real zt=0.); 00068 00069 // /** 00070 // * Rotates the mesh in the xy plane. The rotation is 00071 // * counter-clock-wise (mathematical definition). 00072 // * The angle is in degrees (360 make a full circle) 00073 // */ 00074 // void rotate2D (MeshBase& mesh, 00075 // const Real alpha=0.); 00076 00083 void rotate (MeshBase& mesh, 00084 const Real phi, const Real theta=0., const Real psi=0.); 00085 00092 void scale (MeshBase& mesh, 00093 const Real xs, const Real ys=0., const Real zs=0.); 00094 00102 void all_tri (MeshBase& mesh); 00103 00116 void smooth(MeshBase&, unsigned int, Real); 00117 00118 #ifdef LIBMESH_ENABLE_AMR 00119 00128 void flatten(MeshBase& mesh); 00129 #endif // #ifdef LIBMESH_ENABLE_AMR 00130 00135 void change_boundary_id (MeshBase &mesh, 00136 const boundary_id_type old_id, 00137 const boundary_id_type new_id); 00138 00143 void change_subdomain_id (MeshBase &mesh, 00144 const subdomain_id_type old_id, 00145 const subdomain_id_type new_id); 00146 00147 } // end namespace Meshtools::Modification 00148 } // end namespace MeshTools 00149 00150 } // namespace libMesh 00151 00152 00153 #endif // LIBMESH_MESH_MODIFICATION_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:47 UTC
Hosted By: