wells: slightly optimize it

this is done by only calculating intensive quantities for elements
which actually are pierced by wells. on SPE1 this lead to a
performance improvement of about 2% on my machine. (3.50 vs 3.57
seconds.)