Consolidated crust heating code; take into account partially heated cells in the magnetar case