mesh_modification.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_MESH_MODIFICATION_H
21 #define LIBMESH_MESH_MODIFICATION_H
22 
23 
24 
25 // Local Includes -----------------------------------
26 #include "libmesh/libmesh_common.h"
27 #include "libmesh/id_types.h" // for boundary_id_type, subdomain_id_type
28 
29 // C++ Includes -----------------------------------
30 
31 namespace libMesh
32 {
33 
34 // forward declarations
35 class MeshBase;
36 
37 
38 
39 // ------------------------------------------------------------
40 // MeshTools::Modification namespace
41 namespace MeshTools
42 {
49  namespace Modification
50  {
58  void distort (MeshBase& mesh,
59  const Real factor, const bool perturb_boundary=false);
60 
66  void translate (MeshBase& mesh,
67  const Real xt=0., const Real yt=0., const Real zt=0.);
68 
69 // /**
70 // * Rotates the mesh in the xy plane. The rotation is
71 // * counter-clock-wise (mathematical definition).
72 // * The angle is in degrees (360 make a full circle)
73 // */
74 // void rotate2D (MeshBase& mesh,
75 // const Real alpha=0.);
76 
83  void rotate (MeshBase& mesh,
84  const Real phi, const Real theta=0., const Real psi=0.);
85 
92  void scale (MeshBase& mesh,
93  const Real xs, const Real ys=0., const Real zs=0.);
94 
102  void all_tri (MeshBase& mesh);
103 
116  void smooth(MeshBase&, unsigned int, Real);
117 
118 #ifdef LIBMESH_ENABLE_AMR
119 
128  void flatten(MeshBase& mesh);
129 #endif // #ifdef LIBMESH_ENABLE_AMR
130 
135  void change_boundary_id (MeshBase &mesh,
136  const boundary_id_type old_id,
137  const boundary_id_type new_id);
138 
143  void change_subdomain_id (MeshBase &mesh,
144  const subdomain_id_type old_id,
145  const subdomain_id_type new_id);
146 
147  } // end namespace Meshtools::Modification
148 } // end namespace MeshTools
149 
150 } // namespace libMesh
151 
152 
153 #endif // LIBMESH_MESH_MODIFICATION_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:06 UTC

Hosted By:
SourceForge.net Logo