let total_occurences =
let length = Array.length Topo.neighbourhoods in
match topology_boundary with
| Periodic -> float length
| Bounded ->
let result = ref 0 in
for i=0 to pred length do if not (discard_cell i) then incr result done;
float !result