mesh_generation.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_GENERATION_H
21 #define LIBMESH_MESH_GENERATION_H
22 
23 // Local Includes -----------------------------------
24 // #include "libmesh/libmesh_common.h" // needed for Real
25 #include "libmesh/libmesh.h"
26 #include "libmesh/enum_elem_type.h"
28 #include "libmesh/vector_value.h"
29 
30 // C++ Includes -----------------------------------
31 #include <cstddef>
32 #include <vector>
33 
34 namespace libMesh
35 {
36 
37 // forward declarations
38 class MeshBase;
39 class UnstructuredMesh;
40 
41 
42 
43 // ------------------------------------------------------------
44 // MeshTools::Generation namespace
45 namespace MeshTools
46 {
53  namespace Generation
54  {
64  void build_cube (UnstructuredMesh& mesh,
65  const unsigned int nx=0,
66  const unsigned int ny=0,
67  const unsigned int nz=0,
68  const Real xmin=0., const Real xmax=1.,
69  const Real ymin=0., const Real ymax=1.,
70  const Real zmin=0., const Real zmax=1.,
71  const ElemType type=INVALID_ELEM,
72  const bool gauss_lobatto_grid=false);
73 
78  void build_point (UnstructuredMesh& mesh,
79  const ElemType type=INVALID_ELEM,
80  const bool gauss_lobatto_grid=false);
81 
88  void build_line (UnstructuredMesh& mesh,
89  const unsigned int nx,
90  const Real xmin=0., const Real xmax=1.,
91  const ElemType type=INVALID_ELEM,
92  const bool gauss_lobatto_grid=false);
93 
100  void build_square (UnstructuredMesh& mesh,
101  const unsigned int nx,
102  const unsigned int ny,
103  const Real xmin=0., const Real xmax=1.,
104  const Real ymin=0., const Real ymax=1.,
105  const ElemType type=INVALID_ELEM,
106  const bool gauss_lobatto_grid=false);
107 
111  void build_sphere (UnstructuredMesh& mesh,
112  const Real rad=1,
113  const unsigned int nr=2,
114  const ElemType type=INVALID_ELEM,
115  const unsigned int n_smooth=2,
116  const bool flat=true);
117 
121  void build_extrusion (UnstructuredMesh& mesh,
122  const MeshBase& cross_section,
123  const unsigned int nz,
124  RealVectorValue extrusion_vector);
125 
126 #ifdef LIBMESH_HAVE_TRIANGLE
127 
132  void build_delaunay_square(UnstructuredMesh& mesh,
133  const unsigned int nx, // num. of elements in x-dir
134  const unsigned int ny, // num. of elements in y-dir
135  const Real xmin, const Real xmax,
136  const Real ymin, const Real ymax,
137  const ElemType type,
138  const std::vector<TriangleInterface::Hole*>* holes=NULL);
139 #endif // #define LIBMESH_HAVE_TRIANGLE
140 
141  } // end namespace Meshtools::Generation
142 } // end namespace MeshTools
143 
144 
145 } // namespace libMesh
146 
147 #endif // LIBMESH_MESH_GENERATION_H

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

Hosted By:
SourceForge.net Logo