add new parameter for the trapped cells

- NEW : parameter for trapped cells, center or all cells
- ENH : enhance the method for setting trap occupation