Calculate the factor also for the ghost cells