cs161/assignments/assignment6/heat_diffusion.cpp
/*********************************************************************
 * ** Function: clear_plate
 * ** Description: deletes all arrays and frees memory
 * ** Parameters: u1, u2, sections
 * ** Pre-Conditions: plate has been calculated and program works
 * ** Post-Conditions: memory is freed
 * *********************************************************************/
clear_plate
Description: deletes all arrays and frees memory
Parameters: u1, u2, sections
Pre-Conditions: plate has been calculated and program works
Post-Conditions: memory is freed
clear_plate Description : deletes all arrays and frees memory Parameters : u1 u2 sections Pre - Conditions : plate has been calculated and program works Post - Conditions : memory is freed
void clear_plate(float** u1, float** u2, int sections) {
	for(int i = 0; i < sections; i++) {
		delete [] u1[i];
		delete [] u2[i];
	}
	delete [] u1;
	delete [] u2;
}
void clear_plate ( float * * u1 , float * * u2 , int sections ) { for ( int i = 0 ; i < sections ; i ++ ) { delete [ ] u1 [ i ] ; delete [ ] u2 [ i ] ; } delete [ ] u1 ; delete [ ] u2 ; }
** Function: clear_plate
 ** Description: deletes all arrays and frees memory
 ** Parameters: u1, u2, sections
 ** Pre-Conditions: plate has been calculated and program works
 ** Post-Conditions: memory is freed
** Function : clear_plate ** Description : deletes all arrays and frees memory ** Parameters : u1 u2 sections ** Pre - Conditions : plate has been calculated and program works ** Post - Conditions : memory is freed