add the method to calculate trapped charge regionwise