Deinitialization function.
If calculation is required after this function is called, it needs to be initialized again.