|\^/| Maple 12 (IBM INTEL LINUX) ._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2008 \ MAPLE / All rights reserved. Maple is a trademark of <____ ____> Waterloo Maple Inc. | Type ? for help. > #BEGIN OUTFILE1 > > # Begin Function number 3 > display_alot := proc(iter) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; > #TOP DISPLAY ALOT > if (iter >= 0) then # if number 1 > ind_var := array_t[1]; > omniout_float(ALWAYS,"t[1] ",33,ind_var,20," "); > analytic_val_y := exact_soln_x1(ind_var); > omniout_float(ALWAYS,"x1[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_x1[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"x1[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then # if number 2 > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;# end if 2 > ; > if glob_iter = 1 then # if number 2 > array_1st_rel_error[1] := relerr; > else > array_last_rel_error[1] := relerr; > fi;# end if 2 > ; > omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); > omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); > omniout_float(ALWAYS,"h ",4,glob_h,20," "); > ; > analytic_val_y := exact_soln_x2(ind_var); > omniout_float(ALWAYS,"x2[1] (analytic) ",33,analytic_val_y,20," "); > term_no := 1; > numeric_val := array_x2[term_no]; > abserr := abs(numeric_val - analytic_val_y); > omniout_float(ALWAYS,"x2[1] (numeric) ",33,numeric_val,20," "); > if (abs(analytic_val_y) <> 0.0) then # if number 2 > relerr := abserr*100.0/abs(analytic_val_y); > else > relerr := -1.0 ; > fi;# end if 2 > ; > if glob_iter = 1 then # if number 2 > array_1st_rel_error[2] := relerr; > else > array_last_rel_error[2] := relerr; > fi;# end if 2 > ; > omniout_float(ALWAYS,"absolute error ",4,abserr,20," "); > omniout_float(ALWAYS,"relative error ",4,relerr,20,"%"); > omniout_float(ALWAYS,"h ",4,glob_h,20," "); > #BOTTOM DISPLAY ALOT > fi;# end if 1 > ; > # End Function number 3 > end; display_alot := proc(iter) local abserr, analytic_val_y, ind_var, numeric_val, relerr, term_no; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; if 0 <= iter then ind_var := array_t[1]; omniout_float(ALWAYS, "t[1] ", 33, ind_var, 20, " "); analytic_val_y := exact_soln_x1(ind_var); omniout_float(ALWAYS, "x1[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_x1[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "x1[1] (numeric) ", 33, numeric_val, 20, " "); if abs(analytic_val_y) <> 0. then relerr := abserr*100.0/abs(analytic_val_y) else relerr := -1.0 end if; if glob_iter = 1 then array_1st_rel_error[1] := relerr else array_last_rel_error[1] := relerr end if; omniout_float(ALWAYS, "absolute error ", 4, abserr, 20, " "); omniout_float(ALWAYS, "relative error ", 4, relerr, 20, "%"); omniout_float(ALWAYS, "h ", 4, glob_h, 20, " "); analytic_val_y := exact_soln_x2(ind_var); omniout_float(ALWAYS, "x2[1] (analytic) ", 33, analytic_val_y, 20, " "); term_no := 1; numeric_val := array_x2[term_no]; abserr := abs(numeric_val - analytic_val_y); omniout_float(ALWAYS, "x2[1] (numeric) ", 33, numeric_val, 20, " "); if abs(analytic_val_y) <> 0. then relerr := abserr*100.0/abs(analytic_val_y) else relerr := -1.0 end if; if glob_iter = 1 then array_1st_rel_error[2] := relerr else array_last_rel_error[2] := relerr end if; omniout_float(ALWAYS, "absolute error ", 4, abserr, 20, " "); omniout_float(ALWAYS, "relative error ", 4, relerr, 20, "%"); omniout_float(ALWAYS, "h ", 4, glob_h, 20, " ") end if end proc > # Begin Function number 4 > adjust_for_pole := proc(h_param) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local hnew, sz2, tmp; > #TOP ADJUST FOR POLE > > hnew := h_param; > glob_normmax := glob_small_float; > if (abs(array_x1_higher[1,1]) > glob_small_float) then # if number 1 > tmp := abs(array_x1_higher[1,1]); > if (tmp < glob_normmax) then # if number 2 > glob_normmax := tmp; > fi;# end if 2 > fi;# end if 1 > ; > if (abs(array_x2_higher[1,1]) > glob_small_float) then # if number 1 > tmp := abs(array_x2_higher[1,1]); > if (tmp < glob_normmax) then # if number 2 > glob_normmax := tmp; > fi;# end if 2 > fi;# end if 1 > ; > if (glob_look_poles and (abs(array_pole[1]) > glob_small_float) and (array_pole[1] <> glob_large_float)) then # if number 1 > sz2 := array_pole[1]/10.0; > if (sz2 < hnew) then # if number 2 > omniout_float(INFO,"glob_h adjusted to ",20,h_param,12,"due to singularity."); > omniout_str(INFO,"Reached Optimal"); > newline(); > return(hnew); > fi;# end if 2 > fi;# end if 1 > ; > if (not glob_reached_optimal_h) then # if number 1 > glob_reached_optimal_h := true; > glob_curr_iter_when_opt := glob_current_iter; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > glob_optimal_start := array_t[1]; > fi;# end if 1 > ; > hnew := sz2; > #END block > #BOTTOM ADJUST FOR POLE > # End Function number 4 > end; adjust_for_pole := proc(h_param) local hnew, sz2, tmp; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; hnew := h_param; glob_normmax := glob_small_float; if glob_small_float < abs(array_x1_higher[1, 1]) then tmp := abs(array_x1_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_small_float < abs(array_x2_higher[1, 1]) then tmp := abs(array_x2_higher[1, 1]); if tmp < glob_normmax then glob_normmax := tmp end if end if; if glob_look_poles and glob_small_float < abs(array_pole[1]) and array_pole[1] <> glob_large_float then sz2 := array_pole[1]/10.0; if sz2 < hnew then omniout_float(INFO, "glob_h adjusted to ", 20, h_param, 12, "due to singularity."); omniout_str(INFO, "Reached Optimal"); newline(); return hnew end if end if; if not glob_reached_optimal_h then glob_reached_optimal_h := true; glob_curr_iter_when_opt := glob_current_iter; glob_optimal_clock_start_sec := elapsed_time_seconds(); glob_optimal_start := array_t[1] end if; hnew := sz2 end proc > # Begin Function number 5 > prog_report := proc(t_start,t_end) > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec; > #TOP PROGRESS REPORT > clock_sec1 := elapsed_time_seconds(); > total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); > glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); > left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); > expect_sec := comp_expect_sec(convfloat(t_end),convfloat(t_start),convfloat(array_t[1]) + convfloat(glob_h) ,convfloat( clock_sec1) - convfloat(glob_orig_start_sec)); > opt_clock_sec := convfloat( clock_sec1) - convfloat(glob_optimal_clock_start_sec); > glob_optimal_expect_sec := comp_expect_sec(convfloat(t_end),convfloat(t_start),convfloat(array_t[1]) +convfloat( glob_h) ,convfloat( opt_clock_sec)); > percent_done := comp_percent(convfloat(t_end),convfloat(t_start),convfloat(array_t[1]) + convfloat(glob_h)); > glob_percent_done := percent_done; > omniout_str_noeol(INFO,"Total Elapsed Time "); > omniout_timestr(convfloat(total_clock_sec)); > omniout_str_noeol(INFO,"Elapsed Time(since restart) "); > omniout_timestr(convfloat(glob_clock_sec)); > if convfloat(percent_done) < convfloat(100.0) then # if number 1 > omniout_str_noeol(INFO,"Expected Time Remaining "); > omniout_timestr(convfloat(expect_sec)); > omniout_str_noeol(INFO,"Optimized Time Remaining "); > omniout_timestr(convfloat(glob_optimal_expect_sec)); > fi;# end if 1 > ; > omniout_str_noeol(INFO,"Time to Timeout "); > omniout_timestr(convfloat(left_sec)); > omniout_float(INFO, "Percent Done ",33,percent_done,4,"%"); > #BOTTOM PROGRESS REPORT > # End Function number 5 > end; prog_report := proc(t_start, t_end) local clock_sec, opt_clock_sec, clock_sec1, expect_sec, left_sec, percent_done, total_clock_sec; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; clock_sec1 := elapsed_time_seconds(); total_clock_sec := convfloat(clock_sec1) - convfloat(glob_orig_start_sec); glob_clock_sec := convfloat(clock_sec1) - convfloat(glob_clock_start_sec); left_sec := convfloat(glob_max_sec) + convfloat(glob_orig_start_sec) - convfloat(clock_sec1); expect_sec := comp_expect_sec(convfloat(t_end), convfloat(t_start), convfloat(array_t[1]) + convfloat(glob_h), convfloat(clock_sec1) - convfloat(glob_orig_start_sec)); opt_clock_sec := convfloat(clock_sec1) - convfloat(glob_optimal_clock_start_sec); glob_optimal_expect_sec := comp_expect_sec(convfloat(t_end), convfloat(t_start), convfloat(array_t[1]) + convfloat(glob_h), convfloat(opt_clock_sec)); percent_done := comp_percent(convfloat(t_end), convfloat(t_start), convfloat(array_t[1]) + convfloat(glob_h)); glob_percent_done := percent_done; omniout_str_noeol(INFO, "Total Elapsed Time "); omniout_timestr(convfloat(total_clock_sec)); omniout_str_noeol(INFO, "Elapsed Time(since restart) "); omniout_timestr(convfloat(glob_clock_sec)); if convfloat(percent_done) < convfloat(100.0) then omniout_str_noeol(INFO, "Expected Time Remaining "); omniout_timestr(convfloat(expect_sec)); omniout_str_noeol(INFO, "Optimized Time Remaining "); omniout_timestr(convfloat(glob_optimal_expect_sec)) end if; omniout_str_noeol(INFO, "Time to Timeout "); omniout_timestr(convfloat(left_sec)); omniout_float(INFO, "Percent Done ", 33, percent_done, 4, "%") end proc > # Begin Function number 6 > check_for_pole := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; > #TOP CHECK FOR POLE > #IN RADII REAL EQ = 1 > #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 1 > #Applies to pole of arbitrary r_order on the real axis, > #Due to Prof. George Corliss. > n := glob_max_terms; > m := n - 1 - 1; > while ((m >= 10) and ((abs(array_x1_higher[1,m]) < glob_small_float) or (abs(array_x1_higher[1,m-1]) < glob_small_float) or (abs(array_x1_higher[1,m-2]) < glob_small_float ))) do # do number 2 > m := m - 1; > od;# end do number 2 > ; > if (m > 10) then # if number 1 > rm0 := array_x1_higher[1,m]/array_x1_higher[1,m-1]; > rm1 := array_x1_higher[1,m-1]/array_x1_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(hdrc) > glob_small_float) then # if number 2 > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[1,1] := rcs; > array_real_pole[1,2] := ord_no; > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 2 > else > array_real_pole[1,1] := glob_large_float; > array_real_pole[1,2] := glob_large_float; > fi;# end if 1 > ; > #BOTTOM RADII REAL EQ = 1 > #IN RADII REAL EQ = 2 > #Computes radius of convergence and r_order of pole from 3 adjacent Taylor series terms. EQUATUON NUMBER 2 > #Applies to pole of arbitrary r_order on the real axis, > #Due to Prof. George Corliss. > n := glob_max_terms; > m := n - 2 - 1; > while ((m >= 10) and ((abs(array_x2_higher[1,m]) < glob_small_float) or (abs(array_x2_higher[1,m-1]) < glob_small_float) or (abs(array_x2_higher[1,m-2]) < glob_small_float ))) do # do number 2 > m := m - 1; > od;# end do number 2 > ; > if (m > 10) then # if number 1 > rm0 := array_x2_higher[1,m]/array_x2_higher[1,m-1]; > rm1 := array_x2_higher[1,m-1]/array_x2_higher[1,m-2]; > hdrc := convfloat(m-1)*rm0-convfloat(m-2)*rm1; > if (abs(hdrc) > glob_small_float) then # if number 2 > rcs := glob_h/hdrc; > ord_no := convfloat(m-1)*rm0/hdrc - convfloat(m) + 2.0; > array_real_pole[2,1] := rcs; > array_real_pole[2,2] := ord_no; > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi;# end if 2 > else > array_real_pole[2,1] := glob_large_float; > array_real_pole[2,2] := glob_large_float; > fi;# end if 1 > ; > #BOTTOM RADII REAL EQ = 2 > #TOP RADII COMPLEX EQ = 1 > #Computes radius of convergence for complex conjugate pair of poles. > #from 6 adjacent Taylor series terms > #Also computes r_order of poles. > #Due to Manuel Prieto. > #With a correction by Dennis J. Darland > n := glob_max_terms - 1 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (abs(array_x1_higher[1,n]) > glob_small_float) then # if number 1 > cnt := cnt + 1; > else > cnt := 0; > fi;# end if 1 > ; > n := n - 1; > od;# end do number 2 > ; > m := n + cnt; > if (m <= 10) then # if number 1 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > elif (abs(array_x1_higher[1,m]) >= (glob_large_float)) or (abs(array_x1_higher[1,m-1]) >=(glob_large_float)) or (abs(array_x1_higher[1,m-2]) >= (glob_large_float)) or (abs(array_x1_higher[1,m-3]) >= (glob_large_float)) or (abs(array_x1_higher[1,m-4]) >= (glob_large_float)) or (abs(array_x1_higher[1,m-5]) >= (glob_large_float)) then # if number 2 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > rm0 := (array_x1_higher[1,m])/(array_x1_higher[1,m-1]); > rm1 := (array_x1_higher[1,m-1])/(array_x1_higher[1,m-2]); > rm2 := (array_x1_higher[1,m-2])/(array_x1_higher[1,m-3]); > rm3 := (array_x1_higher[1,m-3])/(array_x1_higher[1,m-4]); > rm4 := (array_x1_higher[1,m-4])/(array_x1_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((abs(nr1 * dr2 - nr2 * dr1) <= glob_small_float) or (abs(dr1) <= glob_small_float)) then # if number 3 > array_complex_pole[1,1] := glob_large_float; > array_complex_pole[1,2] := glob_large_float; > else > if (abs(nr1*dr2 - nr2 * dr1) > glob_small_float) then # if number 4 > rcs := ((ds1*dr2 - ds2*dr1 +dr1*dr2)/(nr1*dr2 - nr2 * dr1)); > #(Manuels) rcs := (ds1*dr2 - ds2*dr1)/(nr1*dr2 - nr2 * dr1) > ord_no := (rcs*nr1 - ds1)/(2.0*dr1) -convfloat(m)/2.0; > if (abs(rcs) > glob_small_float) then # if number 5 > if (rcs > 0.0) then # if number 6 > rad_c := sqrt(rcs) * glob_h; > else > rad_c := glob_large_float; > fi;# end if 6 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 5 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 4 > fi;# end if 3 > ; > array_complex_pole[1,1] := rad_c; > array_complex_pole[1,2] := ord_no; > fi;# end if 2 > ; > #BOTTOM RADII COMPLEX EQ = 1 > #TOP RADII COMPLEX EQ = 2 > #Computes radius of convergence for complex conjugate pair of poles. > #from 6 adjacent Taylor series terms > #Also computes r_order of poles. > #Due to Manuel Prieto. > #With a correction by Dennis J. Darland > n := glob_max_terms - 2 - 1; > cnt := 0; > while ((cnt < 5) and (n >= 10)) do # do number 2 > if (abs(array_x2_higher[1,n]) > glob_small_float) then # if number 2 > cnt := cnt + 1; > else > cnt := 0; > fi;# end if 2 > ; > n := n - 1; > od;# end do number 2 > ; > m := n + cnt; > if (m <= 10) then # if number 2 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > elif (abs(array_x2_higher[1,m]) >= (glob_large_float)) or (abs(array_x2_higher[1,m-1]) >=(glob_large_float)) or (abs(array_x2_higher[1,m-2]) >= (glob_large_float)) or (abs(array_x2_higher[1,m-3]) >= (glob_large_float)) or (abs(array_x2_higher[1,m-4]) >= (glob_large_float)) or (abs(array_x2_higher[1,m-5]) >= (glob_large_float)) then # if number 3 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > else > rm0 := (array_x2_higher[1,m])/(array_x2_higher[1,m-1]); > rm1 := (array_x2_higher[1,m-1])/(array_x2_higher[1,m-2]); > rm2 := (array_x2_higher[1,m-2])/(array_x2_higher[1,m-3]); > rm3 := (array_x2_higher[1,m-3])/(array_x2_higher[1,m-4]); > rm4 := (array_x2_higher[1,m-4])/(array_x2_higher[1,m-5]); > nr1 := convfloat(m-1)*rm0 - 2.0*convfloat(m-2)*rm1 + convfloat(m-3)*rm2; > nr2 := convfloat(m-2)*rm1 - 2.0*convfloat(m-3)*rm2 + convfloat(m-4)*rm3; > dr1 := (-1.0)/rm1 + 2.0/rm2 - 1.0/rm3; > dr2 := (-1.0)/rm2 + 2.0/rm3 - 1.0/rm4; > ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; > ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; > if ((abs(nr1 * dr2 - nr2 * dr1) <= glob_small_float) or (abs(dr1) <= glob_small_float)) then # if number 4 > array_complex_pole[2,1] := glob_large_float; > array_complex_pole[2,2] := glob_large_float; > else > if (abs(nr1*dr2 - nr2 * dr1) > glob_small_float) then # if number 5 > rcs := ((ds1*dr2 - ds2*dr1 +dr1*dr2)/(nr1*dr2 - nr2 * dr1)); > #(Manuels) rcs := (ds1*dr2 - ds2*dr1)/(nr1*dr2 - nr2 * dr1) > ord_no := (rcs*nr1 - ds1)/(2.0*dr1) -convfloat(m)/2.0; > if (abs(rcs) > glob_small_float) then # if number 6 > if (rcs > 0.0) then # if number 7 > rad_c := sqrt(rcs) * glob_h; > else > rad_c := glob_large_float; > fi;# end if 7 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 6 > else > rad_c := glob_large_float; > ord_no := glob_large_float; > fi;# end if 5 > fi;# end if 4 > ; > array_complex_pole[2,1] := rad_c; > array_complex_pole[2,2] := ord_no; > fi;# end if 3 > ; > #BOTTOM RADII COMPLEX EQ = 2 > found := false; > #TOP WHICH RADII EQ = 1 > if not found and ((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float)) and ((array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0)) then # if number 3 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > found := true; > array_type_pole[1] := 2; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_real_pole[1,1] <> glob_large_float) and (array_real_pole[1,2] <> glob_large_float) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float) or (array_complex_pole[1,1] <= 0.0 ) or (array_complex_pole[1,2] <= 0.0))) then # if number 3 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and (((array_real_pole[1,1] = glob_large_float) or (array_real_pole[1,2] = glob_large_float)) and ((array_complex_pole[1,1] = glob_large_float) or (array_complex_pole[1,2] = glob_large_float))) then # if number 3 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > found := true; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_real_pole[1,1] < array_complex_pole[1,1]) and (array_real_pole[1,1] > 0.0) and (array_real_pole[1,2] > 0.0)) then # if number 3 > array_poles[1,1] := array_real_pole[1,1]; > array_poles[1,2] := array_real_pole[1,2]; > found := true; > array_type_pole[1] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_complex_pole[1,1] <> glob_large_float) and (array_complex_pole[1,2] <> glob_large_float) and (array_complex_pole[1,1] > 0.0) and (array_complex_pole[1,2] > 0.0)) then # if number 3 > array_poles[1,1] := array_complex_pole[1,1]; > array_poles[1,2] := array_complex_pole[1,2]; > array_type_pole[1] := 2; > found := true; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found then # if number 3 > array_poles[1,1] := glob_large_float; > array_poles[1,2] := glob_large_float; > array_type_pole[1] := 3; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > #BOTTOM WHICH RADII EQ = 1 > found := false; > #TOP WHICH RADII EQ = 2 > if not found and ((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float)) and ((array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0)) then # if number 3 > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > found := true; > array_type_pole[2] := 2; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_real_pole[2,1] <> glob_large_float) and (array_real_pole[2,2] <> glob_large_float) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float) or (array_complex_pole[2,1] <= 0.0 ) or (array_complex_pole[2,2] <= 0.0))) then # if number 3 > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > array_type_pole[2] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and (((array_real_pole[2,1] = glob_large_float) or (array_real_pole[2,2] = glob_large_float)) and ((array_complex_pole[2,1] = glob_large_float) or (array_complex_pole[2,2] = glob_large_float))) then # if number 3 > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > found := true; > array_type_pole[2] := 3; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_real_pole[2,1] < array_complex_pole[2,1]) and (array_real_pole[2,1] > 0.0) and (array_real_pole[2,2] > 0.0)) then # if number 3 > array_poles[2,1] := array_real_pole[2,1]; > array_poles[2,2] := array_real_pole[2,2]; > found := true; > array_type_pole[2] := 1; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Real estimate of pole used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found and ((array_complex_pole[2,1] <> glob_large_float) and (array_complex_pole[2,2] <> glob_large_float) and (array_complex_pole[2,1] > 0.0) and (array_complex_pole[2,2] > 0.0)) then # if number 3 > array_poles[2,1] := array_complex_pole[2,1]; > array_poles[2,2] := array_complex_pole[2,2]; > array_type_pole[2] := 2; > found := true; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"Complex estimate of poles used"); > fi;# end if 4 > ; > fi;# end if 3 > ; > if not found then # if number 3 > array_poles[2,1] := glob_large_float; > array_poles[2,2] := glob_large_float; > array_type_pole[2] := 3; > if (glob_display_flag) then # if number 4 > omniout_str(ALWAYS,"NO POLE"); > fi;# end if 4 > ; > fi;# end if 3 > ; > #BOTTOM WHICH RADII EQ = 2 > array_pole[1] := glob_large_float; > array_pole[2] := glob_large_float; > #TOP WHICH RADIUS EQ = 1 > if array_pole[1] > array_poles[1,1] then # if number 3 > array_pole[1] := array_poles[1,1]; > array_pole[2] := array_poles[1,2]; > fi;# end if 3 > ; > #BOTTOM WHICH RADIUS EQ = 1 > #TOP WHICH RADIUS EQ = 2 > if array_pole[1] > array_poles[2,1] then # if number 3 > array_pole[1] := array_poles[2,1]; > array_pole[2] := array_poles[2,2]; > fi;# end if 3 > ; > #BOTTOM WHICH RADIUS EQ = 2 > #BOTTOM CHECK FOR POLE > display_pole(); > # End Function number 6 > end; check_for_pole := proc() local cnt, dr1, dr2, ds1, ds2, hdrc, m, n, nr1, nr2, ord_no, rad_c, rcs, rm0, rm1, rm2, rm3, rm4, found; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; n := glob_max_terms; m := n - 2; while 10 <= m and (abs(array_x1_higher[1, m]) < glob_small_float or abs(array_x1_higher[1, m - 1]) < glob_small_float or abs(array_x1_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then rm0 := array_x1_higher[1, m]/array_x1_higher[1, m - 1]; rm1 := array_x1_higher[1, m - 1]/array_x1_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < abs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[1, 1] := rcs; array_real_pole[1, 2] := ord_no else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if else array_real_pole[1, 1] := glob_large_float; array_real_pole[1, 2] := glob_large_float end if; n := glob_max_terms; m := n - 3; while 10 <= m and (abs(array_x2_higher[1, m]) < glob_small_float or abs(array_x2_higher[1, m - 1]) < glob_small_float or abs(array_x2_higher[1, m - 2]) < glob_small_float) do m := m - 1 end do; if 10 < m then rm0 := array_x2_higher[1, m]/array_x2_higher[1, m - 1]; rm1 := array_x2_higher[1, m - 1]/array_x2_higher[1, m - 2]; hdrc := convfloat(m - 1)*rm0 - convfloat(m - 2)*rm1; if glob_small_float < abs(hdrc) then rcs := glob_h/hdrc; ord_no := convfloat(m - 1)*rm0/hdrc - convfloat(m) + 2.0; array_real_pole[2, 1] := rcs; array_real_pole[2, 2] := ord_no else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if else array_real_pole[2, 1] := glob_large_float; array_real_pole[2, 2] := glob_large_float end if; n := glob_max_terms - 2; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < abs(array_x1_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m <= 10 then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float elif glob_large_float <= abs(array_x1_higher[1, m]) or glob_large_float <= abs(array_x1_higher[1, m - 1]) or glob_large_float <= abs(array_x1_higher[1, m - 2]) or glob_large_float <= abs(array_x1_higher[1, m - 3]) or glob_large_float <= abs(array_x1_higher[1, m - 4]) or glob_large_float <= abs(array_x1_higher[1, m - 5]) then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else rm0 := array_x1_higher[1, m]/array_x1_higher[1, m - 1]; rm1 := array_x1_higher[1, m - 1]/array_x1_higher[1, m - 2]; rm2 := array_x1_higher[1, m - 2]/array_x1_higher[1, m - 3]; rm3 := array_x1_higher[1, m - 3]/array_x1_higher[1, m - 4]; rm4 := array_x1_higher[1, m - 4]/array_x1_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if abs(nr1*dr2 - nr2*dr1) <= glob_small_float or abs(dr1) <= glob_small_float then array_complex_pole[1, 1] := glob_large_float; array_complex_pole[1, 2] := glob_large_float else if glob_small_float < abs(nr1*dr2 - nr2*dr1) then rcs := (ds1*dr2 - ds2*dr1 + dr1*dr2)/(nr1*dr2 - nr2*dr1); ord_no := (rcs*nr1 - ds1)/(2.0*dr1) - convfloat(m)/2.0; if glob_small_float < abs(rcs) then if 0. < rcs then rad_c := sqrt(rcs)*glob_h else rad_c := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if end if; array_complex_pole[1, 1] := rad_c; array_complex_pole[1, 2] := ord_no end if; n := glob_max_terms - 3; cnt := 0; while cnt < 5 and 10 <= n do if glob_small_float < abs(array_x2_higher[1, n]) then cnt := cnt + 1 else cnt := 0 end if; n := n - 1 end do; m := n + cnt; if m <= 10 then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float elif glob_large_float <= abs(array_x2_higher[1, m]) or glob_large_float <= abs(array_x2_higher[1, m - 1]) or glob_large_float <= abs(array_x2_higher[1, m - 2]) or glob_large_float <= abs(array_x2_higher[1, m - 3]) or glob_large_float <= abs(array_x2_higher[1, m - 4]) or glob_large_float <= abs(array_x2_higher[1, m - 5]) then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float else rm0 := array_x2_higher[1, m]/array_x2_higher[1, m - 1]; rm1 := array_x2_higher[1, m - 1]/array_x2_higher[1, m - 2]; rm2 := array_x2_higher[1, m - 2]/array_x2_higher[1, m - 3]; rm3 := array_x2_higher[1, m - 3]/array_x2_higher[1, m - 4]; rm4 := array_x2_higher[1, m - 4]/array_x2_higher[1, m - 5]; nr1 := convfloat(m - 1)*rm0 - 2.0*convfloat(m - 2)*rm1 + convfloat(m - 3)*rm2; nr2 := convfloat(m - 2)*rm1 - 2.0*convfloat(m - 3)*rm2 + convfloat(m - 4)*rm3; dr1 := (-1)*(1.0)/rm1 + 2.0/rm2 - 1.0/rm3; dr2 := (-1)*(1.0)/rm2 + 2.0/rm3 - 1.0/rm4; ds1 := 3.0/rm1 - 8.0/rm2 + 5.0/rm3; ds2 := 3.0/rm2 - 8.0/rm3 + 5.0/rm4; if abs(nr1*dr2 - nr2*dr1) <= glob_small_float or abs(dr1) <= glob_small_float then array_complex_pole[2, 1] := glob_large_float; array_complex_pole[2, 2] := glob_large_float else if glob_small_float < abs(nr1*dr2 - nr2*dr1) then rcs := (ds1*dr2 - ds2*dr1 + dr1*dr2)/(nr1*dr2 - nr2*dr1); ord_no := (rcs*nr1 - ds1)/(2.0*dr1) - convfloat(m)/2.0; if glob_small_float < abs(rcs) then if 0. < rcs then rad_c := sqrt(rcs)*glob_h else rad_c := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if else rad_c := glob_large_float; ord_no := glob_large_float end if end if; array_complex_pole[2, 1] := rad_c; array_complex_pole[2, 2] := ord_no end if; found := false; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; found := true; array_type_pole[1] := 2; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[1, 1] <> glob_large_float and array_real_pole[1, 2] <> glob_large_float and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float or array_complex_pole[1, 1] <= 0. or array_complex_pole[1, 2] <= 0.) then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[1, 1] = glob_large_float or array_real_pole[1, 2] = glob_large_float) and ( array_complex_pole[1, 1] = glob_large_float or array_complex_pole[1, 2] = glob_large_float) then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; found := true; array_type_pole[1] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[1, 1] < array_complex_pole[1, 1] and 0. < array_real_pole[1, 1] and 0. < array_real_pole[1, 2] then array_poles[1, 1] := array_real_pole[1, 1]; array_poles[1, 2] := array_real_pole[1, 2]; found := true; array_type_pole[1] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[1, 1] <> glob_large_float and array_complex_pole[1, 2] <> glob_large_float and 0. < array_complex_pole[1, 1] and 0. < array_complex_pole[1, 2] then array_poles[1, 1] := array_complex_pole[1, 1]; array_poles[1, 2] := array_complex_pole[1, 2]; array_type_pole[1] := 2; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[1, 1] := glob_large_float; array_poles[1, 2] := glob_large_float; array_type_pole[1] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; found := false; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; found := true; array_type_pole[2] := 2; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found and array_real_pole[2, 1] <> glob_large_float and array_real_pole[2, 2] <> glob_large_float and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float or array_complex_pole[2, 1] <= 0. or array_complex_pole[2, 2] <= 0.) then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; array_type_pole[2] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and (array_real_pole[2, 1] = glob_large_float or array_real_pole[2, 2] = glob_large_float) and ( array_complex_pole[2, 1] = glob_large_float or array_complex_pole[2, 2] = glob_large_float) then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; found := true; array_type_pole[2] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; if not found and array_real_pole[2, 1] < array_complex_pole[2, 1] and 0. < array_real_pole[2, 1] and 0. < array_real_pole[2, 2] then array_poles[2, 1] := array_real_pole[2, 1]; array_poles[2, 2] := array_real_pole[2, 2]; found := true; array_type_pole[2] := 1; if glob_display_flag then omniout_str(ALWAYS, "Real estimate of pole used") end if end if; if not found and array_complex_pole[2, 1] <> glob_large_float and array_complex_pole[2, 2] <> glob_large_float and 0. < array_complex_pole[2, 1] and 0. < array_complex_pole[2, 2] then array_poles[2, 1] := array_complex_pole[2, 1]; array_poles[2, 2] := array_complex_pole[2, 2]; array_type_pole[2] := 2; found := true; if glob_display_flag then omniout_str(ALWAYS, "Complex estimate of poles used") end if end if; if not found then array_poles[2, 1] := glob_large_float; array_poles[2, 2] := glob_large_float; array_type_pole[2] := 3; if glob_display_flag then omniout_str(ALWAYS, "NO POLE") end if end if; array_pole[1] := glob_large_float; array_pole[2] := glob_large_float; if array_poles[1, 1] < array_pole[1] then array_pole[1] := array_poles[1, 1]; array_pole[2] := array_poles[1, 2] end if; if array_poles[2, 1] < array_pole[1] then array_pole[1] := array_poles[2, 1]; array_pole[2] := array_poles[2, 2] end if; display_pole() end proc > # Begin Function number 7 > get_norms := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local iii; > if (not glob_initial_pass) then # if number 3 > set_z(array_norms,glob_max_terms+1); > #TOP GET NORMS > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (abs(array_x1[iii]) > array_norms[iii]) then # if number 4 > array_norms[iii] := abs(array_x1[iii]); > fi;# end if 4 > ; > iii := iii + 1; > od;# end do number 2 > ; > iii := 1; > while (iii <= glob_max_terms) do # do number 2 > if (abs(array_x2[iii]) > array_norms[iii]) then # if number 4 > array_norms[iii] := abs(array_x2[iii]); > fi;# end if 4 > ; > iii := iii + 1; > od;# end do number 2 > #GET NORMS > ; > fi;# end if 3 > ; > # End Function number 7 > end; get_norms := proc() local iii; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; if not glob_initial_pass then set_z(array_norms, glob_max_terms + 1); iii := 1; while iii <= glob_max_terms do if array_norms[iii] < abs(array_x1[iii]) then array_norms[iii] := abs(array_x1[iii]) end if; iii := iii + 1 end do; iii := 1; while iii <= glob_max_terms do if array_norms[iii] < abs(array_x2[iii]) then array_norms[iii] := abs(array_x2[iii]) end if; iii := iii + 1 end do end if end proc > # Begin Function number 8 > atomall := proc() > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > > local kkk, order_d, adj2, temporary, term; > #TOP ATOMALL > #END OUTFILE1 > #BEGIN ATOMHDR1 > # emit pre mult $eq_no = 1 i = 1 > array_tmp1[1] := (array_const_4D0[1] * (array_x2[1])); > #emit pre add $eq_no = 1 i = 1 > array_tmp2[1] := array_const_0D0[1] + array_tmp1[1]; > #emit pre diff $eq_no = 1 i = 1 > array_tmp3[1] := array_x2_higher[2,1]; > # emit pre mult $eq_no = 1 i = 1 > array_tmp4[1] := (array_const_2D0[1] * (array_tmp3[1])); > #emit pre sub $eq_no = 1 i = 1 > array_tmp5[1] := (array_tmp2[1] - (array_tmp4[1])); > # emit pre mult $eq_no = 1 i = 1 > array_tmp6[1] := (array_const_2D0[1] * (array_x1[1])); > #emit pre sub $eq_no = 1 i = 1 > array_tmp7[1] := (array_tmp5[1] - (array_tmp6[1])); > #emit pre assign xxx $eq_no = 1 i = 1 $min_hdrs = 5 > if not array_x1_set_initial[1,2] then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp7[1] * (glob_h ^ (1)) * factorial_3(0,1); > array_x1[2] := temporary; > array_x1_higher[1,2] := temporary; > temporary := temporary / glob_h * (2.0); > array_x1_higher[2,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #emit pre diff $eq_no = 2 i = 1 > array_tmp9[1] := array_x2_higher[2,1]; > # emit pre mult $eq_no = 2 i = 1 > array_tmp10[1] := (array_const_3D0[1] * (array_tmp9[1])); > # emit pre mult $eq_no = 2 i = 1 > array_tmp11[1] := (array_const_2D0[1] * (array_x2[1])); > #emit pre sub $eq_no = 2 i = 1 > array_tmp12[1] := (array_tmp10[1] - (array_tmp11[1])); > #emit pre diff $eq_no = 2 i = 1 > array_tmp13[1] := array_x1_higher[3,1]; > #emit pre sub $eq_no = 2 i = 1 > array_tmp14[1] := (array_tmp12[1] - (array_tmp13[1])); > #emit pre diff $eq_no = 2 i = 1 > array_tmp15[1] := array_x1_higher[2,1]; > #emit pre sub $eq_no = 2 i = 1 > array_tmp16[1] := (array_tmp14[1] - (array_tmp15[1])); > #emit pre add $eq_no = 2 i = 1 > array_tmp17[1] := array_tmp16[1] + array_x1[1]; > #emit pre assign xxx $eq_no = 2 i = 1 $min_hdrs = 5 > if not array_x2_set_initial[2,3] then # if number 1 > if (1 <= glob_max_terms) then # if number 2 > temporary := array_tmp17[1] * (glob_h ^ (2)) * factorial_3(0,2); > array_x2[3] := temporary; > array_x2_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_x2_higher[2,2] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_x2_higher[3,1] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 2; > #END ATOMHDR1 > #BEGIN ATOMHDR2 > # emit pre mult $eq_no = 1 i = 2 > array_tmp1[2] := ats(2,array_const_4D0,array_x2,1); > #emit pre add $eq_no = 1 i = 2 > array_tmp2[2] := array_const_0D0[2] + array_tmp1[2]; > #emit pre diff $eq_no = 1 i = 2 > array_tmp3[2] := array_x2_higher[2,2]; > # emit pre mult $eq_no = 1 i = 2 > array_tmp4[2] := ats(2,array_const_2D0,array_tmp3,1); > #emit pre sub $eq_no = 1 i = 2 > array_tmp5[2] := (array_tmp2[2] - (array_tmp4[2])); > # emit pre mult $eq_no = 1 i = 2 > array_tmp6[2] := ats(2,array_const_2D0,array_x1,1); > #emit pre sub $eq_no = 1 i = 2 > array_tmp7[2] := (array_tmp5[2] - (array_tmp6[2])); > #emit pre assign xxx $eq_no = 1 i = 2 $min_hdrs = 5 > if not array_x1_set_initial[1,3] then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp7[2] * (glob_h ^ (1)) * factorial_3(1,2); > array_x1[3] := temporary; > array_x1_higher[1,3] := temporary; > temporary := temporary / glob_h * (2.0); > array_x1_higher[2,2] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 3; > #emit pre diff $eq_no = 2 i = 2 > array_tmp9[2] := array_x2_higher[2,2]; > # emit pre mult $eq_no = 2 i = 2 > array_tmp10[2] := ats(2,array_const_3D0,array_tmp9,1); > # emit pre mult $eq_no = 2 i = 2 > array_tmp11[2] := ats(2,array_const_2D0,array_x2,1); > #emit pre sub $eq_no = 2 i = 2 > array_tmp12[2] := (array_tmp10[2] - (array_tmp11[2])); > #emit pre diff $eq_no = 2 i = 2 > array_tmp13[2] := array_x1_higher[3,2]; > #emit pre sub $eq_no = 2 i = 2 > array_tmp14[2] := (array_tmp12[2] - (array_tmp13[2])); > #emit pre diff $eq_no = 2 i = 2 > array_tmp15[2] := array_x1_higher[2,2]; > #emit pre sub $eq_no = 2 i = 2 > array_tmp16[2] := (array_tmp14[2] - (array_tmp15[2])); > #emit pre add $eq_no = 2 i = 2 > array_tmp17[2] := array_tmp16[2] + array_x1[2]; > #emit pre assign xxx $eq_no = 2 i = 2 $min_hdrs = 5 > if not array_x2_set_initial[2,4] then # if number 1 > if (2 <= glob_max_terms) then # if number 2 > temporary := array_tmp17[2] * (glob_h ^ (2)) * factorial_3(1,3); > array_x2[4] := temporary; > array_x2_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_x2_higher[2,3] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_x2_higher[3,2] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 3; > #END ATOMHDR2 > #BEGIN ATOMHDR3 > # emit pre mult $eq_no = 1 i = 3 > array_tmp1[3] := ats(3,array_const_4D0,array_x2,1); > #emit pre add $eq_no = 1 i = 3 > array_tmp2[3] := array_const_0D0[3] + array_tmp1[3]; > #emit pre diff $eq_no = 1 i = 3 > array_tmp3[3] := array_x2_higher[2,3]; > # emit pre mult $eq_no = 1 i = 3 > array_tmp4[3] := ats(3,array_const_2D0,array_tmp3,1); > #emit pre sub $eq_no = 1 i = 3 > array_tmp5[3] := (array_tmp2[3] - (array_tmp4[3])); > # emit pre mult $eq_no = 1 i = 3 > array_tmp6[3] := ats(3,array_const_2D0,array_x1,1); > #emit pre sub $eq_no = 1 i = 3 > array_tmp7[3] := (array_tmp5[3] - (array_tmp6[3])); > #emit pre assign xxx $eq_no = 1 i = 3 $min_hdrs = 5 > if not array_x1_set_initial[1,4] then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp7[3] * (glob_h ^ (1)) * factorial_3(2,3); > array_x1[4] := temporary; > array_x1_higher[1,4] := temporary; > temporary := temporary / glob_h * (2.0); > array_x1_higher[2,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #emit pre diff $eq_no = 2 i = 3 > array_tmp9[3] := array_x2_higher[2,3]; > # emit pre mult $eq_no = 2 i = 3 > array_tmp10[3] := ats(3,array_const_3D0,array_tmp9,1); > # emit pre mult $eq_no = 2 i = 3 > array_tmp11[3] := ats(3,array_const_2D0,array_x2,1); > #emit pre sub $eq_no = 2 i = 3 > array_tmp12[3] := (array_tmp10[3] - (array_tmp11[3])); > #emit pre diff $eq_no = 2 i = 3 > array_tmp13[3] := array_x1_higher[3,3]; > #emit pre sub $eq_no = 2 i = 3 > array_tmp14[3] := (array_tmp12[3] - (array_tmp13[3])); > #emit pre diff $eq_no = 2 i = 3 > array_tmp15[3] := array_x1_higher[2,3]; > #emit pre sub $eq_no = 2 i = 3 > array_tmp16[3] := (array_tmp14[3] - (array_tmp15[3])); > #emit pre add $eq_no = 2 i = 3 > array_tmp17[3] := array_tmp16[3] + array_x1[3]; > #emit pre assign xxx $eq_no = 2 i = 3 $min_hdrs = 5 > if not array_x2_set_initial[2,5] then # if number 1 > if (3 <= glob_max_terms) then # if number 2 > temporary := array_tmp17[3] * (glob_h ^ (2)) * factorial_3(2,4); > array_x2[5] := temporary; > array_x2_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_x2_higher[2,4] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_x2_higher[3,3] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 4; > #END ATOMHDR3 > #BEGIN ATOMHDR4 > # emit pre mult $eq_no = 1 i = 4 > array_tmp1[4] := ats(4,array_const_4D0,array_x2,1); > #emit pre add $eq_no = 1 i = 4 > array_tmp2[4] := array_const_0D0[4] + array_tmp1[4]; > #emit pre diff $eq_no = 1 i = 4 > array_tmp3[4] := array_x2_higher[2,4]; > # emit pre mult $eq_no = 1 i = 4 > array_tmp4[4] := ats(4,array_const_2D0,array_tmp3,1); > #emit pre sub $eq_no = 1 i = 4 > array_tmp5[4] := (array_tmp2[4] - (array_tmp4[4])); > # emit pre mult $eq_no = 1 i = 4 > array_tmp6[4] := ats(4,array_const_2D0,array_x1,1); > #emit pre sub $eq_no = 1 i = 4 > array_tmp7[4] := (array_tmp5[4] - (array_tmp6[4])); > #emit pre assign xxx $eq_no = 1 i = 4 $min_hdrs = 5 > if not array_x1_set_initial[1,5] then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp7[4] * (glob_h ^ (1)) * factorial_3(3,4); > array_x1[5] := temporary; > array_x1_higher[1,5] := temporary; > temporary := temporary / glob_h * (2.0); > array_x1_higher[2,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #emit pre diff $eq_no = 2 i = 4 > array_tmp9[4] := array_x2_higher[2,4]; > # emit pre mult $eq_no = 2 i = 4 > array_tmp10[4] := ats(4,array_const_3D0,array_tmp9,1); > # emit pre mult $eq_no = 2 i = 4 > array_tmp11[4] := ats(4,array_const_2D0,array_x2,1); > #emit pre sub $eq_no = 2 i = 4 > array_tmp12[4] := (array_tmp10[4] - (array_tmp11[4])); > #emit pre diff $eq_no = 2 i = 4 > array_tmp13[4] := array_x1_higher[3,4]; > #emit pre sub $eq_no = 2 i = 4 > array_tmp14[4] := (array_tmp12[4] - (array_tmp13[4])); > #emit pre diff $eq_no = 2 i = 4 > array_tmp15[4] := array_x1_higher[2,4]; > #emit pre sub $eq_no = 2 i = 4 > array_tmp16[4] := (array_tmp14[4] - (array_tmp15[4])); > #emit pre add $eq_no = 2 i = 4 > array_tmp17[4] := array_tmp16[4] + array_x1[4]; > #emit pre assign xxx $eq_no = 2 i = 4 $min_hdrs = 5 > if not array_x2_set_initial[2,6] then # if number 1 > if (4 <= glob_max_terms) then # if number 2 > temporary := array_tmp17[4] * (glob_h ^ (2)) * factorial_3(3,5); > array_x2[6] := temporary; > array_x2_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_x2_higher[2,5] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_x2_higher[3,4] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 5; > #END ATOMHDR4 > #BEGIN ATOMHDR5 > # emit pre mult $eq_no = 1 i = 5 > array_tmp1[5] := ats(5,array_const_4D0,array_x2,1); > #emit pre add $eq_no = 1 i = 5 > array_tmp2[5] := array_const_0D0[5] + array_tmp1[5]; > #emit pre diff $eq_no = 1 i = 5 > array_tmp3[5] := array_x2_higher[2,5]; > # emit pre mult $eq_no = 1 i = 5 > array_tmp4[5] := ats(5,array_const_2D0,array_tmp3,1); > #emit pre sub $eq_no = 1 i = 5 > array_tmp5[5] := (array_tmp2[5] - (array_tmp4[5])); > # emit pre mult $eq_no = 1 i = 5 > array_tmp6[5] := ats(5,array_const_2D0,array_x1,1); > #emit pre sub $eq_no = 1 i = 5 > array_tmp7[5] := (array_tmp5[5] - (array_tmp6[5])); > #emit pre assign xxx $eq_no = 1 i = 5 $min_hdrs = 5 > if not array_x1_set_initial[1,6] then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp7[5] * (glob_h ^ (1)) * factorial_3(4,5); > array_x1[6] := temporary; > array_x1_higher[1,6] := temporary; > temporary := temporary / glob_h * (2.0); > array_x1_higher[2,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #emit pre diff $eq_no = 2 i = 5 > array_tmp9[5] := array_x2_higher[2,5]; > # emit pre mult $eq_no = 2 i = 5 > array_tmp10[5] := ats(5,array_const_3D0,array_tmp9,1); > # emit pre mult $eq_no = 2 i = 5 > array_tmp11[5] := ats(5,array_const_2D0,array_x2,1); > #emit pre sub $eq_no = 2 i = 5 > array_tmp12[5] := (array_tmp10[5] - (array_tmp11[5])); > #emit pre diff $eq_no = 2 i = 5 > array_tmp13[5] := array_x1_higher[3,5]; > #emit pre sub $eq_no = 2 i = 5 > array_tmp14[5] := (array_tmp12[5] - (array_tmp13[5])); > #emit pre diff $eq_no = 2 i = 5 > array_tmp15[5] := array_x1_higher[2,5]; > #emit pre sub $eq_no = 2 i = 5 > array_tmp16[5] := (array_tmp14[5] - (array_tmp15[5])); > #emit pre add $eq_no = 2 i = 5 > array_tmp17[5] := array_tmp16[5] + array_x1[5]; > #emit pre assign xxx $eq_no = 2 i = 5 $min_hdrs = 5 > if not array_x2_set_initial[2,7] then # if number 1 > if (5 <= glob_max_terms) then # if number 2 > temporary := array_tmp17[5] * (glob_h ^ (2)) * factorial_3(4,6); > array_x2[7] := temporary; > array_x2_higher[1,7] := temporary; > temporary := temporary / glob_h * (2.0); > array_x2_higher[2,6] := temporary > ; > temporary := temporary / glob_h * (3.0); > array_x2_higher[3,5] := temporary > ; > fi;# end if 2 > ; > fi;# end if 1 > ; > kkk := 6; > #END ATOMHDR5 > #BEGIN OUTFILE3 > #Top Atomall While Loop-- outfile3 > while (kkk <= glob_max_terms) do # do number 1 > #END OUTFILE3 > #BEGIN OUTFILE4 > #emit mult $eq_no = 1 > array_tmp1[kkk] := ats(kkk,array_const_4D0,array_x2,1); > #emit add $eq_no = 1 > array_tmp2[kkk] := array_const_0D0[kkk] + array_tmp1[kkk]; > #emit diff $eq_no = 1 > array_tmp3[kkk] := array_x2_higher[2,kkk]; > #emit mult $eq_no = 1 > array_tmp4[kkk] := ats(kkk,array_const_2D0,array_tmp3,1); > #emit sub $eq_no = 1 > array_tmp5[kkk] := (array_tmp2[kkk] - (array_tmp4[kkk])); > #emit mult $eq_no = 1 > array_tmp6[kkk] := ats(kkk,array_const_2D0,array_x1,1); > #emit sub $eq_no = 1 > array_tmp7[kkk] := (array_tmp5[kkk] - (array_tmp6[kkk])); > #emit assign $eq_no = 1 > order_d := 1; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if not array_x1_set_initial[1,kkk + order_d] then # if number 2 > temporary := array_tmp7[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_x1[kkk + order_d] := temporary; > array_x1_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_x1_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od;# end do number 2 > fi;# end if 2 > fi;# end if 1 > ; > #emit diff $eq_no = 2 > array_tmp9[kkk] := array_x2_higher[2,kkk]; > #emit mult $eq_no = 2 > array_tmp10[kkk] := ats(kkk,array_const_3D0,array_tmp9,1); > #emit mult $eq_no = 2 > array_tmp11[kkk] := ats(kkk,array_const_2D0,array_x2,1); > #emit sub $eq_no = 2 > array_tmp12[kkk] := (array_tmp10[kkk] - (array_tmp11[kkk])); > #emit diff $eq_no = 2 > array_tmp13[kkk] := array_x1_higher[3,kkk]; > #emit sub $eq_no = 2 > array_tmp14[kkk] := (array_tmp12[kkk] - (array_tmp13[kkk])); > #emit diff $eq_no = 2 > array_tmp15[kkk] := array_x1_higher[2,kkk]; > #emit sub $eq_no = 2 > array_tmp16[kkk] := (array_tmp14[kkk] - (array_tmp15[kkk])); > #emit add $eq_no = 2 > array_tmp17[kkk] := array_tmp16[kkk] + array_x1[kkk]; > #emit assign $eq_no = 2 > order_d := 2; > if (kkk + order_d + 1 <= glob_max_terms) then # if number 1 > if not array_x2_set_initial[2,kkk + order_d] then # if number 2 > temporary := array_tmp17[kkk] * (glob_h ^ (order_d)) / factorial_3((kkk - 1),(kkk + order_d - 1)); > array_x2[kkk + order_d] := temporary; > array_x2_higher[1,kkk + order_d] := temporary; > term := kkk + order_d - 1; > adj2 := 2; > while (adj2 <= order_d + 1) and (term >= 1) do # do number 2 > temporary := temporary / glob_h * convfp(adj2); > array_x2_higher[adj2,term] := temporary; > adj2 := adj2 + 1; > term := term - 1; > od;# end do number 2 > fi;# end if 2 > fi;# end if 1 > ; > kkk := kkk + 1; > od;# end do number 1 > ; > #BOTTOM ATOMALL > #END OUTFILE4 > #BEGIN OUTFILE5 > # End Function number 8 > end; atomall := proc() local kkk, order_d, adj2, temporary, term; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; array_tmp1[1] := array_const_4D0[1]*array_x2[1]; array_tmp2[1] := array_const_0D0[1] + array_tmp1[1]; array_tmp3[1] := array_x2_higher[2, 1]; array_tmp4[1] := array_const_2D0[1]*array_tmp3[1]; array_tmp5[1] := array_tmp2[1] - array_tmp4[1]; array_tmp6[1] := array_const_2D0[1]*array_x1[1]; array_tmp7[1] := array_tmp5[1] - array_tmp6[1]; if not array_x1_set_initial[1, 2] then if 1 <= glob_max_terms then temporary := array_tmp7[1]*glob_h*factorial_3(0, 1); array_x1[2] := temporary; array_x1_higher[1, 2] := temporary; temporary := temporary*2.0/glob_h; array_x1_higher[2, 1] := temporary end if end if; kkk := 2; array_tmp9[1] := array_x2_higher[2, 1]; array_tmp10[1] := array_const_3D0[1]*array_tmp9[1]; array_tmp11[1] := array_const_2D0[1]*array_x2[1]; array_tmp12[1] := array_tmp10[1] - array_tmp11[1]; array_tmp13[1] := array_x1_higher[3, 1]; array_tmp14[1] := array_tmp12[1] - array_tmp13[1]; array_tmp15[1] := array_x1_higher[2, 1]; array_tmp16[1] := array_tmp14[1] - array_tmp15[1]; array_tmp17[1] := array_tmp16[1] + array_x1[1]; if not array_x2_set_initial[2, 3] then if 1 <= glob_max_terms then temporary := array_tmp17[1]*glob_h^2*factorial_3(0, 2); array_x2[3] := temporary; array_x2_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_x2_higher[2, 2] := temporary; temporary := temporary*3.0/glob_h; array_x2_higher[3, 1] := temporary end if end if; kkk := 2; array_tmp1[2] := ats(2, array_const_4D0, array_x2, 1); array_tmp2[2] := array_const_0D0[2] + array_tmp1[2]; array_tmp3[2] := array_x2_higher[2, 2]; array_tmp4[2] := ats(2, array_const_2D0, array_tmp3, 1); array_tmp5[2] := array_tmp2[2] - array_tmp4[2]; array_tmp6[2] := ats(2, array_const_2D0, array_x1, 1); array_tmp7[2] := array_tmp5[2] - array_tmp6[2]; if not array_x1_set_initial[1, 3] then if 2 <= glob_max_terms then temporary := array_tmp7[2]*glob_h*factorial_3(1, 2); array_x1[3] := temporary; array_x1_higher[1, 3] := temporary; temporary := temporary*2.0/glob_h; array_x1_higher[2, 2] := temporary end if end if; kkk := 3; array_tmp9[2] := array_x2_higher[2, 2]; array_tmp10[2] := ats(2, array_const_3D0, array_tmp9, 1); array_tmp11[2] := ats(2, array_const_2D0, array_x2, 1); array_tmp12[2] := array_tmp10[2] - array_tmp11[2]; array_tmp13[2] := array_x1_higher[3, 2]; array_tmp14[2] := array_tmp12[2] - array_tmp13[2]; array_tmp15[2] := array_x1_higher[2, 2]; array_tmp16[2] := array_tmp14[2] - array_tmp15[2]; array_tmp17[2] := array_tmp16[2] + array_x1[2]; if not array_x2_set_initial[2, 4] then if 2 <= glob_max_terms then temporary := array_tmp17[2]*glob_h^2*factorial_3(1, 3); array_x2[4] := temporary; array_x2_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_x2_higher[2, 3] := temporary; temporary := temporary*3.0/glob_h; array_x2_higher[3, 2] := temporary end if end if; kkk := 3; array_tmp1[3] := ats(3, array_const_4D0, array_x2, 1); array_tmp2[3] := array_const_0D0[3] + array_tmp1[3]; array_tmp3[3] := array_x2_higher[2, 3]; array_tmp4[3] := ats(3, array_const_2D0, array_tmp3, 1); array_tmp5[3] := array_tmp2[3] - array_tmp4[3]; array_tmp6[3] := ats(3, array_const_2D0, array_x1, 1); array_tmp7[3] := array_tmp5[3] - array_tmp6[3]; if not array_x1_set_initial[1, 4] then if 3 <= glob_max_terms then temporary := array_tmp7[3]*glob_h*factorial_3(2, 3); array_x1[4] := temporary; array_x1_higher[1, 4] := temporary; temporary := temporary*2.0/glob_h; array_x1_higher[2, 3] := temporary end if end if; kkk := 4; array_tmp9[3] := array_x2_higher[2, 3]; array_tmp10[3] := ats(3, array_const_3D0, array_tmp9, 1); array_tmp11[3] := ats(3, array_const_2D0, array_x2, 1); array_tmp12[3] := array_tmp10[3] - array_tmp11[3]; array_tmp13[3] := array_x1_higher[3, 3]; array_tmp14[3] := array_tmp12[3] - array_tmp13[3]; array_tmp15[3] := array_x1_higher[2, 3]; array_tmp16[3] := array_tmp14[3] - array_tmp15[3]; array_tmp17[3] := array_tmp16[3] + array_x1[3]; if not array_x2_set_initial[2, 5] then if 3 <= glob_max_terms then temporary := array_tmp17[3]*glob_h^2*factorial_3(2, 4); array_x2[5] := temporary; array_x2_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_x2_higher[2, 4] := temporary; temporary := temporary*3.0/glob_h; array_x2_higher[3, 3] := temporary end if end if; kkk := 4; array_tmp1[4] := ats(4, array_const_4D0, array_x2, 1); array_tmp2[4] := array_const_0D0[4] + array_tmp1[4]; array_tmp3[4] := array_x2_higher[2, 4]; array_tmp4[4] := ats(4, array_const_2D0, array_tmp3, 1); array_tmp5[4] := array_tmp2[4] - array_tmp4[4]; array_tmp6[4] := ats(4, array_const_2D0, array_x1, 1); array_tmp7[4] := array_tmp5[4] - array_tmp6[4]; if not array_x1_set_initial[1, 5] then if 4 <= glob_max_terms then temporary := array_tmp7[4]*glob_h*factorial_3(3, 4); array_x1[5] := temporary; array_x1_higher[1, 5] := temporary; temporary := temporary*2.0/glob_h; array_x1_higher[2, 4] := temporary end if end if; kkk := 5; array_tmp9[4] := array_x2_higher[2, 4]; array_tmp10[4] := ats(4, array_const_3D0, array_tmp9, 1); array_tmp11[4] := ats(4, array_const_2D0, array_x2, 1); array_tmp12[4] := array_tmp10[4] - array_tmp11[4]; array_tmp13[4] := array_x1_higher[3, 4]; array_tmp14[4] := array_tmp12[4] - array_tmp13[4]; array_tmp15[4] := array_x1_higher[2, 4]; array_tmp16[4] := array_tmp14[4] - array_tmp15[4]; array_tmp17[4] := array_tmp16[4] + array_x1[4]; if not array_x2_set_initial[2, 6] then if 4 <= glob_max_terms then temporary := array_tmp17[4]*glob_h^2*factorial_3(3, 5); array_x2[6] := temporary; array_x2_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_x2_higher[2, 5] := temporary; temporary := temporary*3.0/glob_h; array_x2_higher[3, 4] := temporary end if end if; kkk := 5; array_tmp1[5] := ats(5, array_const_4D0, array_x2, 1); array_tmp2[5] := array_const_0D0[5] + array_tmp1[5]; array_tmp3[5] := array_x2_higher[2, 5]; array_tmp4[5] := ats(5, array_const_2D0, array_tmp3, 1); array_tmp5[5] := array_tmp2[5] - array_tmp4[5]; array_tmp6[5] := ats(5, array_const_2D0, array_x1, 1); array_tmp7[5] := array_tmp5[5] - array_tmp6[5]; if not array_x1_set_initial[1, 6] then if 5 <= glob_max_terms then temporary := array_tmp7[5]*glob_h*factorial_3(4, 5); array_x1[6] := temporary; array_x1_higher[1, 6] := temporary; temporary := temporary*2.0/glob_h; array_x1_higher[2, 5] := temporary end if end if; kkk := 6; array_tmp9[5] := array_x2_higher[2, 5]; array_tmp10[5] := ats(5, array_const_3D0, array_tmp9, 1); array_tmp11[5] := ats(5, array_const_2D0, array_x2, 1); array_tmp12[5] := array_tmp10[5] - array_tmp11[5]; array_tmp13[5] := array_x1_higher[3, 5]; array_tmp14[5] := array_tmp12[5] - array_tmp13[5]; array_tmp15[5] := array_x1_higher[2, 5]; array_tmp16[5] := array_tmp14[5] - array_tmp15[5]; array_tmp17[5] := array_tmp16[5] + array_x1[5]; if not array_x2_set_initial[2, 7] then if 5 <= glob_max_terms then temporary := array_tmp17[5]*glob_h^2*factorial_3(4, 6); array_x2[7] := temporary; array_x2_higher[1, 7] := temporary; temporary := temporary*2.0/glob_h; array_x2_higher[2, 6] := temporary; temporary := temporary*3.0/glob_h; array_x2_higher[3, 5] := temporary end if end if; kkk := 6; while kkk <= glob_max_terms do array_tmp1[kkk] := ats(kkk, array_const_4D0, array_x2, 1); array_tmp2[kkk] := array_const_0D0[kkk] + array_tmp1[kkk]; array_tmp3[kkk] := array_x2_higher[2, kkk]; array_tmp4[kkk] := ats(kkk, array_const_2D0, array_tmp3, 1); array_tmp5[kkk] := array_tmp2[kkk] - array_tmp4[kkk]; array_tmp6[kkk] := ats(kkk, array_const_2D0, array_x1, 1); array_tmp7[kkk] := array_tmp5[kkk] - array_tmp6[kkk]; order_d := 1; if kkk + order_d + 1 <= glob_max_terms then if not array_x1_set_initial[1, kkk + order_d] then temporary := array_tmp7[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_x1[kkk + order_d] := temporary; array_x1_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_x1_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if end if; array_tmp9[kkk] := array_x2_higher[2, kkk]; array_tmp10[kkk] := ats(kkk, array_const_3D0, array_tmp9, 1); array_tmp11[kkk] := ats(kkk, array_const_2D0, array_x2, 1); array_tmp12[kkk] := array_tmp10[kkk] - array_tmp11[kkk]; array_tmp13[kkk] := array_x1_higher[3, kkk]; array_tmp14[kkk] := array_tmp12[kkk] - array_tmp13[kkk]; array_tmp15[kkk] := array_x1_higher[2, kkk]; array_tmp16[kkk] := array_tmp14[kkk] - array_tmp15[kkk]; array_tmp17[kkk] := array_tmp16[kkk] + array_x1[kkk]; order_d := 2; if kkk + order_d + 1 <= glob_max_terms then if not array_x2_set_initial[2, kkk + order_d] then temporary := array_tmp17[kkk]*glob_h^order_d/ factorial_3(kkk - 1, kkk + order_d - 1); array_x2[kkk + order_d] := temporary; array_x2_higher[1, kkk + order_d] := temporary; term := kkk + order_d - 1; adj2 := 2; while adj2 <= order_d + 1 and 1 <= term do temporary := temporary*convfp(adj2)/glob_h; array_x2_higher[adj2, term] := temporary; adj2 := adj2 + 1; term := term - 1 end do end if end if; kkk := kkk + 1 end do end proc > #BEGIN ATS LIBRARY BLOCK > omniout_str := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s\n",str); > fi; > # End Function number 1 > end; omniout_str := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s\n", str) end if end proc > omniout_str_noeol := proc(iolevel,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > printf("%s",str); > fi; > # End Function number 1 > end; omniout_str_noeol := proc(iolevel, str) global glob_iolevel; if iolevel <= glob_iolevel then printf("%s", str) end if end proc > omniout_labstr := proc(iolevel,label,str) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(label,str); > fi; > # End Function number 1 > end; omniout_labstr := proc(iolevel, label, str) global glob_iolevel; if iolevel <= glob_iolevel then print(label, str) end if end proc > omniout_float := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 4 then > printf("%-30s = %-42.4g %s \n",prelabel,value, postlabel); > else > printf("%-30s = %-42.32g %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > end; omniout_float := proc(iolevel, prelabel, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then if vallen = 4 then printf("%-30s = %-42.4g %s \n", prelabel, value, postlabel) else printf("%-30s = %-42.32g %s \n", prelabel, value, postlabel) end if end if end proc > omniout_int := proc(iolevel,prelabel,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > if vallen = 5 then > printf("%-30s = %-32d %s\n",prelabel,value, postlabel); > else > printf("%-30s = %-32d %s \n",prelabel,value, postlabel); > fi; > fi; > # End Function number 1 > end; omniout_int := proc(iolevel, prelabel, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then if vallen = 5 then printf("%-30s = %-32d %s\n", prelabel, value, postlabel) else printf("%-30s = %-32d %s \n", prelabel, value, postlabel) end if end if end proc > omniout_float_arr := proc(iolevel,prelabel,elemnt,prelen,value,vallen,postlabel) > global glob_iolevel; > if (glob_iolevel >= iolevel) then > print(prelabel,"[",elemnt,"]",value, postlabel); > fi; > # End Function number 1 > end; omniout_float_arr := proc( iolevel, prelabel, elemnt, prelen, value, vallen, postlabel) global glob_iolevel; if iolevel <= glob_iolevel then print(prelabel, "[", elemnt, "]", value, postlabel) end if end proc > dump_series := proc(iolevel,dump_label,series_name, > array_series,numb) > global glob_iolevel; > local i; > if (glob_iolevel >= iolevel) then > i := 1; > while (i <= numb) do > print(dump_label,series_name > ,i,array_series[i]); > i := i + 1; > od; > fi; > # End Function number 1 > end; dump_series := proc(iolevel, dump_label, series_name, array_series, numb) local i; global glob_iolevel; if iolevel <= glob_iolevel then i := 1; while i <= numb do print(dump_label, series_name, i, array_series[i]); i := i + 1 end do end if end proc > dump_series_2 := proc(iolevel,dump_label,series_name2, > array_series2,numb,subnum,array_x) > global glob_iolevel; > local i,sub,ts_term; > if (glob_iolevel >= iolevel) then > sub := 1; > while (sub <= subnum) do > i := 1; > while (i <= numb) do > print(dump_label,series_name2,sub,i,array_series2[sub,i]); > od; > sub := sub + 1; > od; > fi; > # End Function number 1 > end; dump_series_2 := proc( iolevel, dump_label, series_name2, array_series2, numb, subnum, array_x) local i, sub, ts_term; global glob_iolevel; if iolevel <= glob_iolevel then sub := 1; while sub <= subnum do i := 1; while i <= numb do print(dump_label, series_name2, sub, i, array_series2[sub, i]) end do; sub := sub + 1 end do end if end proc > cs_info := proc(iolevel,str) > global glob_iolevel,glob_correct_start_flag,glob_h,glob_reached_optimal_h; > if (glob_iolevel >= iolevel) then > print("cs_info " , str , " glob_correct_start_flag = " , glob_correct_start_flag , "glob_h := " , glob_h , "glob_reached_optimal_h := " , glob_reached_optimal_h) > fi; > # End Function number 1 > end; cs_info := proc(iolevel, str) global glob_iolevel, glob_correct_start_flag, glob_h, glob_reached_optimal_h; if iolevel <= glob_iolevel then print("cs_info ", str, " glob_correct_start_flag = ", glob_correct_start_flag, "glob_h := ", glob_h, "glob_reached_optimal_h := ", glob_reached_optimal_h) end if end proc > # Begin Function number 2 > logitem_time := proc(fd,secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := (secs_in); > if (secs > 0.0) then # if number 1 > sec_in_millinium := convfloat(sec_in_min * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_min; > sec_int := floor(seconds); > fprintf(fd,""); > if (millinium_int > 0) then # if number 2 > fprintf(fd,"%d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 3 > fprintf(fd,"%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 4 > fprintf(fd,"%d Years %d Days %d Hours %d Minutes %d Seconds",years_int,days_int,hours_int,minutes_int,sec_int); > elif (days_int > 0) then # if number 5 > fprintf(fd,"%d Days %d Hours %d Minutes %d Seconds",days_int,hours_int,minutes_int,sec_int); > elif (hours_int > 0) then # if number 6 > fprintf(fd,"%d Hours %d Minutes %d Seconds",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 7 > fprintf(fd,"%d Minutes %d Seconds",minutes_int,sec_int); > else > fprintf(fd,"%d Seconds",sec_int); > fi;# end if 7 > else > fprintf(fd,"Unknown"); > fi;# end if 6 > fprintf(fd,""); > # End Function number 2 > end; logitem_time := proc(fd, secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; secs := secs_in; if 0. < secs then sec_in_millinium := convfloat(sec_in_min*min_in_hour*hours_in_day* days_in_year*years_in_century*centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_min; sec_int := floor(seconds); fprintf(fd, ""); if 0 < millinium_int then fprintf(fd, "%d Millinia %d Centuries %\ d Years %d Days %d Hours %d Minutes %d Seconds", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then fprintf(fd, "%d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < years_int then fprintf(fd, "%d Years %d Days %d Hours %d Minutes %d Seconds", years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < days_int then fprintf(fd, "%d Days %d Hours %d Minutes %d Seconds", days_int, hours_int, minutes_int, sec_int) elif 0 < hours_int then fprintf(fd, "%d Hours %d Minutes %d Seconds", hours_int, minutes_int, sec_int) elif 0 < minutes_int then fprintf(fd, "%d Minutes %d Seconds", minutes_int, sec_int) else fprintf(fd, "%d Seconds", sec_int) end if else fprintf(fd, "Unknown") end if; fprintf(fd, "") end proc > omniout_timestr := proc (secs_in) > global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; > local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; > secs := convfloat(secs_in); > if (secs > 0.0) then # if number 6 > sec_in_millinium := convfloat(sec_in_min * min_in_hour * hours_in_day * days_in_year * years_in_century * centuries_in_millinium); > milliniums := convfloat(secs / sec_in_millinium); > millinium_int := floor(milliniums); > centuries := (milliniums - millinium_int)*centuries_in_millinium; > cent_int := floor(centuries); > years := (centuries - cent_int) * years_in_century; > years_int := floor(years); > days := (years - years_int) * days_in_year; > days_int := floor(days); > hours := (days - days_int) * hours_in_day; > hours_int := floor(hours); > minutes := (hours - hours_int) * min_in_hour; > minutes_int := floor(minutes); > seconds := (minutes - minutes_int) * sec_in_min; > sec_int := floor(seconds); > > if (millinium_int > 0) then # if number 7 > printf(" = %d Millinia %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",millinium_int,cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (cent_int > 0) then # if number 8 > printf(" = %d Centuries %d Years %d Days %d Hours %d Minutes %d Seconds\n",cent_int,years_int,days_int,hours_int,minutes_int,sec_int); > elif (years_int > 0) then # if number 9 > printf(" = %d Years %d Days %d Hours %d Minutes %d Seconds\n",years_int,days_int,hours_int,minutes_int,sec_int); > elif (days_int > 0) then # if number 10 > printf(" = %d Days %d Hours %d Minutes %d Seconds\n",days_int,hours_int,minutes_int,sec_int); > elif (hours_int > 0) then # if number 11 > printf(" = %d Hours %d Minutes %d Seconds\n",hours_int,minutes_int,sec_int); > elif (minutes_int > 0) then # if number 12 > printf(" = %d Minutes %d Seconds\n",minutes_int,sec_int); > else > printf(" = %d Seconds\n",sec_int); > fi;# end if 12 > else > printf(" Unknown\n"); > fi;# end if 11 > # End Function number 2 > end; omniout_timestr := proc(secs_in) local cent_int, centuries, days, days_int, hours, hours_int, millinium_int, milliniums, minutes, minutes_int, sec_in_millinium, sec_int, seconds, secs, years, years_int; global centuries_in_millinium, days_in_year, hours_in_day, min_in_hour, sec_in_min, years_in_century; secs := convfloat(secs_in); if 0. < secs then sec_in_millinium := convfloat(sec_in_min*min_in_hour*hours_in_day* days_in_year*years_in_century*centuries_in_millinium); milliniums := convfloat(secs/sec_in_millinium); millinium_int := floor(milliniums); centuries := (milliniums - millinium_int)*centuries_in_millinium; cent_int := floor(centuries); years := (centuries - cent_int)*years_in_century; years_int := floor(years); days := (years - years_int)*days_in_year; days_int := floor(days); hours := (days - days_int)*hours_in_day; hours_int := floor(hours); minutes := (hours - hours_int)*min_in_hour; minutes_int := floor(minutes); seconds := (minutes - minutes_int)*sec_in_min; sec_int := floor(seconds); if 0 < millinium_int then printf(" = %d Millinia %d Centuries %d\ Years %d Days %d Hours %d Minutes %d Seconds\n", millinium_int, cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < cent_int then printf(" = %d Centuries %d Years %d Days \ %d Hours %d Minutes %d Seconds\n", cent_int, years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < years_int then printf( " = %d Years %d Days %d Hours %d Minutes %d Seconds\n", years_int, days_int, hours_int, minutes_int, sec_int) elif 0 < days_int then printf( " = %d Days %d Hours %d Minutes %d Seconds\n", days_int, hours_int, minutes_int, sec_int) elif 0 < hours_int then printf( " = %d Hours %d Minutes %d Seconds\n", hours_int, minutes_int, sec_int) elif 0 < minutes_int then printf(" = %d Minutes %d Seconds\n", minutes_int, sec_int) else printf(" = %d Seconds\n", sec_int) end if else printf(" Unknown\n") end if end proc > > # Begin Function number 3 > ats := proc( > mmm_ats,array_a,array_b,jjj_ats) > local iii_ats, lll_ats,ma_ats, ret_ats; > ret_ats := 0.0; > if (jjj_ats <= mmm_ats) then # if number 11 > ma_ats := mmm_ats + 1; > iii_ats := jjj_ats; > while (iii_ats <= mmm_ats) do # do number 1 > lll_ats := ma_ats - iii_ats; > ret_ats := ret_ats + array_a[iii_ats]*array_b[lll_ats]; > iii_ats := iii_ats + 1; > od;# end do number 1 > fi;# end if 11 > ; > ret_ats > # End Function number 3 > end; ats := proc(mmm_ats, array_a, array_b, jjj_ats) local iii_ats, lll_ats, ma_ats, ret_ats; ret_ats := 0.; if jjj_ats <= mmm_ats then ma_ats := mmm_ats + 1; iii_ats := jjj_ats; while iii_ats <= mmm_ats do lll_ats := ma_ats - iii_ats; ret_ats := ret_ats + array_a[iii_ats]*array_b[lll_ats]; iii_ats := iii_ats + 1 end do end if; ret_ats end proc > > # Begin Function number 4 > att := proc( > mmm_att,array_aa,array_bb,jjj_att) > global glob_max_terms; > local al_att, iii_att,lll_att, ma_att, ret_att; > ret_att := 0.0; > if (jjj_att <= mmm_att) then # if number 11 > ma_att := mmm_att + 2; > iii_att := jjj_att; > while (iii_att <= mmm_att) do # do number 1 > lll_att := ma_att - iii_att; > al_att := (lll_att - 1); > if (lll_att <= glob_max_terms) then # if number 12 > ret_att := ret_att + array_aa[iii_att]*array_bb[lll_att]* convfp(al_att); > fi;# end if 12 > ; > iii_att := iii_att + 1; > od;# end do number 1 > ; > ret_att := ret_att / convfp(mmm_att) ; > fi;# end if 11 > ; > ret_att; > # End Function number 4 > end; att := proc(mmm_att, array_aa, array_bb, jjj_att) local al_att, iii_att, lll_att, ma_att, ret_att; global glob_max_terms; ret_att := 0.; if jjj_att <= mmm_att then ma_att := mmm_att + 2; iii_att := jjj_att; while iii_att <= mmm_att do lll_att := ma_att - iii_att; al_att := lll_att - 1; if lll_att <= glob_max_terms then ret_att := ret_att + array_aa[iii_att]*array_bb[lll_att]*convfp(al_att) end if; iii_att := iii_att + 1 end do; ret_att := ret_att/convfp(mmm_att) end if; ret_att end proc > # Begin Function number 5 > display_pole := proc() > global ALWAYS,glob_display_flag, glob_large_float, array_pole; > if ((array_pole[1] <> glob_large_float) and (array_pole[1] > 0.0) and (array_pole[2] <> glob_large_float) and (array_pole[2]> 0.0) and glob_display_flag) then # if number 11 > omniout_float(ALWAYS,"Radius of convergence ",4, array_pole[1],4," "); > omniout_float(ALWAYS,"Order of pole ",4, array_pole[2],4," "); > fi;# end if 11 > # End Function number 5 > end; display_pole := proc() global ALWAYS, glob_display_flag, glob_large_float, array_pole; if array_pole[1] <> glob_large_float and 0. < array_pole[1] and array_pole[2] <> glob_large_float and 0. < array_pole[2] and glob_display_flag then omniout_float(ALWAYS, "Radius of convergence ", 4, array_pole[1], 4, " "); omniout_float(ALWAYS, "Order of pole ", 4, array_pole[2], 4, " ") end if end proc > # Begin Function number 6 > logditto := proc(file) > fprintf(file,""); > fprintf(file,"ditto"); > fprintf(file,""); > # End Function number 6 > end; logditto := proc(file) fprintf(file, ""); fprintf(file, "ditto"); fprintf(file, "") end proc > # Begin Function number 7 > logitem_integer := proc(file,n) > fprintf(file,""); > fprintf(file,"%d",n); > fprintf(file,""); > # End Function number 7 > end; logitem_integer := proc(file, n) fprintf(file, ""); fprintf(file, "%d", n); fprintf(file, "") end proc > # Begin Function number 8 > logitem_str := proc(file,str) > fprintf(file,""); > fprintf(file,str); > fprintf(file,""); > # End Function number 8 > end; logitem_str := proc(file, str) fprintf(file, ""); fprintf(file, str); fprintf(file, "") end proc > # Begin Function number 9 > log_revs := proc(file,revs) > fprintf(file,revs); > # End Function number 9 > end; log_revs := proc(file, revs) fprintf(file, revs) end proc > # Begin Function number 10 > logitem_float := proc(file,x) > fprintf(file,""); > fprintf(file,"%g",x); > fprintf(file,""); > # End Function number 10 > end; logitem_float := proc(file, x) fprintf(file, ""); fprintf(file, "%g", x); fprintf(file, "") end proc > # Begin Function number 11 > logitem_pole := proc(file,pole) > fprintf(file,""); > if pole = 0 then # if number 11 > fprintf(file,"NA"); > elif pole = 1 then # if number 12 > fprintf(file,"Real"); > elif pole = 2 then # if number 13 > fprintf(file,"Complex"); > else > fprintf(file,"No Pole"); > fi;# end if 13 > fprintf(file,""); > # End Function number 11 > end; logitem_pole := proc(file, pole) fprintf(file, ""); if pole = 0 then fprintf(file, "NA") elif pole = 1 then fprintf(file, "Real") elif pole = 2 then fprintf(file, "Complex") else fprintf(file, "No Pole") end if; fprintf(file, "") end proc > # Begin Function number 12 > logstart := proc(file) > fprintf(file,""); > # End Function number 12 > end; logstart := proc(file) fprintf(file, "") end proc > # Begin Function number 13 > logend := proc(file) > fprintf(file,"\n"); > # End Function number 13 > end; logend := proc(file) fprintf(file, "\n") end proc > # Begin Function number 14 > chk_data := proc() > global glob_max_iter,ALWAYS, glob_max_terms; > local errflag; > errflag := false; > > if ((glob_max_terms < 15) or (glob_max_terms > 512)) then # if number 13 > omniout_str(ALWAYS,"Illegal max_terms = -- Using 30"); > glob_max_terms := 30; > fi;# end if 13 > ; > if (glob_max_iter < 2) then # if number 13 > omniout_str(ALWAYS,"Illegal max_iter"); > errflag := true; > fi;# end if 13 > ; > if (errflag) then # if number 13 > > quit; > fi;# end if 13 > # End Function number 14 > end; chk_data := proc() local errflag; global glob_max_iter, ALWAYS, glob_max_terms; errflag := false; if glob_max_terms < 15 or 512 < glob_max_terms then omniout_str(ALWAYS, "Illegal max_terms = -- Using 30"); glob_max_terms := 30 end if; if glob_max_iter < 2 then omniout_str(ALWAYS, "Illegal max_iter"); errflag := true end if; if errflag then quit end if end proc > > # Begin Function number 15 > comp_expect_sec := proc(t_end2,t_start2,t2,clock_sec) > global glob_small_float; > local ms2, rrr, sec_left, sub1, sub2; > ; > ms2 := clock_sec; > sub1 := (t_end2-t_start2); > sub2 := (t2-t_start2); > if (sub1 = 0.0) then # if number 13 > sec_left := 0.0; > else > if (abs(sub2) > 0.0) then # if number 14 > rrr := (sub1/sub2); > sec_left := rrr * ms2 - ms2; > else > sec_left := 0.0; > fi;# end if 14 > fi;# end if 13 > ; > sec_left; > # End Function number 15 > end; comp_expect_sec := proc(t_end2, t_start2, t2, clock_sec) local ms2, rrr, sec_left, sub1, sub2; global glob_small_float; ms2 := clock_sec; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if sub1 = 0. then sec_left := 0. else if 0. < abs(sub2) then rrr := sub1/sub2; sec_left := rrr*ms2 - ms2 else sec_left := 0. end if end if; sec_left end proc > > # Begin Function number 16 > comp_percent := proc(t_end2,t_start2,t2) > global glob_small_float; > local rrr, sub1, sub2; > sub1 := (t_end2-t_start2); > sub2 := (t2-t_start2); > if (abs(sub2) > glob_small_float) then # if number 13 > rrr := (100.0*sub2)/sub1; > else > rrr := 0.0; > fi;# end if 13 > ; > rrr > # End Function number 16 > end; comp_percent := proc(t_end2, t_start2, t2) local rrr, sub1, sub2; global glob_small_float; sub1 := t_end2 - t_start2; sub2 := t2 - t_start2; if glob_small_float < abs(sub2) then rrr := 100.0*sub2/sub1 else rrr := 0. end if; rrr end proc > > # Begin Function number 17 > factorial_1 := proc(nnn) > nnn!; > > # End Function number 17 > end; factorial_1 := proc(nnn) nnn! end proc > > # Begin Function number 18 > factorial_3 := proc(mmm2,nnn2) > (mmm2!)/(nnn2!); > > # End Function number 18 > end; factorial_3 := proc(mmm2, nnn2) mmm2!/nnn2! end proc > # Begin Function number 19 > convfp := proc(mmm) > (mmm); > > # End Function number 19 > end; convfp := proc(mmm) mmm end proc > # Begin Function number 20 > convfloat := proc(mmm) > (mmm); > > # End Function number 20 > end; convfloat := proc(mmm) mmm end proc > elapsed_time_seconds := proc() > time(); > end; elapsed_time_seconds := proc() time() end proc > > > > #END ATS LIBRARY BLOCK > #BEGIN USER DEF BLOCK > #BEGIN USER DEF BLOCK > exact_soln_x1 := proc(t) > local c1,c2,c3; > c1 := 1.0; > c2 := 0.0002; > c3 := 0.0003; > 2.0 * c1 + 6.0 * c3 * exp(-t); > end; exact_soln_x1 := proc(t) local c1, c2, c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; 2.0*c1 + 6.0*c3*exp(-t) end proc > exact_soln_x1p := proc(t) > local c1,c2,c3; > c1 := 1.0; > c2 := 0.0002; > c3 := 0.0003; > - 6.0 * c3 * exp(-t); > end; exact_soln_x1p := proc(t) local c1, c2, c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; -6.0*c3*exp(-t) end proc > exact_soln_x2 := proc(t) > local c1,c2,c3; > c1 := 1.0; > c2 := 0.0002; > c3 := 0.0003; > c1 + c2 * exp(2.0 * t) + c3 * exp(-t); > end; exact_soln_x2 := proc(t) local c1, c2, c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; c1 + c2*exp(2.0*t) + c3*exp(-t) end proc > exact_soln_x2p := proc(t) > local c1,c2,c3; > c1 := 1.0; > c2 := 0.0002; > c3 := 0.0003; > 2.0 * c2 * exp(2.0 * t) - c3 * exp(-t); > end; exact_soln_x2p := proc(t) local c1, c2, c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; 2.0*c2*exp(2.0*t) - c3*exp(-t) end proc > #END USER DEF BLOCK > #END USER DEF BLOCK > #END OUTFILE5 > # Begin Function number 2 > mainprog := proc() > #BEGIN OUTFIEMAIN > local d1,d2,d3,d4,est_err_2,niii,done_once, > term,ord,order_diff,term_no,html_log_file, > rows,r_order,sub_iter,calc_term,iii,temp_sum,current_iter, > t_start,t_end > ,it, log10norm, max_terms, opt_iter, tmp; > #Top Generate Globals Definition > #Bottom Generate Globals Deninition > global > DEBUGL, > INFO, > ALWAYS, > glob_max_terms, > DEBUGMASSIVE, > glob_iolevel, > #Top Generate Globals Decl > glob_current_iter, > glob_max_trunc_err, > glob_last_good_h, > glob_max_opt_iter, > glob_html_log, > glob_log10relerr, > glob_max_hours, > glob_h, > min_in_hour, > djd_debug2, > glob_curr_iter_when_opt, > glob_small_float, > glob_no_eqs, > glob_hmin, > glob_optimal_done, > glob_not_yet_start_msg, > sec_in_min, > djd_debug, > glob_large_float, > glob_look_poles, > glob_not_yet_finished, > glob_clock_sec, > centuries_in_millinium, > glob_display_flag, > glob_dump, > glob_subiter_method, > glob_normmax, > MAX_UNCHANGED, > glob_reached_optimal_h, > glob_clock_start_sec, > glob_optimal_expect_sec, > glob_max_minutes, > glob_iter, > glob_max_sec, > glob_unchanged_h_cnt, > glob_smallish_float, > glob_optimal_clock_start_sec, > glob_start, > glob_log10_abserr, > glob_hmax, > glob_disp_incr, > glob_almost_1, > glob_warned2, > glob_warned, > glob_abserr, > glob_dump_analytic, > glob_initial_pass, > hours_in_day, > glob_orig_start_sec, > glob_max_iter, > glob_relerr, > glob_hmin_init, > glob_log10normmin, > glob_percent_done, > glob_log10abserr, > glob_optimal_start, > glob_max_rel_trunc_err, > glob_log10_relerr, > years_in_century, > days_in_year, > #Bottom Generate Globals Decl > #BEGIN CONST > array_const_4D0, > array_const_0D0, > array_const_2D0, > array_const_3D0, > array_const_2, > array_const_1, > #END CONST > array_x1_init, > array_m1, > array_tmp0, > array_tmp1, > array_tmp2, > array_tmp3, > array_tmp4, > array_tmp5, > array_tmp6, > array_tmp7, > array_tmp8, > array_tmp9, > array_t, > array_tmp10, > array_tmp11, > array_tmp12, > array_tmp13, > array_tmp14, > array_tmp15, > array_tmp16, > array_tmp17, > array_last_rel_error, > array_x2_init, > array_x1, > array_x2, > array_norms, > array_type_pole, > array_pole, > array_1st_rel_error, > array_x2_set_initial, > array_x1_higher_work2, > array_complex_pole, > array_poles, > array_x1_higher, > array_x2_higher_work, > array_x1_set_initial, > array_real_pole, > array_x1_higher_work, > array_x2_higher_work2, > array_x2_higher, > glob_last; > glob_last; > ALWAYS := 1; > INFO := 2; > DEBUGL := 3; > DEBUGMASSIVE := 4; > glob_iolevel := INFO; > DEBUGL := 3; > INFO := 2; > ALWAYS := 1; > glob_max_terms := 30; > DEBUGMASSIVE := 4; > glob_iolevel := 5; > glob_current_iter := 0; > glob_max_trunc_err := 0.1e-10; > glob_last_good_h := 0.1; > glob_max_opt_iter := 10; > glob_html_log := true; > glob_log10relerr := 0.0; > glob_max_hours := 0.0; > glob_h := 0.1; > min_in_hour := 60.0; > djd_debug2 := true; > glob_curr_iter_when_opt := 0; > glob_small_float := 0.1e-50; > glob_no_eqs := 0; > glob_hmin := 0.00000000001; > glob_optimal_done := false; > glob_not_yet_start_msg := true; > sec_in_min := 60.0; > djd_debug := true; > glob_large_float := 9.0e100; > glob_look_poles := false; > glob_not_yet_finished := true; > glob_clock_sec := 0.0; > centuries_in_millinium := 10.0; > glob_display_flag := true; > glob_dump := false; > glob_subiter_method := 3; > glob_normmax := 0.0; > MAX_UNCHANGED := 10; > glob_reached_optimal_h := false; > glob_clock_start_sec := 0.0; > glob_optimal_expect_sec := 0.1; > glob_max_minutes := 0.0; > glob_iter := 0; > glob_max_sec := 10000.0; > glob_unchanged_h_cnt := 0; > glob_smallish_float := 0.1e-100; > glob_optimal_clock_start_sec := 0.0; > glob_start := 0; > glob_log10_abserr := 0.1e-10; > glob_hmax := 1.0; > glob_disp_incr := 0.1; > glob_almost_1 := 0.9990; > glob_warned2 := false; > glob_warned := false; > glob_abserr := 0.1e-10; > glob_dump_analytic := false; > glob_initial_pass := true; > hours_in_day := 24.0; > glob_orig_start_sec := 0.0; > glob_max_iter := 1000; > glob_relerr := 0.1e-10; > glob_hmin_init := 0.001; > glob_log10normmin := 0.1; > glob_percent_done := 0.0; > glob_log10abserr := 0.0; > glob_optimal_start := 0.0; > glob_max_rel_trunc_err := 0.1e-10; > glob_log10_relerr := 0.1e-10; > years_in_century := 100.0; > days_in_year := 365.0; > #Write Set Defaults > glob_orig_start_sec := elapsed_time_seconds(); > MAX_UNCHANGED := 10; > glob_curr_iter_when_opt := 0; > glob_display_flag := true; > glob_no_eqs := 2; > glob_iter := -1; > opt_iter := -1; > glob_max_iter := 50000; > glob_max_hours := 0.0; > glob_max_minutes := 15.0; > omniout_str(ALWAYS,"##############ECHO OF PROBLEM#################"); > omniout_str(ALWAYS,"##############temp/mtest6postode.ode#################"); > omniout_str(ALWAYS,"diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;"); > omniout_str(ALWAYS,"diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN FIRST INPUT BLOCK"); > omniout_str(ALWAYS,"Digits := 32;"); > omniout_str(ALWAYS,"max_terms:=30;"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#END FIRST INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"#"); > omniout_str(ALWAYS,"# was complicated.ode"); > omniout_str(ALWAYS,"#"); > omniout_str(ALWAYS,"t_start := 0.5;"); > omniout_str(ALWAYS,"t_end := 5.0;"); > omniout_str(ALWAYS,"array_x1_init[0 + 1] := exact_soln_x1(t_start);"); > omniout_str(ALWAYS,"array_x1_init[1 + 1] := exact_soln_x1p(t_start);"); > omniout_str(ALWAYS,"array_x2_init[0 + 1] := exact_soln_x2(t_start);"); > omniout_str(ALWAYS,"array_x2_init[1 + 1] := exact_soln_x2p(t_start);"); > omniout_str(ALWAYS,"glob_h := 0.00001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 10;"); > omniout_str(ALWAYS,"#END SECOND INPUT BLOCK"); > omniout_str(ALWAYS,"#BEGIN OVERRIDE BLOCK"); > omniout_str(ALWAYS,"glob_h := 0.0001 ;"); > omniout_str(ALWAYS,"glob_look_poles := true;"); > omniout_str(ALWAYS,"glob_max_iter := 100;"); > omniout_str(ALWAYS,"glob_max_minutes := 15;"); > omniout_str(ALWAYS,"#END OVERRIDE BLOCK"); > omniout_str(ALWAYS,"!"); > omniout_str(ALWAYS,"#BEGIN USER DEF BLOCK"); > omniout_str(ALWAYS,"exact_soln_x1 := proc(t)"); > omniout_str(ALWAYS,"local c1,c2,c3;"); > omniout_str(ALWAYS,"c1 := 1.0;"); > omniout_str(ALWAYS,"c2 := 0.0002;"); > omniout_str(ALWAYS,"c3 := 0.0003;"); > omniout_str(ALWAYS,"2.0 * c1 + 6.0 * c3 * exp(-t);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_x1p := proc(t)"); > omniout_str(ALWAYS,"local c1,c2,c3;"); > omniout_str(ALWAYS,"c1 := 1.0;"); > omniout_str(ALWAYS,"c2 := 0.0002;"); > omniout_str(ALWAYS,"c3 := 0.0003;"); > omniout_str(ALWAYS,"- 6.0 * c3 * exp(-t);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_x2 := proc(t)"); > omniout_str(ALWAYS,"local c1,c2,c3;"); > omniout_str(ALWAYS,"c1 := 1.0;"); > omniout_str(ALWAYS,"c2 := 0.0002;"); > omniout_str(ALWAYS,"c3 := 0.0003;"); > omniout_str(ALWAYS,"c1 + c2 * exp(2.0 * t) + c3 * exp(-t);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"exact_soln_x2p := proc(t)"); > omniout_str(ALWAYS,"local c1,c2,c3;"); > omniout_str(ALWAYS,"c1 := 1.0;"); > omniout_str(ALWAYS,"c2 := 0.0002;"); > omniout_str(ALWAYS,"c3 := 0.0003;"); > omniout_str(ALWAYS,"2.0 * c2 * exp(2.0 * t) - c3 * exp(-t);"); > omniout_str(ALWAYS,"end;"); > omniout_str(ALWAYS,"#END USER DEF BLOCK"); > omniout_str(ALWAYS,"#######END OF ECHO OF PROBLEM#################"); > glob_unchanged_h_cnt := 0; > glob_warned := false; > glob_warned2 := false; > glob_small_float := 1.0e-200; > glob_smallish_float := 1.0e-64; > glob_large_float := 1.0e100; > glob_almost_1 := 0.99; > glob_log10_abserr := -8.0; > glob_log10_relerr := -8.0; > glob_hmax := 0.01; > #BEGIN FIRST INPUT BLOCK > #BEGIN FIRST INPUT BLOCK > Digits := 32; > max_terms:=30; > #END FIRST INPUT BLOCK > #START OF INITS AFTER INPUT BLOCK > glob_max_terms := max_terms; > glob_html_log := true; > #END OF INITS AFTER INPUT BLOCK > array_x1_init:= Array(1..(max_terms + 1),[]); > array_m1:= Array(1..(max_terms + 1),[]); > array_tmp0:= Array(1..(max_terms + 1),[]); > array_tmp1:= Array(1..(max_terms + 1),[]); > array_tmp2:= Array(1..(max_terms + 1),[]); > array_tmp3:= Array(1..(max_terms + 1),[]); > array_tmp4:= Array(1..(max_terms + 1),[]); > array_tmp5:= Array(1..(max_terms + 1),[]); > array_tmp6:= Array(1..(max_terms + 1),[]); > array_tmp7:= Array(1..(max_terms + 1),[]); > array_tmp8:= Array(1..(max_terms + 1),[]); > array_tmp9:= Array(1..(max_terms + 1),[]); > array_t:= Array(1..(max_terms + 1),[]); > array_tmp10:= Array(1..(max_terms + 1),[]); > array_tmp11:= Array(1..(max_terms + 1),[]); > array_tmp12:= Array(1..(max_terms + 1),[]); > array_tmp13:= Array(1..(max_terms + 1),[]); > array_tmp14:= Array(1..(max_terms + 1),[]); > array_tmp15:= Array(1..(max_terms + 1),[]); > array_tmp16:= Array(1..(max_terms + 1),[]); > array_tmp17:= Array(1..(max_terms + 1),[]); > array_last_rel_error:= Array(1..(max_terms + 1),[]); > array_x2_init:= Array(1..(max_terms + 1),[]); > array_x1:= Array(1..(max_terms + 1),[]); > array_x2:= Array(1..(max_terms + 1),[]); > array_norms:= Array(1..(max_terms + 1),[]); > array_type_pole:= Array(1..(max_terms + 1),[]); > array_pole:= Array(1..(max_terms + 1),[]); > array_1st_rel_error:= Array(1..(max_terms + 1),[]); > array_x2_set_initial := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_x1_higher_work2 := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_complex_pole := Array(1..(2+ 1) ,(1..3+ 1),[]); > array_poles := Array(1..(2+ 1) ,(1..3+ 1),[]); > array_x1_higher := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_x2_higher_work := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_x1_set_initial := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_real_pole := Array(1..(2+ 1) ,(1..3+ 1),[]); > array_x1_higher_work := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_x2_higher_work2 := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > array_x2_higher := Array(1..(3+ 1) ,(1..max_terms+ 1),[]); > term := 1; > while term <= max_terms do # do number 2 > array_x1_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp6[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp7[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp8[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp9[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_t[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp10[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp11[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp12[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp13[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp14[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp15[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp16[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_tmp17[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_last_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_x2_init[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_x1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_x2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_norms[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_type_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_pole[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > term := 1; > while term <= max_terms do # do number 2 > array_1st_rel_error[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x2_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x1_higher_work2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_complex_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_poles[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x1_higher[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x2_higher_work[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x1_set_initial[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=2 do # do number 2 > term := 1; > while term <= 3 do # do number 3 > array_real_pole[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x1_higher_work[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x2_higher_work2[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > ord := 1; > while ord <=3 do # do number 2 > term := 1; > while term <= max_terms do # do number 3 > array_x2_higher[ord,term] := 0.0; > term := term + 1; > od;# end do number 3 > ; > ord := ord + 1; > od;# end do number 2 > ; > #BEGIN ARRAYS DEFINED AND INITIALIZATED > array_tmp9 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp9[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp8 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp8[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp7 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp7[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp6 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp6[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp5 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp5[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp4 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp4[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp3 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp3[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp17 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp17[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp16 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp16[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp15 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp15[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp14 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp14[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp13 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp13[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp12 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp12[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp11 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp11[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_tmp10 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_tmp10[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_t := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_t[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_x2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_x2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_x1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_x1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_4D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_4D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_4D0[1] := 4.0; > array_const_0D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_0D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_0D0[1] := 0.0; > array_const_2D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_2D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_2D0[1] := 2.0; > array_const_3D0 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_3D0[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_3D0[1] := 3.0; > array_const_2 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_2[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_2[1] := 2; > array_const_1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms + 1 do # do number 2 > array_const_1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_const_1[1] := 1; > array_m1 := Array(1..(max_terms+1 + 1),[]); > term := 1; > while term <= max_terms do # do number 2 > array_m1[term] := 0.0; > term := term + 1; > od;# end do number 2 > ; > array_m1[1] := -1.0; > #END ARRAYS DEFINED AND INITIALIZATED > #TOP SECOND INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > #END FIRST INPUT BLOCK > #BEGIN SECOND INPUT BLOCK > # > # was complicated.ode > # > t_start := 0.5; > t_end := 5.0; > array_x1_init[0 + 1] := exact_soln_x1(t_start); > array_x1_init[1 + 1] := exact_soln_x1p(t_start); > array_x2_init[0 + 1] := exact_soln_x2(t_start); > array_x2_init[1 + 1] := exact_soln_x2p(t_start); > glob_h := 0.00001 ; > glob_look_poles := true; > glob_max_iter := 10; > #END SECOND INPUT BLOCK > #BEGIN OVERRIDE BLOCK > glob_h := 0.0001 ; > glob_look_poles := true; > glob_max_iter := 100; > glob_max_minutes := 15; > #END OVERRIDE BLOCK > #END SECOND INPUT BLOCK > #BEGIN INITS AFTER SECOND INPUT BLOCK > glob_last_good_h := glob_h; > glob_max_terms := max_terms; > glob_max_sec := convfloat(60.0) * convfloat(glob_max_minutes) + convfloat(3600.0) * convfloat(glob_max_hours); > glob_abserr := 10.0 ^ (glob_log10_abserr); > glob_relerr := 10.0 ^ (glob_log10_relerr); > chk_data(); > #AFTER INITS AFTER SECOND INPUT BLOCK > array_x1_set_initial[1,1] := true; > array_x1_set_initial[1,2] := true; > array_x1_set_initial[1,3] := false; > array_x1_set_initial[1,4] := false; > array_x1_set_initial[1,5] := false; > array_x1_set_initial[1,6] := false; > array_x1_set_initial[1,7] := false; > array_x1_set_initial[1,8] := false; > array_x1_set_initial[1,9] := false; > array_x1_set_initial[1,10] := false; > array_x1_set_initial[1,11] := false; > array_x1_set_initial[1,12] := false; > array_x1_set_initial[1,13] := false; > array_x1_set_initial[1,14] := false; > array_x1_set_initial[1,15] := false; > array_x1_set_initial[1,16] := false; > array_x1_set_initial[1,17] := false; > array_x1_set_initial[1,18] := false; > array_x1_set_initial[1,19] := false; > array_x1_set_initial[1,20] := false; > array_x1_set_initial[1,21] := false; > array_x1_set_initial[1,22] := false; > array_x1_set_initial[1,23] := false; > array_x1_set_initial[1,24] := false; > array_x1_set_initial[1,25] := false; > array_x1_set_initial[1,26] := false; > array_x1_set_initial[1,27] := false; > array_x1_set_initial[1,28] := false; > array_x1_set_initial[1,29] := false; > array_x1_set_initial[1,30] := false; > array_x2_set_initial[2,1] := true; > array_x2_set_initial[2,2] := true; > array_x2_set_initial[2,3] := false; > array_x2_set_initial[2,4] := false; > array_x2_set_initial[2,5] := false; > array_x2_set_initial[2,6] := false; > array_x2_set_initial[2,7] := false; > array_x2_set_initial[2,8] := false; > array_x2_set_initial[2,9] := false; > array_x2_set_initial[2,10] := false; > array_x2_set_initial[2,11] := false; > array_x2_set_initial[2,12] := false; > array_x2_set_initial[2,13] := false; > array_x2_set_initial[2,14] := false; > array_x2_set_initial[2,15] := false; > array_x2_set_initial[2,16] := false; > array_x2_set_initial[2,17] := false; > array_x2_set_initial[2,18] := false; > array_x2_set_initial[2,19] := false; > array_x2_set_initial[2,20] := false; > array_x2_set_initial[2,21] := false; > array_x2_set_initial[2,22] := false; > array_x2_set_initial[2,23] := false; > array_x2_set_initial[2,24] := false; > array_x2_set_initial[2,25] := false; > array_x2_set_initial[2,26] := false; > array_x2_set_initial[2,27] := false; > array_x2_set_initial[2,28] := false; > array_x2_set_initial[2,29] := false; > array_x2_set_initial[2,30] := false; > if glob_html_log then # if number 3 > html_log_file := fopen("html/entry.html",WRITE,TEXT); > fi;# end if 3 > ; > #BEGIN SOLUTION CODE > omniout_str(ALWAYS,"START of Soultion"); > #Start Series -- INITIALIZE FOR SOLUTION > array_t[1] := t_start; > array_t[2] := glob_h; > order_diff := 2; > #Start Series array_x1 > term_no := 1; > while (term_no <= order_diff) do # do number 2 > array_x1[term_no] := array_x1_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;# end do number 2 > ; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do # do number 2 > term_no := 1; > while (term_no <= (rows - r_order + 1)) do # do number 3 > it := term_no + r_order - 1; > array_x1_higher[r_order,term_no] := array_x1_init[it]* (glob_h ^ (term_no - 1)) / ((factorial_1(term_no - 1))); > term_no := term_no + 1; > od;# end do number 3 > ; > r_order := r_order + 1; > od;# end do number 2 > ; > order_diff := 2; > #Start Series array_x2 > term_no := 1; > while (term_no <= order_diff) do # do number 2 > array_x2[term_no] := array_x2_init[term_no] * glob_h ^ (term_no - 1) / factorial_1(term_no - 1); > term_no := term_no + 1; > od;# end do number 2 > ; > rows := order_diff; > r_order := 1; > while (r_order <= rows) do # do number 2 > term_no := 1; > while (term_no <= (rows - r_order + 1)) do # do number 3 > it := term_no + r_order - 1; > array_x2_higher[r_order,term_no] := array_x2_init[it]* (glob_h ^ (term_no - 1)) / ((factorial_1(term_no - 1))); > term_no := term_no + 1; > od;# end do number 3 > ; > r_order := r_order + 1; > od;# end do number 2 > ; > current_iter := 1; > glob_clock_start_sec := elapsed_time_seconds(); > start_array_x1(); > if (abs(array_x1_higher[1,1]) > glob_small_float) then # if number 3 > tmp := abs(array_x1_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 4 > glob_log10normmin := log10norm; > fi;# end if 4 > fi;# end if 3 > ; > display_alot(current_iter) > ; > start_array_x2(); > if (abs(array_x2_higher[1,1]) > glob_small_float) then # if number 3 > tmp := abs(array_x2_higher[1,1]); > log10norm := (log10(tmp)); > if (log10norm < glob_log10normmin) then # if number 4 > glob_log10normmin := log10norm; > fi;# end if 4 > fi;# end if 3 > ; > display_alot(current_iter) > ; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := 0; > glob_iter := 0; > omniout_str(DEBUGL," "); > glob_reached_optimal_h := true; > glob_optimal_clock_start_sec := elapsed_time_seconds(); > while ((glob_current_iter < glob_max_iter) and (array_t[1] <= t_end ) and ((convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec)) < convfloat(glob_max_sec))) do # do number 2 > #left paren 0001C > omniout_str(INFO," "); > omniout_str(INFO,"TOP MAIN SOLVE Loop"); > glob_iter := glob_iter + 1; > glob_clock_sec := elapsed_time_seconds(); > glob_current_iter := glob_current_iter + 1; > if glob_subiter_method = 1 then # if number 3 > atomall(); > elif glob_subiter_method = 2 then # if number 4 > subiter := 1; > while subiter <= 3 do # do number 3 > atomall(); > subiter := subiter + 1; > od;# end do number 3 > ; > else > subiter := 1; > while subiter <= 3 + glob_max_terms do # do number 3 > atomall(); > subiter := subiter + 1; > od;# end do number 3 > ; > fi;# end if 4 > ; > if (glob_look_poles) then # if number 4 > #left paren 0004C > check_for_pole(); > fi;# end if 4 > ;#was right paren 0004C > array_t[1] := array_t[1] + glob_h; > array_t[2] := glob_h; > #Jump Series array_x1 > order_diff := 2; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =1 > #sum_and_adjust array_x1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 3; > calc_term := 1; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[3,iii] := array_x1_higher[3,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 3; > calc_term := 1; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 2; > calc_term := 2; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[2,iii] := array_x1_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 2; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 2; > calc_term := 1; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[2,iii] := array_x1_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 2; > calc_term := 1; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 3; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[1,iii] := array_x1_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 3; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 2; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[1,iii] := array_x1_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 2; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #BEFORE ADJUST SUBSERIES EQ =1 > ord := 1; > calc_term := 1; > #adjust_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x1_higher_work[1,iii] := array_x1_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =1 > #BEFORE SUM SUBSERIES EQ =1 > temp_sum := 0.0; > ord := 1; > calc_term := 1; > #sum_subseriesarray_x1 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x1_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x1_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =1 > #END SUM AND ADJUST EQ =1 > #END PART 1 > #START PART 2 MOVE TERMS to REGULAR Array > term_no := glob_max_terms; > while (term_no >= 1) do # do number 3 > array_x1[term_no] := array_x1_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do # do number 4 > array_x1_higher[ord,term_no] := array_x1_higher_work2[ord,term_no]; > ord := ord + 1; > od;# end do number 4 > ; > term_no := term_no - 1; > od;# end do number 3 > ; > #END PART 2 HEVE MOVED TERMS to REGULAR Array > #Jump Series array_x2 > order_diff := 2; > #START PART 1 SUM AND ADJUST > #START SUM AND ADJUST EQ =2 > #sum_and_adjust array_x2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 3; > calc_term := 1; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[3,iii] := array_x2_higher[3,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 3; > calc_term := 1; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 2; > calc_term := 2; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[2,iii] := array_x2_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 2; > calc_term := 2; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 2; > calc_term := 1; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[2,iii] := array_x2_higher[2,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 2; > calc_term := 1; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 1; > calc_term := 3; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[1,iii] := array_x2_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 1; > calc_term := 3; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 1; > calc_term := 2; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[1,iii] := array_x2_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 1; > calc_term := 2; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #BEFORE ADJUST SUBSERIES EQ =2 > ord := 1; > calc_term := 1; > #adjust_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > array_x2_higher_work[1,iii] := array_x2_higher[1,iii] / (glob_h ^ (calc_term - 1)) / factorial_3(iii - calc_term , iii - 1); > iii := iii - 1; > od;# end do number 3 > ; > #AFTER ADJUST SUBSERIES EQ =2 > #BEFORE SUM SUBSERIES EQ =2 > temp_sum := 0.0; > ord := 1; > calc_term := 1; > #sum_subseriesarray_x2 > iii := glob_max_terms; > while (iii >= calc_term) do # do number 3 > temp_sum := temp_sum + array_x2_higher_work[ord,iii]; > iii := iii - 1; > od;# end do number 3 > ; > array_x2_higher_work2[ord,calc_term] := temp_sum * (glob_h ^ (calc_term - 1)) / (convfp(calc_term - 1)!); > #AFTER SUM SUBSERIES EQ =2 > #END SUM AND ADJUST EQ =2 > #END PART 1 > #START PART 2 MOVE TERMS to REGULAR Array > term_no := glob_max_terms; > while (term_no >= 1) do # do number 3 > array_x2[term_no] := array_x2_higher_work2[1,term_no]; > ord := 1; > while ord <= order_diff do # do number 4 > array_x2_higher[ord,term_no] := array_x2_higher_work2[ord,term_no]; > ord := ord + 1; > od;# end do number 4 > ; > term_no := term_no - 1; > od;# end do number 3 > ; > #END PART 2 HEVE MOVED TERMS to REGULAR Array > display_alot(current_iter) > ; > od;# end do number 2 > ;#right paren 0001C > omniout_str(ALWAYS,"Finished!"); > if (glob_iter >= glob_max_iter) then # if number 4 > omniout_str(ALWAYS,"Maximum Iterations Reached before Solution Completed!") > fi;# end if 4 > ; > if (elapsed_time_seconds() - convfloat(glob_orig_start_sec) >= convfloat(glob_max_sec )) then # if number 4 > omniout_str(ALWAYS,"Maximum Time Reached before Solution Completed!") > fi;# end if 4 > ; > glob_clock_sec := elapsed_time_seconds(); > omniout_str(INFO,"diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;"); > omniout_str(INFO,"diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1;"); > omniout_int(INFO,"Iterations ",32,glob_iter,4," ") > ; > prog_report(t_start,t_end); > if glob_html_log then # if number 4 > logstart(html_log_file); > logitem_str(html_log_file,"2012-06-13T02:43:31-05:00") > ; > logitem_str(html_log_file,"Maple") > ; > logitem_str(html_log_file,"mtest6") > ; > logitem_str(html_log_file,"diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;") > ; > logitem_float(html_log_file,t_start) > ; > logitem_float(html_log_file,t_end) > ; > logitem_float(html_log_file,array_t[1]) > ; > logitem_float(html_log_file,glob_h) > ; > logitem_integer(html_log_file,Digits) > ; > ; > logitem_integer(html_log_file,glob_max_terms) > ; > logitem_float(html_log_file,array_1st_rel_error[1]) > ; > logitem_float(html_log_file,array_last_rel_error[1]) > ; > logitem_integer(html_log_file,glob_iter) > ; > logitem_pole(html_log_file,array_type_pole[1]) > ; > if array_type_pole[1] = 1 or array_type_pole[1] = 2 then # if number 5 > logitem_float(html_log_file,array_pole[1]) > ; > logitem_float(html_log_file,array_pole[2]) > ; > 0; > else > logitem_str(html_log_file,"NA") > ; > logitem_str(html_log_file,"NA") > ; > 0; > fi;# end if 5 > ; > logitem_time(html_log_file,convfloat(glob_clock_sec)) > ; > if glob_percent_done < 100.0 then # if number 5 > logitem_time(html_log_file,convfloat(glob_optimal_expect_sec)) > ; > 0 > else > logitem_str(html_log_file,"Done") > ; > 0 > fi;# end if 5 > ; > log_revs(html_log_file," 090 ") > ; > logitem_str(html_log_file,"mtest6 diffeq.mxt") > ; > logitem_str(html_log_file,"mtest6 maple results") > ; > logitem_str(html_log_file,"Test of revised logic - mostly affecting systems of eqs") > ; > logend(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logitem_str(html_log_file,"diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1;") > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > ; > logditto(html_log_file) > ; > logitem_float(html_log_file,array_1st_rel_error[2]) > ; > logitem_float(html_log_file,array_last_rel_error[2]) > ; > logditto(html_log_file) > ; > logitem_pole(html_log_file,array_type_pole[2]) > ; > if array_type_pole[2] = 1 or array_type_pole[2] = 2 then # if number 5 > logitem_float(html_log_file,array_pole[1]) > ; > logitem_float(html_log_file,array_pole[2]) > ; > 0; > else > logitem_str(html_log_file,"NA") > ; > logitem_str(html_log_file,"NA") > ; > 0; > fi;# end if 5 > ; > logditto(html_log_file) > ; > if glob_percent_done < 100.0 then # if number 5 > logditto(html_log_file) > ; > 0 > else > logditto(html_log_file) > ; > 0 > fi;# end if 5 > ; > logditto(html_log_file); > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logditto(html_log_file) > ; > logend(html_log_file) > ; > ; > fi;# end if 4 > ; > if glob_html_log then # if number 4 > fclose(html_log_file); > fi;# end if 4 > ; > ;; > #END OUTFILEMAIN > # End Function number 8 > end; Warning, `subiter` is implicitly declared local to procedure `mainprog` mainprog := proc() local d1, d2, d3, d4, est_err_2, niii, done_once, term, ord, order_diff, term_no, html_log_file, rows, r_order, sub_iter, calc_term, iii, temp_sum, current_iter, t_start, t_end, it, log10norm, max_terms, opt_iter, tmp, subiter; global DEBUGL, INFO, ALWAYS, glob_max_terms, DEBUGMASSIVE, glob_iolevel, glob_current_iter, glob_max_trunc_err, glob_last_good_h, glob_max_opt_iter, glob_html_log, glob_log10relerr, glob_max_hours, glob_h, min_in_hour, djd_debug2, glob_curr_iter_when_opt, glob_small_float, glob_no_eqs, glob_hmin, glob_optimal_done, glob_not_yet_start_msg, sec_in_min, djd_debug, glob_large_float, glob_look_poles, glob_not_yet_finished, glob_clock_sec, centuries_in_millinium, glob_display_flag, glob_dump, glob_subiter_method, glob_normmax, MAX_UNCHANGED, glob_reached_optimal_h, glob_clock_start_sec, glob_optimal_expect_sec, glob_max_minutes, glob_iter, glob_max_sec, glob_unchanged_h_cnt, glob_smallish_float, glob_optimal_clock_start_sec, glob_start, glob_log10_abserr, glob_hmax, glob_disp_incr, glob_almost_1, glob_warned2, glob_warned, glob_abserr, glob_dump_analytic, glob_initial_pass, hours_in_day, glob_orig_start_sec, glob_max_iter, glob_relerr, glob_hmin_init, glob_log10normmin, glob_percent_done, glob_log10abserr, glob_optimal_start, glob_max_rel_trunc_err, glob_log10_relerr, years_in_century, days_in_year, array_const_4D0, array_const_0D0, array_const_2D0, array_const_3D0, array_const_2, array_const_1, array_x1_init, array_m1, array_tmp0, array_tmp1, array_tmp2, array_tmp3, array_tmp4, array_tmp5, array_tmp6, array_tmp7, array_tmp8, array_tmp9, array_t, array_tmp10, array_tmp11, array_tmp12, array_tmp13, array_tmp14, array_tmp15, array_tmp16, array_tmp17, array_last_rel_error, array_x2_init, array_x1, array_x2, array_norms, array_type_pole, array_pole, array_1st_rel_error, array_x2_set_initial, array_x1_higher_work2, array_complex_pole, array_poles, array_x1_higher, array_x2_higher_work, array_x1_set_initial, array_real_pole, array_x1_higher_work, array_x2_higher_work2, array_x2_higher, glob_last; glob_last; ALWAYS := 1; INFO := 2; DEBUGL := 3; DEBUGMASSIVE := 4; glob_iolevel := INFO; DEBUGL := 3; INFO := 2; ALWAYS := 1; glob_max_terms := 30; DEBUGMASSIVE := 4; glob_iolevel := 5; glob_current_iter := 0; glob_max_trunc_err := 0.1*10^(-10); glob_last_good_h := 0.1; glob_max_opt_iter := 10; glob_html_log := true; glob_log10relerr := 0.; glob_max_hours := 0.; glob_h := 0.1; min_in_hour := 60.0; djd_debug2 := true; glob_curr_iter_when_opt := 0; glob_small_float := 0.1*10^(-50); glob_no_eqs := 0; glob_hmin := 0.1*10^(-10); glob_optimal_done := false; glob_not_yet_start_msg := true; sec_in_min := 60.0; djd_debug := true; glob_large_float := 0.90*10^101; glob_look_poles := false; glob_not_yet_finished := true; glob_clock_sec := 0.; centuries_in_millinium := 10.0; glob_display_flag := true; glob_dump := false; glob_subiter_method := 3; glob_normmax := 0.; MAX_UNCHANGED := 10; glob_reached_optimal_h := false; glob_clock_start_sec := 0.; glob_optimal_expect_sec := 0.1; glob_max_minutes := 0.; glob_iter := 0; glob_max_sec := 10000.0; glob_unchanged_h_cnt := 0; glob_smallish_float := 0.1*10^(-100); glob_optimal_clock_start_sec := 0.; glob_start := 0; glob_log10_abserr := 0.1*10^(-10); glob_hmax := 1.0; glob_disp_incr := 0.1; glob_almost_1 := 0.9990; glob_warned2 := false; glob_warned := false; glob_abserr := 0.1*10^(-10); glob_dump_analytic := false; glob_initial_pass := true; hours_in_day := 24.0; glob_orig_start_sec := 0.; glob_max_iter := 1000; glob_relerr := 0.1*10^(-10); glob_hmin_init := 0.001; glob_log10normmin := 0.1; glob_percent_done := 0.; glob_log10abserr := 0.; glob_optimal_start := 0.; glob_max_rel_trunc_err := 0.1*10^(-10); glob_log10_relerr := 0.1*10^(-10); years_in_century := 100.0; days_in_year := 365.0; glob_orig_start_sec := elapsed_time_seconds(); MAX_UNCHANGED := 10; glob_curr_iter_when_opt := 0; glob_display_flag := true; glob_no_eqs := 2; glob_iter := -1; opt_iter := -1; glob_max_iter := 50000; glob_max_hours := 0.; glob_max_minutes := 15.0; omniout_str(ALWAYS, "##############ECHO OF PROBLEM#################"); omniout_str(ALWAYS, "##############temp/mtest6postode.ode#################"); omniout_str(ALWAYS, "diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;"); omniout_str(ALWAYS, "diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - \ diff(x1,t,2) - diff (x1,t,1) + x1;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN FIRST INPUT BLOCK"); omniout_str(ALWAYS, "Digits := 32;"); omniout_str(ALWAYS, "max_terms:=30;"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#END FIRST INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN SECOND INPUT BLOCK"); omniout_str(ALWAYS, "#"); omniout_str(ALWAYS, "# was complicated.ode"); omniout_str(ALWAYS, "#"); omniout_str(ALWAYS, "t_start := 0.5;"); omniout_str(ALWAYS, "t_end := 5.0;"); omniout_str(ALWAYS, "array_x1_init[0 + 1] := exact_soln_x1(t_start);"); omniout_str(ALWAYS, "array_x1_init[1 + 1] := exact_soln_x1p(t_start);") ; omniout_str(ALWAYS, "array_x2_init[0 + 1] := exact_soln_x2(t_start);"); omniout_str(ALWAYS, "array_x2_init[1 + 1] := exact_soln_x2p(t_start);") ; omniout_str(ALWAYS, "glob_h := 0.00001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 10;"); omniout_str(ALWAYS, "#END SECOND INPUT BLOCK"); omniout_str(ALWAYS, "#BEGIN OVERRIDE BLOCK"); omniout_str(ALWAYS, "glob_h := 0.0001 ;"); omniout_str(ALWAYS, "glob_look_poles := true;"); omniout_str(ALWAYS, "glob_max_iter := 100;"); omniout_str(ALWAYS, "glob_max_minutes := 15;"); omniout_str(ALWAYS, "#END OVERRIDE BLOCK"); omniout_str(ALWAYS, "!"); omniout_str(ALWAYS, "#BEGIN USER DEF BLOCK"); omniout_str(ALWAYS, "exact_soln_x1 := proc(t)"); omniout_str(ALWAYS, "local c1,c2,c3;"); omniout_str(ALWAYS, "c1 := 1.0;"); omniout_str(ALWAYS, "c2 := 0.0002;"); omniout_str(ALWAYS, "c3 := 0.0003;"); omniout_str(ALWAYS, "2.0 * c1 + 6.0 * c3 * exp(-t);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_x1p := proc(t)"); omniout_str(ALWAYS, "local c1,c2,c3;"); omniout_str(ALWAYS, "c1 := 1.0;"); omniout_str(ALWAYS, "c2 := 0.0002;"); omniout_str(ALWAYS, "c3 := 0.0003;"); omniout_str(ALWAYS, "- 6.0 * c3 * exp(-t);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_x2 := proc(t)"); omniout_str(ALWAYS, "local c1,c2,c3;"); omniout_str(ALWAYS, "c1 := 1.0;"); omniout_str(ALWAYS, "c2 := 0.0002;"); omniout_str(ALWAYS, "c3 := 0.0003;"); omniout_str(ALWAYS, "c1 + c2 * exp(2.0 * t) + c3 * exp(-t);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "exact_soln_x2p := proc(t)"); omniout_str(ALWAYS, "local c1,c2,c3;"); omniout_str(ALWAYS, "c1 := 1.0;"); omniout_str(ALWAYS, "c2 := 0.0002;"); omniout_str(ALWAYS, "c3 := 0.0003;"); omniout_str(ALWAYS, "2.0 * c2 * exp(2.0 * t) - c3 * exp(-t);"); omniout_str(ALWAYS, "end;"); omniout_str(ALWAYS, "#END USER DEF BLOCK"); omniout_str(ALWAYS, "#######END OF ECHO OF PROBLEM#################"); glob_unchanged_h_cnt := 0; glob_warned := false; glob_warned2 := false; glob_small_float := 0.10*10^(-199); glob_smallish_float := 0.10*10^(-63); glob_large_float := 0.10*10^101; glob_almost_1 := 0.99; glob_log10_abserr := -8.0; glob_log10_relerr := -8.0; glob_hmax := 0.01; Digits := 32; max_terms := 30; glob_max_terms := max_terms; glob_html_log := true; array_x1_init := Array(1 .. max_terms + 1, []); array_m1 := Array(1 .. max_terms + 1, []); array_tmp0 := Array(1 .. max_terms + 1, []); array_tmp1 := Array(1 .. max_terms + 1, []); array_tmp2 := Array(1 .. max_terms + 1, []); array_tmp3 := Array(1 .. max_terms + 1, []); array_tmp4 := Array(1 .. max_terms + 1, []); array_tmp5 := Array(1 .. max_terms + 1, []); array_tmp6 := Array(1 .. max_terms + 1, []); array_tmp7 := Array(1 .. max_terms + 1, []); array_tmp8 := Array(1 .. max_terms + 1, []); array_tmp9 := Array(1 .. max_terms + 1, []); array_t := Array(1 .. max_terms + 1, []); array_tmp10 := Array(1 .. max_terms + 1, []); array_tmp11 := Array(1 .. max_terms + 1, []); array_tmp12 := Array(1 .. max_terms + 1, []); array_tmp13 := Array(1 .. max_terms + 1, []); array_tmp14 := Array(1 .. max_terms + 1, []); array_tmp15 := Array(1 .. max_terms + 1, []); array_tmp16 := Array(1 .. max_terms + 1, []); array_tmp17 := Array(1 .. max_terms + 1, []); array_last_rel_error := Array(1 .. max_terms + 1, []); array_x2_init := Array(1 .. max_terms + 1, []); array_x1 := Array(1 .. max_terms + 1, []); array_x2 := Array(1 .. max_terms + 1, []); array_norms := Array(1 .. max_terms + 1, []); array_type_pole := Array(1 .. max_terms + 1, []); array_pole := Array(1 .. max_terms + 1, []); array_1st_rel_error := Array(1 .. max_terms + 1, []); array_x2_set_initial := Array(1 .. 4, 1 .. max_terms + 1, []); array_x1_higher_work2 := Array(1 .. 4, 1 .. max_terms + 1, []); array_complex_pole := Array(1 .. 3, 1 .. 4, []); array_poles := Array(1 .. 3, 1 .. 4, []); array_x1_higher := Array(1 .. 4, 1 .. max_terms + 1, []); array_x2_higher_work := Array(1 .. 4, 1 .. max_terms + 1, []); array_x1_set_initial := Array(1 .. 4, 1 .. max_terms + 1, []); array_real_pole := Array(1 .. 3, 1 .. 4, []); array_x1_higher_work := Array(1 .. 4, 1 .. max_terms + 1, []); array_x2_higher_work2 := Array(1 .. 4, 1 .. max_terms + 1, []); array_x2_higher := Array(1 .. 4, 1 .. max_terms + 1, []); term := 1; while term <= max_terms do array_x1_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp0[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp3[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp4[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp5[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp6[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp7[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp8[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp9[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_t[term] := 0.; term := term + 1 end do ; term := 1; while term <= max_terms do array_tmp10[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp11[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp12[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp13[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp14[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp15[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp16[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_tmp17[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_last_rel_error[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_x2_init[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_x1[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_x2[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_norms[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_type_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_pole[term] := 0.; term := term + 1 end do; term := 1; while term <= max_terms do array_1st_rel_error[term] := 0.; term := term + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x2_set_initial[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x1_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_complex_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_poles[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x1_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x2_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x1_set_initial[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 2 do term := 1; while term <= 3 do array_real_pole[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x1_higher_work[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x2_higher_work2[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; ord := 1; while ord <= 3 do term := 1; while term <= max_terms do array_x2_higher[ord, term] := 0.; term := term + 1 end do; ord := ord + 1 end do; array_tmp9 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp9[term] := 0.; term := term + 1 end do; array_tmp8 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp8[term] := 0.; term := term + 1 end do; array_tmp7 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp7[term] := 0.; term := term + 1 end do; array_tmp6 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp6[term] := 0.; term := term + 1 end do; array_tmp5 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp5[term] := 0.; term := term + 1 end do; array_tmp4 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp4[term] := 0.; term := term + 1 end do; array_tmp3 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp3[term] := 0.; term := term + 1 end do; array_tmp2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp2[term] := 0.; term := term + 1 end do; array_tmp1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp1[term] := 0.; term := term + 1 end do; array_tmp0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp0[term] := 0.; term := term + 1 end do; array_tmp17 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp17[term] := 0.; term := term + 1 end do; array_tmp16 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp16[term] := 0.; term := term + 1 end do; array_tmp15 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp15[term] := 0.; term := term + 1 end do; array_tmp14 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp14[term] := 0.; term := term + 1 end do; array_tmp13 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp13[term] := 0.; term := term + 1 end do; array_tmp12 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp12[term] := 0.; term := term + 1 end do; array_tmp11 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp11[term] := 0.; term := term + 1 end do; array_tmp10 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_tmp10[term] := 0.; term := term + 1 end do; array_t := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_t[term] := 0.; term := term + 1 end do; array_x2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_x2[term] := 0.; term := term + 1 end do; array_x1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_x1[term] := 0.; term := term + 1 end do; array_const_4D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_4D0[term] := 0.; term := term + 1 end do; array_const_4D0[1] := 4.0; array_const_0D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_0D0[term] := 0.; term := term + 1 end do; array_const_0D0[1] := 0.; array_const_2D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_2D0[term] := 0.; term := term + 1 end do; array_const_2D0[1] := 2.0; array_const_3D0 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_3D0[term] := 0.; term := term + 1 end do; array_const_3D0[1] := 3.0; array_const_2 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_2[term] := 0.; term := term + 1 end do; array_const_2[1] := 2; array_const_1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms + 1 do array_const_1[term] := 0.; term := term + 1 end do; array_const_1[1] := 1; array_m1 := Array(1 .. max_terms + 2, []); term := 1; while term <= max_terms do array_m1[term] := 0.; term := term + 1 end do; array_m1[1] := -1.0; t_start := 0.5; t_end := 5.0; array_x1_init[1] := exact_soln_x1(t_start); array_x1_init[2] := exact_soln_x1p(t_start); array_x2_init[1] := exact_soln_x2(t_start); array_x2_init[2] := exact_soln_x2p(t_start); glob_h := 0.00001; glob_look_poles := true; glob_max_iter := 10; glob_h := 0.0001; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; glob_last_good_h := glob_h; glob_max_terms := max_terms; glob_max_sec := convfloat(60.0)*convfloat(glob_max_minutes) + convfloat(3600.0)*convfloat(glob_max_hours); glob_abserr := 10.0^glob_log10_abserr; glob_relerr := 10.0^glob_log10_relerr; chk_data(); array_x1_set_initial[1, 1] := true; array_x1_set_initial[1, 2] := true; array_x1_set_initial[1, 3] := false; array_x1_set_initial[1, 4] := false; array_x1_set_initial[1, 5] := false; array_x1_set_initial[1, 6] := false; array_x1_set_initial[1, 7] := false; array_x1_set_initial[1, 8] := false; array_x1_set_initial[1, 9] := false; array_x1_set_initial[1, 10] := false; array_x1_set_initial[1, 11] := false; array_x1_set_initial[1, 12] := false; array_x1_set_initial[1, 13] := false; array_x1_set_initial[1, 14] := false; array_x1_set_initial[1, 15] := false; array_x1_set_initial[1, 16] := false; array_x1_set_initial[1, 17] := false; array_x1_set_initial[1, 18] := false; array_x1_set_initial[1, 19] := false; array_x1_set_initial[1, 20] := false; array_x1_set_initial[1, 21] := false; array_x1_set_initial[1, 22] := false; array_x1_set_initial[1, 23] := false; array_x1_set_initial[1, 24] := false; array_x1_set_initial[1, 25] := false; array_x1_set_initial[1, 26] := false; array_x1_set_initial[1, 27] := false; array_x1_set_initial[1, 28] := false; array_x1_set_initial[1, 29] := false; array_x1_set_initial[1, 30] := false; array_x2_set_initial[2, 1] := true; array_x2_set_initial[2, 2] := true; array_x2_set_initial[2, 3] := false; array_x2_set_initial[2, 4] := false; array_x2_set_initial[2, 5] := false; array_x2_set_initial[2, 6] := false; array_x2_set_initial[2, 7] := false; array_x2_set_initial[2, 8] := false; array_x2_set_initial[2, 9] := false; array_x2_set_initial[2, 10] := false; array_x2_set_initial[2, 11] := false; array_x2_set_initial[2, 12] := false; array_x2_set_initial[2, 13] := false; array_x2_set_initial[2, 14] := false; array_x2_set_initial[2, 15] := false; array_x2_set_initial[2, 16] := false; array_x2_set_initial[2, 17] := false; array_x2_set_initial[2, 18] := false; array_x2_set_initial[2, 19] := false; array_x2_set_initial[2, 20] := false; array_x2_set_initial[2, 21] := false; array_x2_set_initial[2, 22] := false; array_x2_set_initial[2, 23] := false; array_x2_set_initial[2, 24] := false; array_x2_set_initial[2, 25] := false; array_x2_set_initial[2, 26] := false; array_x2_set_initial[2, 27] := false; array_x2_set_initial[2, 28] := false; array_x2_set_initial[2, 29] := false; array_x2_set_initial[2, 30] := false; if glob_html_log then html_log_file := fopen("html/entry.html", WRITE, TEXT) end if; omniout_str(ALWAYS, "START of Soultion"); array_t[1] := t_start; array_t[2] := glob_h; order_diff := 2; term_no := 1; while term_no <= order_diff do array_x1[term_no] := array_x1_init[term_no]*glob_h^(term_no - 1)/ factorial_1(term_no - 1); term_no := term_no + 1 end do; rows := order_diff; r_order := 1; while r_order <= rows do term_no := 1; while term_no <= rows - r_order + 1 do it := term_no + r_order - 1; array_x1_higher[r_order, term_no] := array_x1_init[it]* glob_h^(term_no - 1)/factorial_1(term_no - 1); term_no := term_no + 1 end do; r_order := r_order + 1 end do; order_diff := 2; term_no := 1; while term_no <= order_diff do array_x2[term_no] := array_x2_init[term_no]*glob_h^(term_no - 1)/ factorial_1(term_no - 1); term_no := term_no + 1 end do; rows := order_diff; r_order := 1; while r_order <= rows do term_no := 1; while term_no <= rows - r_order + 1 do it := term_no + r_order - 1; array_x2_higher[r_order, term_no] := array_x2_init[it]* glob_h^(term_no - 1)/factorial_1(term_no - 1); term_no := term_no + 1 end do; r_order := r_order + 1 end do; current_iter := 1; glob_clock_start_sec := elapsed_time_seconds(); start_array_x1(); if glob_small_float < abs(array_x1_higher[1, 1]) then tmp := abs(array_x1_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); start_array_x2(); if glob_small_float < abs(array_x2_higher[1, 1]) then tmp := abs(array_x2_higher[1, 1]); log10norm := log10(tmp); if log10norm < glob_log10normmin then glob_log10normmin := log10norm end if end if; display_alot(current_iter); glob_clock_sec := elapsed_time_seconds(); glob_current_iter := 0; glob_iter := 0; omniout_str(DEBUGL, " "); glob_reached_optimal_h := true; glob_optimal_clock_start_sec := elapsed_time_seconds(); while glob_current_iter < glob_max_iter and array_t[1] <= t_end and convfloat(glob_clock_sec) - convfloat(glob_orig_start_sec) < convfloat(glob_max_sec) do omniout_str(INFO, " "); omniout_str(INFO, "TOP MAIN SOLVE Loop"); glob_iter := glob_iter + 1; glob_clock_sec := elapsed_time_seconds(); glob_current_iter := glob_current_iter + 1; if glob_subiter_method = 1 then atomall() elif glob_subiter_method = 2 then subiter := 1; while subiter <= 3 do atomall(); subiter := subiter + 1 end do else subiter := 1; while subiter <= 3 + glob_max_terms do atomall(); subiter := subiter + 1 end do end if; if glob_look_poles then check_for_pole() end if; array_t[1] := array_t[1] + glob_h; array_t[2] := glob_h; order_diff := 2; ord := 3; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[3, iii] := array_x1_higher[3, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 3; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 2; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[2, iii] := array_x1_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[2, iii] := array_x1_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 3; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[1, iii] := array_x1_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 3; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[1, iii] := array_x1_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x1_higher_work[1, iii] := array_x1_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x1_higher_work[ord, iii]; iii := iii - 1 end do; array_x1_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_x1[term_no] := array_x1_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_x1_higher[ord, term_no] := array_x1_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; order_diff := 2; ord := 3; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[3, iii] := array_x2_higher[3, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 3; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 2; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[2, iii] := array_x2_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[2, iii] := array_x2_higher[2, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 2; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 3; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[1, iii] := array_x2_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 3; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[1, iii] := array_x2_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 2; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do array_x2_higher_work[1, iii] := array_x2_higher[1, iii]/( glob_h^(calc_term - 1)* factorial_3(iii - calc_term, iii - 1)); iii := iii - 1 end do; temp_sum := 0.; ord := 1; calc_term := 1; iii := glob_max_terms; while calc_term <= iii do temp_sum := temp_sum + array_x2_higher_work[ord, iii]; iii := iii - 1 end do; array_x2_higher_work2[ord, calc_term] := temp_sum*glob_h^(calc_term - 1)/convfp(calc_term - 1)!; term_no := glob_max_terms; while 1 <= term_no do array_x2[term_no] := array_x2_higher_work2[1, term_no]; ord := 1; while ord <= order_diff do array_x2_higher[ord, term_no] := array_x2_higher_work2[ord, term_no]; ord := ord + 1 end do; term_no := term_no - 1 end do; display_alot(current_iter) end do; omniout_str(ALWAYS, "Finished!"); if glob_max_iter <= glob_iter then omniout_str(ALWAYS, "Maximum Iterations Reached before Solution Completed!") end if; if convfloat(glob_max_sec) <= elapsed_time_seconds() - convfloat(glob_orig_start_sec) then omniout_str(ALWAYS, "Maximum Time Reached before Solution Completed!") end if; glob_clock_sec := elapsed_time_seconds(); omniout_str(INFO, "diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;"); omniout_str(INFO, "diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - di\ ff(x1,t,2) - diff (x1,t,1) + x1;"); omniout_int(INFO, "Iterations ", 32, glob_iter, 4, " "); prog_report(t_start, t_end); if glob_html_log then logstart(html_log_file); logitem_str(html_log_file, "2012-06-13T02:43:31-05:00"); logitem_str(html_log_file, "Maple"); logitem_str(html_log_file, "mtest6") ; logitem_str(html_log_file, "diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1;") ; logitem_float(html_log_file, t_start); logitem_float(html_log_file, t_end); logitem_float(html_log_file, array_t[1]); logitem_float(html_log_file, glob_h); logitem_integer(html_log_file, Digits); logitem_integer(html_log_file, glob_max_terms); logitem_float(html_log_file, array_1st_rel_error[1]); logitem_float(html_log_file, array_last_rel_error[1]); logitem_integer(html_log_file, glob_iter); logitem_pole(html_log_file, array_type_pole[1]); if array_type_pole[1] = 1 or array_type_pole[1] = 2 then logitem_float(html_log_file, array_pole[1]); logitem_float(html_log_file, array_pole[2]); 0 else logitem_str(html_log_file, "NA"); logitem_str(html_log_file, "NA"); 0 end if; logitem_time(html_log_file, convfloat(glob_clock_sec)); if glob_percent_done < 100.0 then logitem_time(html_log_file, convfloat(glob_optimal_expect_sec)) ; 0 else logitem_str(html_log_file, "Done"); 0 end if; log_revs(html_log_file, " 090 "); logitem_str(html_log_file, "mtest6 diffeq.mxt"); logitem_str(html_log_file, "mtest6 maple results"); logitem_str(html_log_file, "Test of revised logic - mostly affecting systems of eqs"); logend(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logitem_str(html_log_file, "diff (x2,t,2) = 3.0 * diff(x2,t,1) - \ 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1;"); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logitem_float(html_log_file, array_1st_rel_error[2]); logitem_float(html_log_file, array_last_rel_error[2]); logditto(html_log_file); logitem_pole(html_log_file, array_type_pole[2]); if array_type_pole[2] = 1 or array_type_pole[2] = 2 then logitem_float(html_log_file, array_pole[1]); logitem_float(html_log_file, array_pole[2]); 0 else logitem_str(html_log_file, "NA"); logitem_str(html_log_file, "NA"); 0 end if; logditto(html_log_file); if glob_percent_done < 100.0 then logditto(html_log_file); 0 else logditto(html_log_file); 0 end if; logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logditto(html_log_file); logend(html_log_file) end if; if glob_html_log then fclose(html_log_file) end if end proc > mainprog(); ##############ECHO OF PROBLEM################# ##############temp/mtest6postode.ode################# diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1; diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1; ! #BEGIN FIRST INPUT BLOCK Digits := 32; max_terms:=30; ! #END FIRST INPUT BLOCK #BEGIN SECOND INPUT BLOCK # # was complicated.ode # t_start := 0.5; t_end := 5.0; array_x1_init[0 + 1] := exact_soln_x1(t_start); array_x1_init[1 + 1] := exact_soln_x1p(t_start); array_x2_init[0 + 1] := exact_soln_x2(t_start); array_x2_init[1 + 1] := exact_soln_x2p(t_start); glob_h := 0.00001 ; glob_look_poles := true; glob_max_iter := 10; #END SECOND INPUT BLOCK #BEGIN OVERRIDE BLOCK glob_h := 0.0001 ; glob_look_poles := true; glob_max_iter := 100; glob_max_minutes := 15; #END OVERRIDE BLOCK ! #BEGIN USER DEF BLOCK exact_soln_x1 := proc(t) local c1,c2,c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; 2.0 * c1 + 6.0 * c3 * exp(-t); end; exact_soln_x1p := proc(t) local c1,c2,c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; - 6.0 * c3 * exp(-t); end; exact_soln_x2 := proc(t) local c1,c2,c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; c1 + c2 * exp(2.0 * t) + c3 * exp(-t); end; exact_soln_x2p := proc(t) local c1,c2,c3; c1 := 1.0; c2 := 0.0002; c3 := 0.0003; 2.0 * c2 * exp(2.0 * t) - c3 * exp(-t); end; #END USER DEF BLOCK #######END OF ECHO OF PROBLEM################# START of Soultion t[1] = 0.5 x1[1] (analytic) = 2.001091755187482740162486839163 x1[1] (numeric) = 2.001091755187482740162486839163 absolute error = 0 relative error = 0 % h = 0.0001 x2[1] (analytic) = 1.0007256155636055990741531973548 x2[1] (numeric) = 1.0007256155636055990741531973548 absolute error = 0 relative error = 0 % h = 0.0001 t[1] = 0.5 x1[1] (analytic) = 2.001091755187482740162486839163 x1[1] (numeric) = 2.001091755187482740162486839163 absolute error = 0 relative error = 0 % h = 0.0001 x2[1] (analytic) = 1.0007256155636055990741531973548 x2[1] (numeric) = 1.0007256155636055990741531973548 absolute error = 0 relative error = 0 % h = 0.0001 TOP MAIN SOLVE Loop memory used=3.8MB, alloc=3.1MB, time=0.21 NO POLE NO POLE t[1] = 0.5001 x1[1] (analytic) = 2.0010916460174225858712352664712 x1[1] (numeric) = 2.001091646006505255470640983898 absolute error = 1.09173304005942825732e-11 relative error = 5.4556873606073863903748488926446e-10 % h = 0.0001 x2[1] (analytic) = 1.0007257061107425639459896605159 x2[1] (numeric) = 1.0007257061162020742151580693388 absolute error = 5.4595102691684088229e-12 relative error = 5.4555511423669245702936044230717e-10 % h = 0.0001 TOP MAIN SOLVE Loop memory used=7.6MB, alloc=4.4MB, time=0.48 memory used=11.4MB, alloc=4.4MB, time=0.76 NO POLE NO POLE t[1] = 0.5002 x1[1] (analytic) = 2.0010915368582788917633066026401 x1[1] (numeric) = 2.0010915368145916675299795643453 absolute error = 4.36872242333270382948e-11 relative error = 2.1831697065650550796183674704255e-09 % h = 0.0001 x2[1] (analytic) = 1.0007257966814495432344339416603 x2[1] (numeric) = 1.0007257967032906645626797694799 absolute error = 2.18411213282458278196e-11 relative error = 2.1825280612005928860442019527042e-09 % h = 0.0001 TOP MAIN SOLVE Loop memory used=15.2MB, alloc=4.4MB, time=1.03 NO POLE NO POLE t[1] = 0.5003 x1[1] (analytic) = 2.0010914277100505662472629969306 x1[1] (numeric) = 2.0010914276117408853032277932713 absolute error = 9.83096809440352036593e-11 relative error = 4.9128030625035413584519207841583e-09 % h = 0.0001 x2[1] (analytic) = 1.0007258872757307055634980331085 x2[1] (numeric) = 1.0007258873248799067876632386685 absolute error = 4.91492012241652055600e-11 relative error = 4.9113550322919838364022401174740e-09 % h = 0.0001 TOP MAIN SOLVE Loop memory used=19.0MB, alloc=4.4MB, time=1.30 memory used=22.8MB, alloc=4.5MB, time=1.58 NO POLE NO POLE t[1] = 0.5004 x1[1] (analytic) = 2.001091318572736517840820284614 x1[1] (numeric) = 2.0010913183979518176445775430023 absolute error = 1.747847001962427416117e-10 relative error = 8.7344689657095023289491022221377e-09 % h = 0.0001 x2[1] (analytic) = 1.0007259778935902204455844087623 x2[1] (numeric) = 1.0007259779809783394315848171717 absolute error = 8.73881189860004084094e-11 relative error = 8.7324723167416977908507146443463e-09 % h = 0.0001 TOP MAIN SOLVE Loop memory used=26.7MB, alloc=4.5MB, time=1.84 NO POLE NO POLE t[1] = 0.5005 x1[1] (analytic) = 2.001091209446335655170837072148 x1[1] (numeric) = 2.0010912091732233732996766117045 absolute error = 2.731122818711604604435e-10 relative error = 1.3648167588858955514853423353676e-08 % h = 0.0001 x2[1] (analytic) = 1.0007260685350322582816582620126 x2[1] (numeric) = 1.0007260686715945029068425367838 absolute error = 1.365622446251842747712e-10 relative error = 1.3646316301632714187506947314974e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=30.5MB, alloc=4.5MB, time=2.11 NO POLE NO POLE t[1] = 0.5006 x1[1] (analytic) = 2.0010911003308468869733038234462 x1[1] (numeric) = 2.0010910999375544609056179886155 absolute error = 3.932924260676858348307e-10 relative error = 1.9653899115470631069134819564991e-08 % h = 0.0001 x2[1] (analytic) = 1.0007261592000609903614197786446 x2[1] (numeric) = 1.0007261593967369394971464926269 absolute error = 1.966759491357267139823e-10 relative error = 1.9653323471921760806638407772079e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=34.3MB, alloc=4.5MB, time=2.38 memory used=38.1MB, alloc=4.5MB, time=2.67 NO POLE NO POLE t[1] = 0.5007 x1[1] (analytic) = 2.0010909912262691220933319472376 x1[1] (numeric) = 2.0010909906909439889909291182261 absolute error = 5.353251331024028290115e-10 relative error = 2.6751663739905971838031954100662e-08 % h = 0.0001 x2[1] (analytic) = 1.0007262498886805888634764447463 x2[1] (numeric) = 1.0007262501564141933579092946166 absolute error = 2.677336044944328498703e-10 relative error = 2.6753930410460919523106383485470e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=41.9MB, alloc=4.5MB, time=2.94 NO POLE NO POLE t[1] = 0.5008 x1[1] (analytic) = 2.0010908821326012694851428855176 x1[1] (numeric) = 2.001090881433390865975561163414 absolute error = 6.992104035095817221036e-10 relative error = 3.4941461667369133530238331006972e-08 % h = 0.0001 x2[1] (analytic) = 1.0007263406008952268555153896278 x2[1] (numeric) = 1.0007263409506348105166365986095 absolute error = 3.497395836611212089817e-10 relative error = 3.4948573798019236425347323071455e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=45.7MB, alloc=4.5MB, time=3.21 memory used=49.5MB, alloc=4.5MB, time=3.49 NO POLE NO POLE t[1] = 0.5009 x1[1] (analytic) = 2.0010907730498422382120572030903 x1[1] (numeric) = 2.0010907721648940001708782675271 absolute error = 8.849482380411789355632e-10 relative error = 4.4223293113906984991337531440920e-08 % h = 0.0001 x2[1] (analytic) = 1.0007264313367090782944757637584 x2[1] (numeric) = 1.0007264317794073388733177172481 absolute error = 4.426982605788419534897e-10 relative error = 4.4237690413304336301705945767196e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=53.4MB, alloc=4.5MB, time=3.77 NO POLE NO POLE t[1] = 0.501 x1[1] (analytic) = 2.001090663977990937446483678202 x1[1] (numeric) = 2.0010906628854522997796468154187 absolute error = 1.0925386376668368627833e-09 relative error = 5.4597158306409108583368010413427e-08 % h = 0.0001 x2[1] (analytic) = 1.0007265220961263180267211517279 x2[1] (numeric) = 1.00072652264274032820081631052 absolute error = 5.466140101740951587921e-10 relative error = 5.4621717132984041495124052030636e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=57.2MB, alloc=4.5MB, time=4.04 NO POLE NO POLE t[1] = 0.5011 x1[1] (analytic) = 2.0010905549170462764699083942649 x1[1] (numeric) = 2.0010905535950646728960246934323 absolute error = 1.3219816035738837008326e-09 relative error = 6.6063057482607800669582790087733e-08 % h = 0.0001 x2[1] (analytic) = 1.0007266128791511217882120202398 x2[1] (numeric) = 1.0007266135406423301452611560463 absolute error = 6.614912083570491358065e-10 relative error = 6.6101090931707995126859189806599e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=61.0MB, alloc=4.5MB, time=4.31 memory used=64.8MB, alloc=4.5MB, time=4.59 NO POLE NO POLE t[1] = 0.5012 x1[1] (analytic) = 2.0010904458670071646728838326719 x1[1] (numeric) = 2.0010904442937300275055505483374 absolute error = 1.5732771371673332843345e-09 relative error = 7.8620990891078072204379434751757e-08 % h = 0.0001 x2[1] (analytic) = 1.000726703685787666204678201143 x2[1] (numeric) = 1.0007267044731218982264369991164 absolute error = 7.873342320217587979734e-10 relative error = 7.8676248882129288690247064292639e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=68.6MB, alloc=4.5MB, time=4.86 NO POLE NO POLE t[1] = 0.5013 x1[1] (analytic) = 2.0010903368278725115550179667025 x1[1] (numeric) = 2.0010903349814472714851330452158 absolute error = 1.8464252400698849214867e-09 relative error = 9.2270958791237649428425665254899e-08 % h = 0.0001 x2[1] (analytic) = 1.0007267945160401287917914095088 x2[1] (numeric) = 1.0007267954401875878381754824849 absolute error = 9.241474590463840729761e-10 relative error = 9.2347628154926094015351682441506e-08 % h = 0.0001 TOP MAIN SOLVE Loop memory used=72.4MB, alloc=4.5MB, time=5.14 memory used=76.2MB, alloc=4.6MB, time=5.43 NO POLE NO POLE t[1] = 0.5014 x1[1] (analytic) = 2.0010902277996412267249633565185 x1[1] (numeric) = 2.0010902256582153126030401242979 absolute error = 2.1414259141219232322206e-09 relative error = 1.0701296145334697466894100604997e-07 % h = 0.0001 x2[1] (analytic) = 1.0007268853699126879553377967599 x2[1] (numeric) = 1.0007268864418479562487461559465 absolute error = 1.0719352682934083591866e-09 relative error = 1.0711566601882329960537718169916e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=80.1MB, alloc=4.6MB, time=5.73 NO POLE NO POLE t[1] = 0.5015 x1[1] (analytic) = 2.001090118782312219900406245251 x1[1] (numeric) = 2.0010901163240330585188882567491 absolute error = 2.4582791613815179885019e-09 relative error = 1.2284699915850920724520479796573e-07 % h = 0.0001 x2[1] (analytic) = 1.0007269762474095229913905388596 x2[1] (numeric) = 1.0007269774781115626012475657053 absolute error = 1.2307020396098570268457e-09 relative error = 1.2298079984061415134561534514462e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=83.9MB, alloc=4.6MB, time=6.02 NO POLE NO POLE t[1] = 0.5016 x1[1] (analytic) = 2.0010900097758844009080556561764 x1[1] (numeric) = 2.0010900069788994167836316994067 absolute error = 2.7969849841244239567697e-09 relative error = 1.3977307219867022447915602145759e-07 % h = 0.0001 x2[1] (analytic) = 1.0007270671485348140864824595667 x2[1] (numeric) = 1.0007270685489869679139984235543 absolute error = 1.4004521538275159639876e-09 relative error = 1.3994346708518189758591263271196e-07 % h = 0.0001 memory used=87.7MB, alloc=4.6MB, time=6.30 TOP MAIN SOLVE Loop memory used=91.5MB, alloc=4.6MB, time=6.59 NO POLE NO POLE t[1] = 0.5017 x1[1] (analytic) = 2.0010899007803566796836324909845 x1[1] (numeric) = 2.0010898976228132948395517484667 absolute error = 3.1575433848440807425178e-09 relative error = 1.5779118087661862281127020066184e-07 % h = 0.0001 x2[1] (analytic) = 1.000727158073292742317778688764 x2[1] (numeric) = 1.0007271596544827350809288558817 absolute error = 1.5811899927631501671177e-09 relative error = 1.5800410531552143859748065436125e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=95.3MB, alloc=4.6MB, time=6.87 NO POLE NO POLE t[1] = 0.5018 x1[1] (analytic) = 2.0010897917957279662718586291348 x1[1] (numeric) = 2.0010897882557736000202459921201 absolute error = 3.5399543662516126370147e-09 relative error = 1.7690132550598571902153885464191e-07 % h = 0.0001 x2[1] (analytic) = 1.0007272490216874896532493558668 x2[1] (numeric) = 1.0007272507946074288719717325198 absolute error = 1.7729199392187223766530e-09 relative error = 1.7716315219276098040494394022900e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=99.1MB, alloc=4.6MB, time=7.14 memory used=102.9MB, alloc=4.6MB, time=7.43 NO POLE NO POLE t[1] = 0.5019 x1[1] (analytic) = 2.0010896828219971708264460283046 x1[1] (numeric) = 2.0010896788777792395506175621395 absolute error = 3.9442179312758284661651e-09 relative error = 1.9710350641124555155569179053298e-07 % h = 0.0001 x2[1] (analytic) = 1.0007273399937232389518423183184 x2[1] (numeric) = 1.0007273419693696159334540754524 absolute error = 1.9756463769816117571340e-09 relative error = 1.9742104547618369299446887910379e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=106.8MB, alloc=4.6MB, time=7.71 NO POLE NO POLE t[1] = 0.502 x1[1] (analytic) = 2.0010895738591632036100858259251 x1[1] (numeric) = 2.0010895694888291205468643844151 absolute error = 4.3703340830632214415100e-09 relative error = 2.1839772392771488195651768845875e-07 % h = 0.0001 x2[1] (analytic) = 1.0007274309894041739636559251805 x2[1] (numeric) = 1.0007274331787778647884885473975 absolute error = 2.1893736908248326222170e-09 relative error = 2.1877822302324937289881767657499e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=110.6MB, alloc=4.6MB, time=8.01 NO POLE NO POLE memory used=114.4MB, alloc=4.6MB, time=8.30 t[1] = 0.5021 x1[1] (analytic) = 2.0010894649072249749944374418092 x1[1] (numeric) = 2.0010894600889221500164684284404 absolute error = 4.8183028249779690133688e-09 relative error = 2.4078397840155319640045325645955e-07 % h = 0.0001 x2[1] (analytic) = 1.0007275220087344793301118158238 x2[1] (numeric) = 1.0007275244228407458373650202804 absolute error = 2.4141062665072532044566e-09 relative error = 2.4123512278961611016026109876809e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=118.2MB, alloc=4.6MB, time=8.59 NO POLE NO POLE t[1] = 0.5022 x1[1] (analytic) = 2.0010893559661813954601176818676 x1[1] (numeric) = 2.0010893506780572348581849557472 absolute error = 5.2881241606019327261204e-09 relative error = 2.6426227018976270733929140787377e-07 % h = 0.0001 x2[1] (analytic) = 1.0007276130517183405841277537279 x2[1] (numeric) = 1.0007276157015668313579422236147 absolute error = 2.6498484907738144698868e-09 relative error = 2.6479218282916195967214384929129e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=122.0MB, alloc=4.6MB, time=8.88 NO POLE NO POLE t[1] = 0.5023 x1[1] (analytic) = 2.001089247036031375596689842915 x1[1] (numeric) = 2.0010892412562332818620317672906 absolute error = 5.7797980937346580756244e-09 relative error = 2.8883259966018835524706380188824e-07 % h = 0.0001 x2[1] (analytic) = 1.0007277041183599441502904953943 x2[1] (numeric) = 1.0007277070149646955060394728059 absolute error = 2.8966047513557489774116e-09 relative error = 2.8944984129400661690014622523950e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=125.8MB, alloc=4.6MB, time=9.17 memory used=129.7MB, alloc=4.6MB, time=9.47 NO POLE NO POLE t[1] = 0.5024 x1[1] (analytic) = 2.001089138116773826102652818566 x1[1] (numeric) = 2.0010891318234491977092784497824 absolute error = 6.2933246283933743687836e-09 relative error = 3.1449496719151781047215808520220e-07 % h = 0.0001 x2[1] (analytic) = 1.0007277952086634773450286943839 x2[1] (numeric) = 1.000727798363042914315828477395 absolute error = 3.1543794369707997830111e-09 relative error = 3.1520853643453309798379603428368e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=133.5MB, alloc=4.6MB, time=9.77 NO POLE NO POLE t[1] = 0.5025 x1[1] (analytic) = 2.0010890292084076577854302062196 x1[1] (numeric) = 2.0010890223797038889724356209744 absolute error = 6.8287037688129945852452e-09 relative error = 3.4124937317328147519454027610353e-07 % h = 0.0001 x2[1] (analytic) = 1.0007278863226331283767858404813 x2[1] (numeric) = 1.0007278897458100657002252292572 absolute error = 3.4231769373234393887759e-09 relative error = 3.4206870659940942421946424044487e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=137.3MB, alloc=4.6MB, time=10.05 memory used=141.1MB, alloc=4.6MB, time=10.34 NO POLE NO POLE t[1] = 0.5026 x1[1] (analytic) = 2.0010889203109317815613594151339 x1[1] (numeric) = 2.0010889129249962621152441738905 absolute error = 7.3859355194461152412434e-09 relative error = 3.6909581800585248548821758792195e-07 % h = 0.0001 x2[1] (analytic) = 1.0007279774602730863461932339965 x2[1] (numeric) = 1.0007279811632747294512819707725 absolute error = 3.7030016431050887367760e-09 relative error = 3.7003079023561031092541826593401e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=144.9MB, alloc=4.6MB, time=10.62 NO POLE NO POLE t[1] = 0.5027 x1[1] (analytic) = 2.0010888114243451084556807755893 x1[1] (numeric) = 2.0010888034593252234926645200078 absolute error = 7.9650198849630162555815e-09 relative error = 3.9803430210044671348884711395453e-07 % h = 0.0001 x2[1] (analytic) = 1.000728068621587541246242995209 x2[1] (numeric) = 1.0007280726154454872405792429842 absolute error = 3.9938579459943362477752e-09 relative error = 3.9909522588843886068998650736205e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=148.7MB, alloc=4.6MB, time=10.90 NO POLE NO POLE t[1] = 0.5028 x1[1] (analytic) = 2.0010887025486465496025266491408 x1[1] (numeric) = 2.0010886939826896793508658313869 absolute error = 8.5659568702516608177539e-09 relative error = 4.2806482587912276966651073327741e-07 % h = 0.0001 x2[1] (analytic) = 1.0007281598065806839624611089617 x2[1] (numeric) = 1.0007281641023309226196180137612 absolute error = 4.2957502386571569047995e-09 relative error = 4.2926245220154826100363778631386e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=152.5MB, alloc=4.6MB, time=11.18 memory used=156.4MB, alloc=4.6MB, time=11.66 NO POLE NO POLE t[1] = 0.5029 x1[1] (analytic) = 2.0010885936838350162449105399592 x1[1] (numeric) = 2.0010885844950885358272152817503 absolute error = 9.1887464804176952582089e-09 relative error = 4.5918738977478200520370158319263e-07 % h = 0.0001 x2[1] (analytic) = 1.0007282510152567062730805044118 x2[1] (numeric) = 1.0007282556239396210202118859809 absolute error = 4.6086829147471313815691e-09 relative error = 4.6053290791696348627588935418688e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=160.2MB, alloc=4.6MB, time=12.36 NO POLE NO POLE t[1] = 0.503 x1[1] (analytic) = 2.0010884848299094197347162072617 x1[1] (numeric) = 2.0010884749965206989502672865103 absolute error = 9.8333887207844489207514e-09 relative error = 4.9140199423116851447847749296013e-07 % h = 0.0001 x2[1] (analytic) = 1.0007283422476198008492141699459 x2[1] (numeric) = 1.0007283471802801697548793857478 absolute error = 4.9326603689056652158019e-09 relative error = 4.9290703187510300423778717479047e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=164.0MB, alloc=4.6MB, time=13.06 memory used=167.8MB, alloc=4.6MB, time=13.78 NO POLE NO POLE t[1] = 0.5031 x1[1] (analytic) = 2.0010883759868686715326867788304 x1[1] (numeric) = 2.0010883654869850746397527417449 absolute error = 1.04998835968929340370855e-08 relative error = 5.2470863970286913765278174889696e-07 % h = 0.0001 x2[1] (analytic) = 1.0007284335036741612550283032656 x2[1] (numeric) = 1.0007284387713611580172363306651 absolute error = 5.2676869967622080273995e-09 relative error = 5.2638526301480048673101196253578e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=171.6MB, alloc=4.6MB, time=14.49 NO POLE NO POLE t[1] = 0.5032 x1[1] (analytic) = 2.0010882671547116832084138656195 x1[1] (numeric) = 2.0010882559664805687065682621227 absolute error = 1.11882311145018456034968e-08 relative error = 5.5910732665531346336592156629025e-07 % h = 0.0001 x2[1] (analytic) = 1.0007285247834239819479154966509 x2[1] (numeric) = 1.0007285303971911768823882781747 absolute error = 5.6137671949344727815238e-09 relative error = 5.6096804037332652488437464491261e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=175.4MB, alloc=4.6MB, time=15.20 NO POLE NO POLE t[1] = 0.5033 x1[1] (analytic) = 2.0010881583334373664403266774516 x1[1] (numeric) = 2.0010881464350060868527654177757 absolute error = 1.18984312795875612596759e-08 relative error = 5.9459805556477383153327959727089e-07 % h = 0.0001 x2[1] (analytic) = 1.0007286160868734582786679574086 x2[1] (numeric) = 1.000728622057778819307323053982 absolute error = 5.9709053610286550965734e-09 relative error = 5.9665580308641034867857481781177e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=179.2MB, alloc=4.6MB, time=15.90 memory used=183.1MB, alloc=4.6MB, time=16.62 NO POLE NO POLE t[1] = 0.5034 x1[1] (analytic) = 2.0010880495230446330156811398021 x1[1] (numeric) = 2.0010880368925605346715399701205 absolute error = 1.26304840983441411696816e-08 relative error = 6.3118082691836533625018388531378e-07 % h = 0.0001 x2[1] (analytic) = 1.0007287074140267864916507635123 x2[1] (numeric) = 1.0007287137531326801313033605818 absolute error = 6.3391058936396525970695e-09 relative error = 6.3344899038826155090014570570618e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=186.9MB, alloc=4.6MB, time=17.33 NO POLE NO POLE t[1] = 0.5035 x1[1] (analytic) = 2.0010879407235323948305490116711 x1[1] (numeric) = 2.0010879273391428176472211066282 absolute error = 1.33843895771833279050429e-08 relative error = 6.6885564121404582880089166061388e-07 % h = 0.0001 x2[1] (analytic) = 1.0007287987648881637249751544417 x2[1] (numeric) = 1.0007288054832613560762594659013 absolute error = 6.7183731923512843114596e-09 relative error = 6.7134804161159181548536922047892e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=190.7MB, alloc=4.6MB, time=18.04 memory used=194.5MB, alloc=4.6MB, time=18.76 NO POLE NO POLE t[1] = 0.5036 x1[1] (analytic) = 2.0010878319348995638898070045447 x1[1] (numeric) = 2.0010878177747518411552606745417 absolute error = 1.41601477227345463300030e-08 relative error = 7.0762249896061592077284725905169e-07 % h = 0.0001 x2[1] (analytic) = 1.0007288901394617880106718572265 x2[1] (numeric) = 1.0007288972481734457471819720763 absolute error = 7.1087116577365101148498e-09 relative error = 7.1035339618763665025519451050984e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=198.3MB, alloc=4.6MB, time=19.48 NO POLE NO POLE t[1] = 0.5037 x1[1] (analytic) = 2.0010877231571450523071259024436 x1[1] (numeric) = 2.0010877081993865104622224135413 absolute error = 1.49577585418449034889023e-08 relative error = 7.4748140067771898727606461596395e-07 % h = 0.0001 x2[1] (analytic) = 1.0007289815377518582748644477049 x2[1] (numeric) = 1.0007289890478775496325146643772 absolute error = 7.5101256913576502166723e-09 relative error = 7.5046549364617712404177367729975e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=202.1MB, alloc=4.6MB, time=20.19 NO POLE NO POLE t[1] = 0.5038 x1[1] (analytic) = 2.0010876143902677723049596830596 x1[1] (numeric) = 2.0010875986130457307257711873582 absolute error = 1.57772220415791884957014e-08 relative error = 7.8843234689584117026768467709404e-07 % h = 0.0001 x2[1] (analytic) = 1.0007290729597625743379427469999 x2[1] (numeric) = 1.0007290808823822701045474403005 absolute error = 7.9226196957666046933006e-09 relative error = 7.9168477361556160820781788709467e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=205.9MB, alloc=4.6MB, time=20.90 memory used=209.8MB, alloc=4.6MB, time=21.62 NO POLE NO POLE t[1] = 0.5039 x1[1] (analytic) = 2.0010875056342666362145346399805 x1[1] (numeric) = 2.0010874890157284069946622143361 absolute error = 1.66185382292198724256444e-08 relative error = 8.3047533815631138198172308806550e-07 % h = 0.0001 x2[1] (analytic) = 1.0007291644054981369147362532235 x2[1] (numeric) = 1.0007291727516962114198093188421 absolute error = 8.3461980745050730656186e-09 relative error = 8.3401167582272752255934754358728e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=213.6MB, alloc=4.6MB, time=22.33 NO POLE NO POLE t[1] = 0.504 x1[1] (analytic) = 2.0010873968891405564758385060019 x1[1] (numeric) = 2.0010873794074334442087302969396 absolute error = 1.74817071122671082090623e-08 relative error = 8.7361037501130130846399853724113e-07 % h = 0.0001 x2[1] (analytic) = 1.0007292558749627476146876084142 x2[1] (numeric) = 1.000729264655827979719461529969 absolute error = 8.7808652321047739215548e-09 relative error = 8.7744664009322308565290980344462e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=217.4MB, alloc=4.6MB, time=23.04 memory used=221.2MB, alloc=4.6MB, time=23.76 NO POLE NO POLE t[1] = 0.5041 x1[1] (analytic) = 2.0010872881548884456376095775276 x1[1] (numeric) = 2.0010872697881597471988790502113 absolute error = 1.83667286984387305273163e-08 relative error = 9.1783745802382541321223212675093e-07 % h = 0.0001 x2[1] (analytic) = 1.0007293473681606089420261007159 x2[1] (numeric) = 1.0007293565947861830296906843049 absolute error = 9.2266255740876645835890e-09 relative error = 9.2199010635122906949795697301727e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=225.0MB, alloc=4.6MB, time=24.50 NO POLE NO POLE t[1] = 0.5042 x1[1] (analytic) = 2.0010871794315092163573258400565 x1[1] (numeric) = 2.0010871601579062206870701291755 absolute error = 1.92736029956702557108810e-08 relative error = 9.6315658776774094092131814096335e-07 % h = 0.0001 x2[1] (analytic) = 1.0007294388850959242959412018029 x2[1] (numeric) = 1.0007294485685794312621020230465 absolute error = 9.6834835069661608212436e-09 relative error = 9.6764251461958055865554896192854e-07 % h = 0.0001 TOP MAIN SOLVE Loop memory used=228.8MB, alloc=4.6MB, time=25.25 NO POLE NO POLE t[1] = 0.5043 x1[1] (analytic) = 2.0010870707190017814011940947576 x1[1] (numeric) = 2.0010870505166717692863124551899 absolute error = 2.02023300121148816395677e-08 relative error = 1.0095677648277479213337765761664e-06 % h = 0.0001 x2[1] (analytic) = 1.0007295304257728979707561395621 x2[1] (numeric) = 1.0007295405772163362141127481263 memory used=232.7MB, alloc=4.6MB, time=26.00 absolute error = 1.01514434382433566085642e-08 relative error = 1.0144043050197887137338034882707e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=236.5MB, alloc=4.6MB, time=26.77 NO POLE NO POLE t[1] = 0.5044 x1[1] (analytic) = 2.001086962017365053644139086132 x1[1] (numeric) = 2.0010869408644552975006514412442 absolute error = 2.11529097561434876448878e-08 relative error = 1.0570709897993891731953878005897e-06 % h = 0.0001 x2[1] (analytic) = 1.000729621990195735156101506034 x2[1] (numeric) = 1.0007296326207055115693454326386 absolute error = 1.06305097764132439266046e-08 relative error = 1.0622759177720625392815569519974e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=240.3MB, alloc=4.6MB, time=27.50 NO POLE NO POLE t[1] = 0.5045 x1[1] (analytic) = 2.0010868533265979460697926307621 x1[1] (numeric) = 2.001086831201255709725158216206 absolute error = 2.21253422363446344145561e-08 relative error = 1.1056662632890503083159997192553e-06 % h = 0.0001 x2[1] (analytic) = 1.0007297135783686419370889006249 x2[1] (numeric) = 1.0007297246990555728980215115441 absolute error = 1.11206869309609326109192e-08 relative error = 1.1112577931953306560804897547404e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=244.1MB, alloc=4.6MB, time=28.22 memory used=247.9MB, alloc=4.6MB, time=28.94 NO POLE NO POLE t[1] = 0.5046 x1[1] (analytic) = 2.0010867446466993717704827471482 x1[1] (numeric) = 2.001086721527071910245918848014 absolute error = 2.31196274615245638991342e-08 relative error = 1.1553535859139597357355178072071e-06 % h = 0.0001 x2[1] (analytic) = 1.0007298051902958252944846085935 x2[1] (numeric) = 1.00072981681227513765735485267 absolute error = 1.16219793123628702440765e-08 relative error = 1.1613503717072630778370390441792e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=251.7MB, alloc=4.6MB, time=29.65 NO POLE NO POLE t[1] = 0.5047 x1[1] (analytic) = 2.0010866359776682439472227866313 x1[1] (numeric) = 2.0010866118419028032400235658178 absolute error = 2.41357654407071992208135e-08 relative error = 1.2061329583021886659950533936034e-06 % h = 0.0001 x2[1] (analytic) = 1.0007298968259814931048833148203 x2[1] (numeric) = 1.0007299089603728251919454080219 absolute error = 1.21343913320870620932016e-08 relative error = 1.2125540938242929922748422635434e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=255.5MB, alloc=4.6MB, time=30.37 NO POLE NO POLE memory used=259.4MB, alloc=4.6MB, time=31.08 t[1] = 0.5048 x1[1] (analytic) = 2.0010865273195034759097005654036 x1[1] (numeric) = 2.001086502145747292775555981065 absolute error = 2.51737561831341445843386e-08 relative error = 1.2580043810926511155132705437833e-06 % h = 0.0001 x2[1] (analytic) = 1.0007299884854298541408818528671 x2[1] (numeric) = 1.0007300011433572567341729454229 absolute error = 1.26579274025932910925558e-08 relative error = 1.2648694001616385466284748520794e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=263.2MB, alloc=4.6MB, time=31.78 NO POLE NO POLE t[1] = 0.5049 x1[1] (analytic) = 2.0010864186722039810762674976051 x1[1] (numeric) = 2.0010863924386042828115823075348 absolute error = 2.62335996982646851900703e-08 relative error = 1.3109678549351039110678919297901e-06 % h = 0.0001 x2[1] (analytic) = 1.0007300801686451180712529893331 x2[1] (numeric) = 1.0007300933612370554045908604969 absolute error = 1.31925919373333378711638e-08 relative error = 1.3182967314333246375394852470380e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=267.0MB, alloc=4.6MB, time=32.49 NO POLE NO POLE t[1] = 0.505 x1[1] (analytic) = 2.0010863100357686729739277295073 x1[1] (numeric) = 2.0010862827204726771981405803184 absolute error = 2.73152959957757871491889e-08 relative error = 1.3650233804901466943823990390358e-06 % h = 0.0001 x2[1] (analytic) = 1.0007301718756314954611192435145 x2[1] (numeric) = 1.0007301856140208462123200690121 absolute error = 1.37383893507512008254976e-08 relative error = 1.3728365284522047053555904195223e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=270.8MB, alloc=4.6MB, time=33.20 memory used=274.6MB, alloc=4.6MB, time=33.93 NO POLE NO POLE t[1] = 0.5051 x1[1] (analytic) = 2.0010862014101964652383272747832 x1[1] (numeric) = 2.001086172991351379676229873746 absolute error = 2.84188450855620974010372e-08 relative error = 1.4201709584292219268178971060078e-06 % h = 0.0001 x2[1] (analytic) = 1.0007302636063931977721267423749 x2[1] (numeric) = 1.0007302779017172560554429796008 absolute error = 1.42953240582833162372259e-08 relative error = 1.4284892321299825328338651781520e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=278.4MB, alloc=4.6MB, time=34.66 NO POLE NO POLE t[1] = 0.5052 x1[1] (analytic) = 2.0010860927954862716137431508637 x1[1] (numeric) = 2.0010860632512392938777995182601 absolute error = 2.95442469777359436326036e-08 relative error = 1.4764105894346148941701651247034e-06 % h = 0.0001 x2[1] (analytic) = 1.0007303553609344373626191108334 x2[1] (numeric) = 1.0007303702243349137213975468718 absolute error = 1.48634004763587784360384e-08 relative error = 1.4852552834772340482488184104528e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=282.2MB, alloc=4.6MB, time=35.40 memory used=286.1MB, alloc=4.6MB, time=36.14 NO POLE NO POLE t[1] = 0.5053 x1[1] (analytic) = 2.0010859841916370059530725163803 x1[1] (numeric) = 2.0010859535001353233257383162358 absolute error = 3.06915016826273342001445e-08 relative error = 1.5337422741994537115718513319656e-06 % h = 0.0001 x2[1] (analytic) = 1.0007304471392594274878113973781 x2[1] (numeric) = 1.0007304625818824498873714049317 absolute error = 1.54426230223995600075536e-08 relative error = 1.5431351236034291329061694699573e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=289.9MB, alloc=4.6MB, time=36.85 NO POLE NO POLE t[1] = 0.5054 x1[1] (analytic) = 2.0010858755986475822178218096944 x1[1] (numeric) = 2.0010858437380383714338637567464 absolute error = 3.18606092107839580529480e-08 relative error = 1.5921660134277093284999144758422e-06 % h = 0.0001 x2[1] (analytic) = 1.0007305389413723822999640350102 x2[1] (numeric) = 1.0007305549743684971206960813312 absolute error = 1.60329961148207320463210e-08 relative error = 1.6021291937169534330633677288452e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=293.7MB, alloc=4.6MB, time=37.55 NO POLE NO POLE t[1] = 0.5055 x1[1] (analytic) = 2.0010857670165169144780958885117 x1[1] (numeric) = 2.0010857339649473415069112292761 absolute error = 3.30515695729711846592356e-08 relative error = 1.6516818078341955338881463268398e-06 % h = 0.0001 x2[1] (analytic) = 1.000730630767277516848556837528 x2[1] (numeric) = 1.0007306474018016898792412914528 absolute error = 1.66345241730306844539248e-08 relative error = 1.6622379351251301762575185729407e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=297.5MB, alloc=4.6MB, time=38.24 memory used=301.3MB, alloc=4.6MB, time=38.96 NO POLE NO POLE t[1] = 0.5056 x1[1] (analytic) = 2.001085658445243916912587170584 x1[1] (numeric) = 2.0010856241808611367405232363783 absolute error = 3.42643827801720639342057e-08 relative error = 1.7122896581445689613449656972017e-06 % h = 0.0001 x2[1] (analytic) = 1.0007307226169790470804630311551 x2[1] (numeric) = 1.0007307398641906645118093133561 absolute error = 1.72472116174313462822010e-08 relative error = 1.7234617892342419920418587452348e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=305.1MB, alloc=4.6MB, time=39.68 NO POLE NO POLE t[1] = 0.5057 x1[1] (analytic) = 2.0010855498848275038085647754956 x1[1] (numeric) = 2.0010855143857786602212386052799 absolute error = 3.54990488435873261702157e-08 relative error = 1.7739895650953290944763244232186e-06 % h = 0.0001 x2[1] (analytic) = 1.0007308144904811898401233215242 x2[1] (numeric) = 1.0007308323615440592585294430967 absolute error = 1.78710628694184061215725e-08 relative error = 1.7858011975495527371311944566608e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=308.9MB, alloc=4.6MB, time=40.39 memory used=312.8MB, alloc=4.6MB, time=41.11 NO POLE NO POLE t[1] = 0.5058 x1[1] (analytic) = 2.001085441335266589561863667536 x1[1] (numeric) = 2.0010854045796988149264816984319 absolute error = 3.67555677746353819691041e-08 relative error = 1.8367815294338182723137956406757e-06 % h = 0.0001 x2[1] (analytic) = 1.0007309063877881628697199960171 x2[1] (numeric) = 1.0007309248938705142512525305355 absolute error = 1.85060823513815325345184e-08 relative error = 1.8492566016753293249578748156362e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=316.6MB, alloc=4.6MB, time=41.81 NO POLE NO POLE t[1] = 0.5059 x1[1] (analytic) = 2.0010853327965600886768737996586 x1[1] (numeric) = 2.0010852947626205037245516230051 absolute error = 3.80339395849523221766535e-08 relative error = 1.9006655519182216948478896970603e-06 % h = 0.0001 x2[1] (analytic) = 1.0007309983089041848093510614748 x2[1] (numeric) = 1.000731017461178671513945595654 absolute error = 1.91522744867045945341792e-08 relative error = 1.9138284433148635596384241661724e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=320.4MB, alloc=4.6MB, time=42.52 NO POLE NO POLE t[1] = 0.506 x1[1] (analytic) = 2.0010852242687069157665292585244 x1[1] (numeric) = 2.0010851849345426293746114393322 absolute error = 3.93341642863919178191922e-08 relative error = 1.9656416333175674286664831308689e-06 % h = 0.0001 x2[1] (analytic) = 1.0007310902538334751972044172794 x2[1] (numeric) = 1.0007311100634771749630865253922 absolute error = 1.98096436997658821081128e-08 relative error = 1.9795171642704939743522759402319e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=324.2MB, alloc=4.6MB, time=43.22 memory used=328.0MB, alloc=4.6MB, time=43.98 NO POLE NO POLE t[1] = 0.5061 x1[1] (analytic) = 2.001085115751705985552297410631 x1[1] (numeric) = 2.001085075095464094526677368295 absolute error = 4.06562418910256200423360e-08 relative error = 2.0317097744117264126984410424894e-06 % h = 0.0001 x2[1] (analytic) = 1.0007311822225802544697320638176 x2[1] (numeric) = 1.0007312027007746704080588510256 absolute error = 2.04781944159383267872080e-08 relative error = 2.0463232064436276741332312083480e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=331.8MB, alloc=4.6MB, time=44.70 NO POLE NO POLE t[1] = 0.5062 x1[1] (analytic) = 2.0010850072455562128641680495278 x1[1] (numeric) = 2.0010849652453838017216079976571 absolute error = 4.20001724111425600518707e-08 relative error = 2.0988699759914124640624582109171e-06 % h = 0.0001 x2[1] (analytic) = 1.0007312742151487439618243463322 x2[1] (numeric) = 1.0007312953730798055515466060969 absolute error = 2.11579310615897222597647e-08 relative error = 2.1142470118347621830745149096488e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=335.7MB, alloc=4.6MB, time=45.41 memory used=339.5MB, alloc=4.6MB, time=46.15 NO POLE NO POLE t[1] = 0.5063 x1[1] (analytic) = 2.0010848987502565126406425441156 x1[1] (numeric) = 2.0010848553843006533910934873425 absolute error = 4.33659558592495490567731e-08 relative error = 2.1671222388581822840210093836901e-06 % h = 0.0001 x2[1] (analytic) = 1.0007313662315431659069842341678 x2[1] (numeric) = 1.0007313880804012299899292649194 absolute error = 2.18488580640829450307516e-08 relative error = 2.1832890225435072959484626051153e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=343.3MB, alloc=4.6MB, time=46.84 NO POLE NO POLE t[1] = 0.5064 x1[1] (analytic) = 2.0010847902658057999287229880316 x1[1] (numeric) = 2.0010847455122135518576447736587 absolute error = 4.47535922480710782143729e-08 relative error = 2.2364665638244354640395290426295e-06 % h = 0.0001 x2[1] (analytic) = 1.0007314582717677434375016354202 x2[1] (numeric) = 1.0007314808227475952136767616677 absolute error = 2.25509798517761751262475e-08 relative error = 2.2534496807686069342414009209189e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=347.1MB, alloc=4.6MB, time=47.55 NO POLE NO POLE t[1] = 0.5065 x1[1] (analytic) = 2.0010846817922029898839013501196 x1[1] (numeric) = 2.0010846356291213993345827724656 absolute error = 4.61630815905493185776540e-08 relative error = 2.3069029517134144919507460536431e-06 % h = 0.0001 x2[1] (analytic) = 1.0007315503358267005846277469922 x2[1] (numeric) = 1.0007315736001275546077445900726 absolute error = 2.32643008540231168430804e-08 relative error = 2.3247294288079610066050942364040e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=350.9MB, alloc=4.6MB, time=48.27 memory used=354.7MB, alloc=4.6MB, time=48.99 NO POLE NO POLE t[1] = 0.5066 x1[1] (analytic) = 2.0010845733294469977701486259847 x1[1] (numeric) = 2.0010845257350230979260275812894 absolute error = 4.75944238998441210446953e-08 relative error = 2.3784314033592047582241785653899e-06 % h = 0.0001 x2[1] (analytic) = 1.0007316424237242622787494400674 x2[1] (numeric) = 1.0007316664125497634519689837359 absolute error = 2.39888255011732195436685e-08 relative error = 2.3971287090586472737251208889055e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=358.5MB, alloc=4.6MB, time=49.70 NO POLE NO POLE t[1] = 0.5067 x1[1] (analytic) = 2.0010844648775367389599039906329 x1[1] (numeric) = 2.001084415829917549626887680381 absolute error = 4.90476191893330163102519e-08 relative error = 2.4510519196067345623408344998538e-06 % h = 0.0001 x2[1] (analytic) = 1.0007317345354646543495636810068 x2[1] (numeric) = 1.000731759260022878921462177082 absolute error = 2.47245582245718984960752e-08 relative error = 2.4706479640169432176073415626016e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=362.4MB, alloc=4.6MB, time=50.39 memory used=366.2MB, alloc=4.6MB, time=51.12 NO POLE NO POLE t[1] = 0.5068 x1[1] (analytic) = 2.0010843564364711289340639521961 x1[1] (numeric) = 2.00108430591380365632284913272 absolute error = 5.05226674726112148194761e-08 relative error = 2.5247645013117751192730880184588e-06 % h = 0.0001 x2[1] (analytic) = 1.0007318266710521035262519876743 x2[1] (numeric) = 1.0007318521425555600870077469617 absolute error = 2.54715034565607557592874e-08 relative error = 2.5452876362783479152833427127251e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=370.0MB, alloc=4.6MB, time=51.83 NO POLE NO POLE t[1] = 0.5069 x1[1] (analytic) = 2.0010842480062490832819715067401 x1[1] (numeric) = 2.0010841959866803197903647829629 absolute error = 5.20195687634916067237772e-08 relative error = 2.5995691493409405660696823581162e-06 % h = 0.0001 x2[1] (analytic) = 1.0007319188304908374376549212004 x2[1] (numeric) = 1.0007319450601564679154560349255 absolute error = 2.62296656304778011137251e-08 relative error = 2.6210481685376039169356079510855e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=373.8MB, alloc=4.6MB, time=52.55 NO POLE NO POLE t[1] = 0.507 x1[1] (analytic) = 2.0010841395868695177014052941589 x1[1] (numeric) = 2.0010840860485464416966434553363 absolute error = 5.35383230760047618388226e-08 relative error = 2.6754658645716879685459843366800e-06 % h = 0.0001 x2[1] (analytic) = 1.00073201101378508461244661319 x2[1] (numeric) = 1.0007320380128342652701196501819 absolute error = 2.69990491806576730369919e-08 relative error = 2.6979300035887191284433301814709e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=377.6MB, alloc=4.6MB, time=53.23 memory used=381.4MB, alloc=4.6MB, time=53.94 NO POLE NO POLE t[1] = 0.5071 x1[1] (analytic) = 2.0010840311783313479985687551521 x1[1] (numeric) = 2.0010839760994009235996391504746 absolute error = 5.50789304243989296046775e-08 relative error = 2.7524546478923173280793559681221e-06 % h = 0.0001 x2[1] (analytic) = 1.0007321032209390744793093283805 x2[1] (numeric) = 1.0007321310005976169111690532574 absolute error = 2.77796585424318597248769e-08 relative error = 2.7759335843249886983498671871771e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=385.2MB, alloc=4.6MB, time=54.68 NO POLE NO POLE t[1] = 0.5072 x1[1] (analytic) = 2.0010839227806334900880792892867 x1[1] (numeric) = 2.0010838661392426669480402412021 absolute error = 5.66413908231400390480846e-08 relative error = 2.8305355002019715885097135165640e-06 % h = 0.0001 x2[1] (analytic) = 1.0007321954519570373671080627591 x2[1] (numeric) = 1.0007322240234551894960282203746 absolute error = 2.85714981521289201576155e-08 relative error = 2.8550593537390169092525435718474e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=389.1MB, alloc=4.6MB, time=55.40 memory used=392.9MB, alloc=4.6MB, time=56.15 NO POLE NO POLE t[1] = 0.5073 x1[1] (analytic) = 2.0010838143937748599929574141438 x1[1] (numeric) = 2.0010837561680705730812586672595 absolute error = 5.82257042869116987468843e-08 relative error = 2.9097084224106366431452993426271e-06 % h = 0.0001 x2[1] (analytic) = 1.0007322877068432045050651771445 x2[1] (numeric) = 1.000732317081415651579770388564 absolute error = 2.93745724470747052114195e-08 relative error = 2.9353077549227390736157917222628e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=396.7MB, alloc=4.6MB, time=56.87 NO POLE NO POLE t[1] = 0.5074 x1[1] (analytic) = 2.0010837060177543738446159255482 x1[1] (numeric) = 2.001083646185883543229419128975 absolute error = 5.98318708306151967965732e-08 relative error = 2.9899734154391413418735569686214e-06 % h = 0.0001 x2[1] (analytic) = 1.0007323799856018080229350662418 x2[1] (numeric) = 1.0007324101744876736155138815267 absolute error = 3.01888858655925788152849e-08 relative error = 3.0166792310674434340084245875178e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=400.5MB, alloc=4.6MB, time=57.57 NO POLE NO POLE memory used=404.3MB, alloc=4.6MB, time=58.31 t[1] = 0.5075 x1[1] (analytic) = 2.001083597652570947882849058883 x1[1] (numeric) = 2.0010835361926804785133482798789 absolute error = 6.14598904693695007790041e-08 relative error = 3.0713304802191574983772696427543e-06 % h = 0.0001 x2[1] (analytic) = 1.0007324722882370809511788631756 x2[1] (numeric) = 1.0007325033026799279548180162636 absolute error = 3.10144428470036391530880e-08 relative error = 3.0991742254637930677660528875724e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=408.1MB, alloc=4.6MB, time=59.03 NO POLE NO POLE t[1] = 0.5076 x1[1] (analytic) = 2.0010834892982234984558216514875 x1[1] (numeric) = 2.001083426188460279944563918263 absolute error = 6.31097632185112577332245e-08 relative error = 3.1537796176931998974558128503967e-06 % h = 0.0001 x2[1] (analytic) = 1.0007325646147532572211391795107 x2[1] (numeric) = 1.0007325964660010888480790904882 absolute error = 3.18512478316269399109775e-08 relative error = 3.1827931815018477960793695558531e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=411.9MB, alloc=4.6MB, time=59.75 NO POLE NO POLE t[1] = 0.5077 x1[1] (analytic) = 2.0010833809547109420200583061384 x1[1] (numeric) = 2.0010833161732218484252641776835 absolute error = 6.47814890935947941284549e-08 relative error = 3.2373208288146263024515861039013e-06 % h = 0.0001 x2[1] (analytic) = 1.0007326569651545716652148807651 x2[1] (numeric) = 1.000732689664459832444926450838 absolute error = 3.26993052607797115700729e-08 relative error = 3.2675365426710860975092840098403e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=415.8MB, alloc=4.6MB, time=60.49 memory used=419.6MB, alloc=4.6MB, time=61.23 NO POLE NO POLE t[1] = 0.5078 x1[1] (analytic) = 2.0010832726220321951404325556154 x1[1] (numeric) = 2.001083206146964084748316716408 absolute error = 6.64750681103921158392074e-08 relative error = 3.3219541145476374627816493640744e-06 % h = 0.0001 x2[1] (analytic) = 1.0007327493394452600170358974238 x2[1] (numeric) = 1.0007327828980648367946186419025 absolute error = 3.35586195767775827444787e-08 relative error = 3.3534047525604270259298088815590e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=423.4MB, alloc=4.6MB, time=61.97 NO POLE NO POLE t[1] = 0.5079 x1[1] (analytic) = 2.0010831643001861744901560283501 x1[1] (numeric) = 2.0010830961096858895972479058062 absolute error = 6.81905002848929081225439e-08 relative error = 3.4076794758672771215745294788236e-06 % h = 0.0001 x2[1] (analytic) = 1.0007328417376295589116380714609 x2[1] (numeric) = 1.0007328761668247818464396360824 absolute error = 3.44291952229348015646215e-08 relative error = 3.4403982548582521328993619950966e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=427.2MB, alloc=4.6MB, time=62.71 memory used=431.0MB, alloc=4.6MB, time=63.58 NO POLE NO POLE t[1] = 0.508 x1[1] (analytic) = 2.0010830559891717968507676151575 x1[1] (numeric) = 2.0010829860613861635462320176843 absolute error = 6.99277856333045355974732e-08 relative error = 3.4944969137594320234121620244129e-06 % h = 0.0001 x2[1] (analytic) = 1.0007329341597117058856380383748 x2[1] (numeric) = 1.000732969470748349450095144298 absolute error = 3.53110366435644571059232e-08 relative error = 3.5285174933524273944617559111510e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=434.8MB, alloc=4.6MB, time=64.32 NO POLE NO POLE t[1] = 0.5081 x1[1] (analytic) = 2.0010829476889879791121226370521 x1[1] (numeric) = 2.0010828760020638070600804105629 absolute error = 7.16869241720520422264892e-08 relative error = 3.5824064292208319221770788561939e-06 % h = 0.0001 x2[1] (analytic) = 1.0007330266056959393774081447462 x2[1] (numeric) = 1.0007330628098442233561090075617 absolute error = 3.62041482839787008628155e-08 relative error = 3.6177629119303251423773479237501e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=438.6MB, alloc=4.6MB, time=65.04 NO POLE NO POLE t[1] = 0.5082 x1[1] (analytic) = 2.0010828393996336382723820141458 x1[1] (numeric) = 2.0010827659317177204942307148985 absolute error = 7.34679159177781512992473e-08 relative error = 3.6714080232590495890046968136521e-06 % h = 0.0001 x2[1] (analytic) = 1.0007331190755864987272514013242 x2[1] (numeric) = 1.0007331561841210892162196694315 absolute error = 3.71085345904889682681073e-08 relative error = 3.7081349545788459997854629051986e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=442.5MB, alloc=4.6MB, time=65.74 memory used=446.3MB, alloc=4.6MB, time=66.48 NO POLE NO POLE t[1] = 0.5083 x1[1] (analytic) = 2.00108273112110769143800143563 x1[1] (numeric) = 2.0010826558503468040947360172484 absolute error = 7.52707608873432654183816e-08 relative error = 3.7615016968925008203408378756677e-06 % h = 0.0001 x2[1] (analytic) = 1.0007332115693876241775764716484 x2[1] (numeric) = 1.0007332495935876345837767293623 absolute error = 3.80242000104062002577139e-08 relative error = 3.7996340653844408212989315723888e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=450.1MB, alloc=4.6MB, time=67.20 NO POLE NO POLE t[1] = 0.5084 x1[1] (analytic) = 2.0010826228534090558237205308397 x1[1] (numeric) = 2.0010825457579499579982540433786 absolute error = 7.70954590978254664874611e-08 relative error = 3.8526874511504444461043911809050e-06 % h = 0.0001 x2[1] (analytic) = 1.0007333040871035568730726962129 x2[1] (numeric) = 1.0007333430382525489141375769705 absolute error = 3.89511489920410648807576e-08 relative error = 3.8922606885331326375316566757833e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=453.9MB, alloc=4.6MB, time=67.93 memory used=457.7MB, alloc=4.6MB, time=68.66 NO POLE NO POLE t[1] = 0.5085 x1[1] (analytic) = 2.0010825145965366487525520414014 x1[1] (numeric) = 2.0010824356545260822320363403151 absolute error = 7.89420105665205157010863e-08 relative error = 3.9449652870729823379551872415735e-06 % h = 0.0001 x2[1] (analytic) = 1.0007333966287385388608851521817 x2[1] (numeric) = 1.0007334365181245235650641072287 absolute error = 3.98893859847041789550470e-08 relative error = 3.9860152683105386040598897603221e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=461.5MB, alloc=4.6MB, time=69.36 NO POLE NO POLE t[1] = 0.5086 x1[1] (analytic) = 2.0010824063504893876557709944627 x1[1] (numeric) = 2.0010823255400740767139174573385 absolute error = 8.08104153109418535371242e-08 relative error = 4.0383352057110594176669847707204e-06 % h = 0.0001 x2[1] (analytic) = 1.0007334891942968130907897486592 x2[1] (numeric) = 1.000733530033212251797119516607 absolute error = 4.08389154387063297679478e-08 relative error = 4.0808982491018919548184507239656e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=465.4MB, alloc=4.6MB, time=70.04 NO POLE NO POLE t[1] = 0.5087 x1[1] (analytic) = 2.0010822981152661900729038770055 x1[1] (numeric) = 2.0010822154145928412523041259208 absolute error = 8.27006733488205997510847e-08 relative error = 4.1327972081264636656057204078781e-06 % h = 0.0001 x2[1] (analytic) = 1.0007335817837826234153683575261 x2[1] (numeric) = 1.0007336235835244287740651801764 absolute error = 4.17997418053586968226503e-08 relative error = 4.1769100753920639599323629358158e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=469.2MB, alloc=4.6MB, time=70.75 memory used=473.0MB, alloc=4.6MB, time=71.48 NO POLE NO POLE t[1] = 0.5088 x1[1] (analytic) = 2.0010821898908659736517178112409 x1[1] (numeric) = 2.001082105278081275546164438606 absolute error = 8.46127846981055533726349e-08 relative error = 4.2283512953918261293128468036515e-06 % h = 0.0001 x2[1] (analytic) = 1.0007336743972002145901839798449 x2[1] (numeric) = 1.000733717169069751563257609692 absolute error = 4.27718695369730736298471e-08 relative error = 4.2740511917655858879852060469785e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=476.8MB, alloc=4.6MB, time=72.21 NO POLE NO POLE t[1] = 0.5089 x1[1] (analytic) = 2.0010820816772876561482097310871 x1[1] (numeric) = 2.0010819951305382791850170268329 absolute error = 8.65467493769631927042542e-08 relative error = 4.3249974685906209321939043506320e-06 % h = 0.0001 x2[1] (analytic) = 1.000733767034553832273955947845 x2[1] (numeric) = 1.0007338107898569191360454926709 absolute error = 4.37553030868620895448259e-08 relative error = 4.3723220429066709727246292369598e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=480.6MB, alloc=4.6MB, time=72.94 memory used=484.4MB, alloc=4.6MB, time=73.68 NO POLE NO POLE t[1] = 0.509 x1[1] (analytic) = 2.0010819734745301554265955597291 x1[1] (numeric) = 2.0010818849719627516489202377008 absolute error = 8.85025674037776753220283e-08 relative error = 4.4227357288171652823122319777927e-06 % h = 0.0001 x2[1] (analytic) = 1.0007338596958477230287351624915 x2[1] (numeric) = 1.0007339044458946323681668124826 absolute error = 4.47500469093394316499911e-08 relative error = 4.4717230735992363842063469727913e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=488.2MB, alloc=4.6MB, time=74.39 NO POLE NO POLE t[1] = 0.5091 x1[1] (analytic) = 2.0010818652825923894592993882611 x1[1] (numeric) = 2.0010817748023535923084613096774 absolute error = 9.04802387971508380785837e-08 relative error = 4.5215660771766194812878973307819e-06 % h = 0.0001 x2[1] (analytic) = 1.000733952381086134320079366647 x2[1] (numeric) = 1.0007339981371915940401460494667 absolute error = 4.57561054597200666828197e-08 relative error = 4.5722547287269252043771199385040e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=492.1MB, alloc=4.6MB, time=75.10 NO POLE NO POLE t[1] = 0.5092 x1[1] (analytic) = 2.0010817571014732763269426554107 x1[1] (numeric) = 2.0010816646217097004247455472497 absolute error = 9.24797635759021971081610e-08 relative error = 4.6214885147849869333017617497009e-06 % h = 0.0001 x2[1] (analytic) = 1.0007340450902733145172284538324 x2[1] (numeric) = 1.0007340918637565088376914630957 absolute error = 4.67734831943204630092633e-08 relative error = 4.6739174532731284070978533101140e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=495.9MB, alloc=4.6MB, time=75.82 memory used=499.7MB, alloc=4.6MB, time=76.56 NO POLE NO POLE t[1] = 0.5093 x1[1] (analytic) = 2.001081648931171734218333328345 x1[1] (numeric) = 2.001081554430029975149385494517 absolute error = 9.45011417590689478338280e-08 relative error = 4.7225030427691141542047303828645e-06 % h = 0.0001 x2[1] (analytic) = 1.0007341378234135128932798125935 x2[1] (numeric) = 1.0007341856255980833520924551983 absolute error = 4.78021845704588126426048e-08 relative error = 4.7767116923210068426076247652005e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=503.5MB, alloc=4.6MB, time=77.26 NO POLE NO POLE t[1] = 0.5094 x1[1] (analytic) = 2.0010815407716866814304550845588 x1[1] (numeric) = 2.0010814442273133155244901077262 absolute error = 9.65443733659059649768326e-08 relative error = 4.8246096622666907807321878020169e-06 % h = 0.0001 x2[1] (analytic) = 1.000734230580510979625363706482 x2[1] (numeric) = 1.00073427942272502608061701426 absolute error = 4.88422140464552533077780e-08 relative error = 4.8806378910535132264294146248903e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=507.3MB, alloc=4.6MB, time=78.00 memory used=511.1MB, alloc=4.6MB, time=78.78 NO POLE NO POLE t[1] = 0.5095 x1[1] (analytic) = 2.0010814326230170363684564948442 x1[1] (numeric) = 2.001081334013558620482653926749 absolute error = 9.86094584158858025680952e-08 relative error = 4.9278083744262495798236044925118e-06 % h = 0.0001 x2[1] (analytic) = 1.0007343233615699657948186896566 x2[1] (numeric) = 1.0007343732551460474269092408173 absolute error = 4.98935760816320905511607e-08 relative error = 4.9856964947534141327185503293835e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=514.9MB, alloc=4.6MB, time=79.53 NO POLE NO POLE t[1] = 0.5096 x1[1] (analytic) = 2.0010813244851617175456402073423 x1[1] (numeric) = 2.0010812237887647888469462455018 absolute error = 1.006963969286986939618405e-07 relative error = 5.0320991804071664580473095864766e-06 % h = 0.0001 x2[1] (analytic) = 1.0007344161665947233873670581104 x2[1] (numeric) = 1.0007344671228698597013869539618 absolute error = 5.09562751363140198958514e-08 relative error = 5.0918879488033119920548274640785e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=518.8MB, alloc=4.6MB, time=80.29 NO POLE NO POLE t[1] = 0.5097 x1[1] (analytic) = 2.0010812163581196435834521326761 x1[1] (numeric) = 2.0010811135529307193309002813069 absolute error = 1.028051889242525518513692e-07 relative error = 5.1374820813796604711304551907059e-06 % h = 0.0001 x2[1] (analytic) = 1.0007345089955895052932903365348 x2[1] (numeric) = 1.0007345610259051771216393789707 absolute error = 5.20303156718283490424359e-08 relative error = 5.1992126986856670936788898114983e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=522.6MB, alloc=4.6MB, time=81.05 memory used=526.4MB, alloc=4.6MB, time=81.83 NO POLE NO POLE t[1] = 0.5098 x1[1] (analytic) = 2.0010811082418897332114706301652 x1[1] (numeric) = 2.0010810033060553105385023431959 absolute error = 1.049358344226729682869693e-07 relative error = 5.2439570785247938335941576825665e-06 % h = 0.0001 x2[1] (analytic) = 1.0007346018485585653076048008237 x2[1] (numeric) = 1.0007346549642607158128249160798 absolute error = 5.31157021505052201152561e-08 relative error = 5.3076711899828195921740504433488e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=530.2MB, alloc=4.6MB, time=82.59 NO POLE NO POLE t[1] = 0.5099 x1[1] (analytic) = 2.001081000136470905267395695121 x1[1] (numeric) = 2.0010808930481374609641809991549 absolute error = 1.070883334443032146959661e-07 relative error = 5.3515241730344719284937713633361e-06 % h = 0.0001 x2[1] (analytic) = 1.0007346947255061581302370362269 x2[1] (numeric) = 1.0007347489379451938080689904159 absolute error = 5.42124390356778319541890e-08 relative error = 5.4172638683770115185943061617752e-06 % h = 0.0001 TOP MAIN SOLVE Loop memory used=534.0MB, alloc=4.6MB, time=83.36 memory used=537.8MB, alloc=4.6MB, time=84.14 NO POLE NO POLE t[1] = 0.51 x1[1] (analytic) = 2.0010808920418620786970381472244 x1[1] (numeric) = 2.0010807827791760689927962423111 absolute error = 1.092626860097042419049133e-07 relative error = 5.4601833661114433172644147691658e-06 % h = 0.0001 x2[1] (analytic) = 1.0007347876264365393661995311595 x2[1] (numeric) = 1.0007348429469673310488619831043 absolute error = 5.53205307916826624519448e-08 relative error = 5.5279911796504087960393875122002e-06 % h = 0.0001 Finished! Maximum Iterations Reached before Solution Completed! diff (x1,t,1) = 4.0 * x2 - 2.0 * diff (x2,t ,1) - 2.0 * x1; diff (x2,t,2) = 3.0 * diff(x2,t,1) - 2.0 * x2 - diff(x1,t,2) - diff (x1,t,1) + x1; Iterations = 100 Total Elapsed Time = 1 Minutes 24 Seconds Elapsed Time(since restart) = 1 Minutes 24 Seconds Expected Time Remaining = 10 Hours 24 Minutes 6 Seconds Optimized Time Remaining = 10 Hours 24 Minutes 0 Seconds Time to Timeout = 13 Minutes 35 Seconds Percent Done = 0.2244 % > quit memory used=538.7MB, alloc=4.6MB, time=84.29