#ifndef H_HEAT_SOLVE_H #define H_HEAT_SOLVE_H enum method { FD_undefined, FD_explicit, FD_implicit, FD_crank_nicolson, FD_seidman_sweep }; struct heat_solve { double a; // left end at x = a double b; // right end at x = b double T; // solve for 0 < t < T int n; // number of x subintervals int m; // number of t subintervals double (*ic)(double x); // initial condition double (*bcL)(double t); // left boundary condition double (*bcR)(double t); // right boundary condition enum method method; // solution method double **u; // solution array double (*exact_sol)(double x, double t); // exact solution, if any double error; // error vs exact solution char *maple_out; // output file for maple graphics char *matlab_out; // output file for matlab graphics char *geomview_out; // output file for geomview graphics }; void show_usage_and_exit ( char *progname ); void heat_solve ( struct heat_solve *prob ); #endif /* H_HEAT_SOLVE_H */