cs161/assignments/assignment6/heat_diffusion.cpp
/*********************************************************************
 * ** Function: wire
 * ** Description: runs the whole program when wire is selected
 * ** Parameters: n/a
 * ** Pre-Conditions: wire is selected
 * ** Post-Conditions: program runs
 * *********************************************************************/
wire
Description: runs the whole program when wire is selected
Parameters: n/a
Pre-Conditions: wire is selected
Post-Conditions: program runs
wire Description : runs the whole program when wire is selected Parameters : n / a Pre - Conditions : wire is selected Post - Conditions : program runs
void wire() {
	float k = 0, rho = 0, c = 0, time_sim = 0.01675, init_temp = 0, wire_length = 0, delta_x = 0, delta_t = 0, l_temp = 0, r_temp = 100;;
	int sections = 0, num_intervals = 0;
	bool stable = false;
	input_wire(k, rho, c, init_temp, wire_length, sections, num_intervals);
	delta_wire(wire_length, sections, delta_x, num_intervals, time_sim, delta_t);
	stable = stability_check_w(k, delta_t, delta_x, c, rho);
	if(stable)
		calculate_wire(k, rho, c, init_temp, delta_x, delta_t, sections, num_intervals, l_temp, r_temp);
	else {
		cout << "Those numbers aren't stable!" << endl;
		cout << "Start over!" << endl;
		exit(1);
	}
}
void wire ( ) { float k = 0 , rho = 0 , c = 0 , time_sim = 0.01675 , init_temp = 0 , wire_length = 0 , delta_x = 0 , delta_t = 0 , l_temp = 0 , r_temp = 100 ; ; int sections = 0 , num_intervals = 0 ; bool stable = false ; input_wire ( k , rho , c , init_temp , wire_length , sections , num_intervals ) ; delta_wire ( wire_length , sections , delta_x , num_intervals , time_sim , delta_t ) ; stable = stability_check_w ( k , delta_t , delta_x , c , rho ) ; if ( stable ) calculate_wire ( k , rho , c , init_temp , delta_x , delta_t , sections , num_intervals , l_temp , r_temp ) ; else { cout << " " << endl ; cout << " " << endl ; exit ( 1 ) ; } }
** Function: wire
 ** Description: runs the whole program when wire is selected
 ** Parameters: n/a
 ** Pre-Conditions: wire is selected
 ** Post-Conditions: program runs
** Function : wire ** Description : runs the whole program when wire is selected ** Parameters : n / a ** Pre - Conditions : wire is selected ** Post - Conditions : program runs