18 #ifndef __RECTANGLE_MESH_H 19 #define __RECTANGLE_MESH_H 23 #include <dolfin/common/MPI.h> 24 #include <dolfin/log/log.h> 25 #include <dolfin/mesh/CellType.h> 26 #include <dolfin/mesh/Mesh.h> 58 std::array<std::size_t, 2> n,
60 std::string diagonal=
"right")
61 {
return create(MPI_COMM_WORLD, p, n, cell_type, diagonal); }
82 static Mesh create(MPI_Comm comm,
const std::array<Point, 2>& p,
83 std::array<std::size_t, 2> n,
85 std::string diagonal=
"right")
88 if (cell_type == CellType::Type::triangle)
89 build_tri(mesh, p, n, diagonal);
90 else if (cell_type == CellType::Type::quadrilateral)
91 build_quad(mesh, p, n);
95 "generate rectangle mesh",
96 "Wrong cell type '%d'", cell_type);
123 std::size_t nx, std::size_t ny,
124 std::string diagonal=
"right");
150 std::size_t nx, std::size_t ny,
151 std::string diagonal=
"right");
156 static void build_tri(
Mesh& mesh,
const std::array<Point, 2>& p,
157 std::array<std::size_t, 2> n,
158 std::string diagonal=
"right");
161 static void build_quad(
Mesh& mesh,
const std::array<Point, 2>& p,
162 std::array<std::size_t, 2> n);
static Mesh create(const std::array< Point, 2 > &p, std::array< std::size_t, 2 > n, CellType::Type cell_type, std::string diagonal="right")
Definition: RectangleMesh.h:57
static Mesh create(MPI_Comm comm, const std::array< Point, 2 > &p, std::array< std::size_t, 2 > n, CellType::Type cell_type, std::string diagonal="right")
Definition: RectangleMesh.h:82
RectangleMesh(const Point &p0, const Point &p1, std::size_t nx, std::size_t ny, std::string diagonal="right")
Definition: RectangleMesh.cpp:30
Type
Enum for different cell types.
Definition: CellType.h:51
Definition: RectangleMesh.h:36
void dolfin_error(std::string location, std::string task, std::string reason,...)
Definition: log.cpp:129