Grid-With-Boundary Concept |
A Grid-With-Boundary allows to query whether a facet is a boundary facet. Moreover, it defines a special cell handle for an `outside cell', and allows to query whether a cell is inside the grid.
Grid
Cell Grid Range
Facet Grid Range
The cell type of a Grid-With-Boundary is a model
of Grid Cell and of
Facet Grid Range.
G is a type which is a model of Grid-With-Boundary
g is an object of type G
c is an object of type G::Cell
h is an object of type G::cell_handle
f is an object of type G::Facet
fc is an object of type G::FacetOnCellIterator
No new ones, but the requirements on G::Cell
are strengthened.
Name | Expression | Description |
cell type | G::Cell |
the cell element type of G
model of Grid Cell and of Facet Grid Range |
Name | Expression | Type requirements | return type |
inside test |
g.IsInside(c) | bool | |
inside test |
g.IsInside(h) | bool | |
boundary test |
g.IsOnBoundary(fc) | bool | |
boundary test |
g.IsOnBoundary(f) | bool | |
outer cell handle |
g.outer_cell_handle() | G::cell_handle |
Name | Expression | Precondition | Semantics | Postcondition |
inside test |
g.IsInside(c); |
c is bound to g
c is valid
or | Test if c is inside the grid |
true if c is valid for g.
false if |
inside test |
g.IsInside(h); |
h is valid
or h == g.outer_cell_handle() | Test if h is handle of a cell inside the grid |
true if h is valid for g.
false if |
boundary test |
g.IsOnBoundary(f) | f is valid |
Returns true if f
is a boundary facet of g | |
boundary test |
g.IsOnBoundary(fc) | fc is valid |
equivalent to g.IsOnBoundary(*fc) . | |
outer cell handle |
h = g.outer_cell_handle(); | return a handle denoting an `outside' cell |
g.IsInside(h) is false
|
g.IsInside(g.outer_cell_handle()) == false | |
g.IsInside(c) == g.IsInside(c.handle()) | |
g.IsOnBoundary(fc) == ! g.IsInside(fc.OtherCell()) X | |
g.IsOnBoundary(f) == (!g.IsInside(f.TheCell()) || !g.IsInside(f.OtherCell())) | |
g.IsInside() evaluates to true for all
cells in the range [g.FirstCell() ,g.EndCell() ).
|
! g.IsInside(h)
, then
h
== g.outer_cell_handle(),
because it is possible that there are many different handles
denoting an outer cell. For example, when we consider Cartesian grids,
cells with an logical index (i,j) outside the grid range would
satisfy ! g.IsInside(c)
but do not necessarily possess a handle equal to
g
.outer_cell_handle().
Cell c = g.cell(g.outer_cell_handle())
is possible, as is
Cell c = fc.OtherCell()
when g.IsOnBoundary(fc)
is true.
However, the only operation guaranteed to work with c is
the query g.IsInside(c)
which evaluates to false
.
Guntram Berti
Grid-With-Boundary Concept |