DOLFIN
DOLFIN C++ interface
UnitDiscMesh.h
1 // Copyright (C) 2015 Chris Richardson
2 //
3 // This file is part of DOLFIN.
4 //
5 // DOLFIN is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // DOLFIN is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17 //
18 
19 #ifndef __UNIT_DISC_MESH_H
20 #define __UNIT_DISC_MESH_H
21 
22 #include <cstddef>
23 #include <dolfin/common/MPI.h>
24 #include <dolfin/mesh/Mesh.h>
25 
26 namespace dolfin
27 {
28 
30 
32  {
33  public:
34 
37  static Mesh create(MPI_Comm comm, std::size_t n, std::size_t degree,
38  std::size_t gdim)
39  {
40  Mesh mesh(comm);
41  build(mesh, n, degree, gdim);
42  return mesh;
43  }
44 
45  private:
46 
47  static void build(Mesh& mesh, std::size_t n, std::size_t degree,
48  std::size_t gdim);
49 
50  };
51 
52 }
53 
54 #endif
static Mesh create(MPI_Comm comm, std::size_t n, std::size_t degree, std::size_t gdim)
Definition: UnitDiscMesh.h:37
Definition: adapt.h:29
A unit disc mesh in 2D or 3D geometry.
Definition: UnitDiscMesh.h:31
Definition: Mesh.h:82