1
// Copyright (C) 2005-2006 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// First added: 2005-12-02
5
// Last changed: 2006-08-07
7
#ifndef __UNIT_SQUARE_H
8
#define __UNIT_SQUARE_H
15
/// Triangular mesh of the 2D unit square (0,1) x (0,1).
16
/// Given the number of cells (nx, ny) in each direction,
17
/// the total number of triangles will be 2*nx*ny and the
18
/// total number of vertices will be (nx + 1)*(ny + 1).
20
/// The Type is an enumerater taking values in {left, right or
21
/// crisscross} indicating the direction of the diagonals for
22
/// left/right or both == crisscross. The default is right.
24
class UnitSquare : public Mesh
27
enum Type {right, left, crisscross};
29
UnitSquare(uint nx, uint ny, Type type = right);