This PR changes the way that cell averaging is done in the Average_Cell_All_Fields function. The previous version averaged each conserved variable independently, which could lead to inconsistent values for the various fields. This version calculates the average of the primitive variables from the surrounding cells, and uses those to update the averaged values of the conserved variables. It replaces the previous version of the call in the Average_Slow_Cells_3D function, and is added to the thread crash for the 3D cell update.
This PR changes the way that cell averaging is done in the Average_Cell_All_Fields function. The previous version averaged each conserved variable independently, which could lead to inconsistent values for the various fields. This version calculates the average of the primitive variables from the surrounding cells, and uses those to update the averaged values of the conserved variables. It replaces the previous version of the call in the Average_Slow_Cells_3D function, and is added to the thread crash for the 3D cell update.