[BACK]Return to mypoco.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Continuation

Annotation of OpenXM_contrib/PHC/Ada/Continuation/mypoco.adb, Revision 1.1

1.1     ! maekawa     1: with text_io;                            use text_io;
        !             2: with Timing_Package;                     use Timing_Package;
        !             3: with Communications_with_User;           use Communications_with_User;
        !             4: with File_Scanning;                      use File_Scanning;
        !             5: with Standard_Complex_Numbers;           use Standard_Complex_Numbers;
        !             6: with Standard_Complex_Norms_Equals;      use Standard_Complex_Norms_Equals;
        !             7: with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
        !             8: with Standard_Complex_Solutions_io;      use Standard_Complex_Solutions_io;
        !             9: with Drivers_for_Homotopy_Creation;      use Drivers_for_Homotopy_Creation;
        !            10: with Increment_and_Fix_Continuation;     use Increment_and_Fix_Continuation;
        !            11: with Drivers_for_Poly_Continuation;      use Drivers_for_Poly_Continuation;
        !            12: with MyHomotopy;
        !            13:
        !            14: procedure mypoco is
        !            15:
        !            16:   procedure Continue ( file : in file_type; sols : in out Solution_List;
        !            17:                        report : in boolean;
        !            18:                        target : in Complex_Number ) is
        !            19:
        !            20:   -- DESCRIPTION :
        !            21:   --   Instantiates the path-trackers.
        !            22:
        !            23:     timer : Timing_Widget;
        !            24:
        !            25:     procedure Sil_Cont is
        !            26:       new Silent_Continue(Max_Norm,
        !            27:                           MyHomotopy.Eval,MyHomotopy.Diff,MyHomotopy.Diff);
        !            28:     procedure Rep_Cont is
        !            29:       new Reporting_Continue(Max_Norm,
        !            30:                              MyHomotopy.Eval,MyHomotopy.Diff,MyHomotopy.Diff);
        !            31:
        !            32:   begin
        !            33:     tstart(timer);
        !            34:     if report
        !            35:      then Rep_Cont(file,sols,false,target);
        !            36:      else Sil_Cont(sols,false,target);
        !            37:     end if;
        !            38:     tstop(timer);
        !            39:     new_line(file); print_times(file,timer,"continuation");
        !            40:   end Continue;
        !            41:
        !            42:   procedure Main is
        !            43:
        !            44:     infile,outfile : file_type;
        !            45:     found : boolean;
        !            46:     sols : Solution_List;
        !            47:     k : positive;
        !            48:     a,target : Complex_Number;
        !            49:     oc : natural;
        !            50:     report : boolean;
        !            51:
        !            52:   begin
        !            53:     put_line
        !            54:       ("Polynomial Continuation with inline evaluators and differentiators.");
        !            55:     new_line;
        !            56:     put_line("Reading the name of the file where the start solutions are.");
        !            57:     Read_Name_and_Open_File(infile);
        !            58:     Scan_and_Skip(infile,"SOLUTIONS",found);
        !            59:     if found
        !            60:      then get(infile,sols);
        !            61:      else Reset(infile);
        !            62:           get(infile,sols);
        !            63:     end if;
        !            64:     new_line;
        !            65:     put_line("Reading the name of the output file.");
        !            66:     Read_Name_and_Create_File(outfile);
        !            67:     put_line(outfile,"THE START SOLUTIONS : ");
        !            68:     put(outfile,Length_Of(sols),Head_Of(sols).n,sols); new_line(outfile);
        !            69:     Default_Homotopy_Settings(k,a,target);
        !            70:     Menu_for_Homotopy_Settings(outfile,k,a,target);
        !            71:     MyHomotopy.Init(a,k);
        !            72:     new_line;
        !            73:     Driver_for_Continuation_Parameters(outfile);
        !            74:     new_line;
        !            75:     Driver_for_Process_io(outfile,oc);
        !            76:     report := not (oc = 0);
        !            77:     Continue(outfile,sols,report,target);
        !            78:   end Main;
        !            79:
        !            80: begin
        !            81:   Main;
        !            82: end mypoco;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>