OP2/PyOP2 — pull request #253 by wence- (2013-10-18 09:01:34+00:00)
Title: Don't show halo data in Dat accessors by default

Since halo exchanges are evaluated lazily (Dats are default dirty), the
data in the halo may well be wrong. Furthermore, writing to data in the
halo will be ignored on the next halo exchange. To avoid confusion,
Dat.data and Dat.data_ro now only return a view of the locally owned
data. New accessors, Dat.data_with_halos and Dat.data_ro_with_halos are
introduced for looking at all the data. Map.values is updated similarly
to only give indices that index into local data by default,
Map.values_with_halos shows the whole map.

A result of this change is that it is no longer possible to fully lock
data when it is accessed with the RW accessor. Hence, the following now
no longer raises an error:

x = dat.data
par_loop(..., dat(...))
x[:] = ...