Prev Up Next
Go backward to Complex2D Grid Type
Go up to Grids and grid ranges
Go forward to enumerated_subrange Type

CartesianGrid2D Grid Type

This documentation is still incomplete!
Description
The type CartesianGrid2D (typedef to RegGrid2D) is a model of Grid. It allows representation of Cartesian grids, that is, regular m ×n tensor product grids.
Example
#include "Gral/Grids/Cartesian2D/cartesian-grid2d.h"

RegGrid2D R(10,10);  // 10x10 Cartesian grid
assert(R.NumOfVertices() == 10*10);
assert(R.NumOfCells()    == 9*9);
typedef grid_types<CartesianGrid2D> gt; // 'namespace' for CartesianGrid2D-related types 
for(gt::CellIterator c(R), ! c.IsDone(); ++c)
  cout << "Cell " << c.handle() << "  "
       << "has "  << (*c).NumOfVertices() << " verticesn";
Definition

Defined in cartesian-grid2d.h.

Model of
Grid-With-Boundary
Vertex Grid Range
Edge Grid Range
Facet Grid Range
Cell Grid Range
Members
Member Where defined Description
Types
handle types
vertex_handle Vertex Grid Range handle type corr. to Vertex
edge_handle Edge Grid Range handle type corr. to Edge
facet_handle Facet Grid Range handle type corr. to Facet
cell_handle Cell Grid Range handle type corr. to Cell
element types
Vertex Vertex Grid Range The Vertex element type
Edge Edge Grid Range The Edge element type
Facet Facet Grid Range The Facet element type
Cell Cell Grid Range The Cell element type
sequence iterator types
VertexIterator Vertex Grid Range The Sequence Iterator type for Vertex
EdgeIterator Edge Grid Range The Sequence Iterator type for Edge
FacetIterator Facet Grid Range The Sequence Iterator type for Facet
CellIterator Cell Grid Range The Sequence Iterator type for Cell
Functions
constructors
CartesianGrid2D(int m, int n)   construct cartesian grid with n vertices in x direction and m vertices in y direction.
sequence iteration
VertexIterator

FirstVertex()

Vertex Grid Range Iterator pointing to the first vertex
-- same for Edge, Facet, Cell types --
sequence sizes
int NumOfVertices() Vertex Grid Range number of vertices
-- same for Edge, Facet, Cell types --
See also
Triang2D   Complex2D  


Guntram Berti

Prev Up Next