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

Annotation of OpenXM_contrib/PHC/Ada/Continuation/standard_root_refiners.ads, Revision 1.1

1.1     ! maekawa     1: with text_io;                            use text_io;
        !             2: with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
        !             3: with Standard_Complex_Poly_Systems;      use Standard_Complex_Poly_Systems;
        !             4: with Standard_Complex_Poly_SysFun;       use Standard_Complex_Poly_SysFun;
        !             5: with Standard_Complex_Jaco_Matrices;     use Standard_Complex_Jaco_Matrices;
        !             6: with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
        !             7:
        !             8: package Standard_Root_Refiners is
        !             9:
        !            10: -- DESCRIPTION:
        !            11: --   The aim of this package is to provide some routines to
        !            12: --   perform root refining, to validate the approximate solutions.
        !            13: --   It can be used as a postprocessor to check the computed roots,
        !            14: --   or, as preprocessor, to find some suitable starting values for
        !            15: --   the continuation procedure.
        !            16:
        !            17: --   The basic root refiner is Newton's method.  There are four versions:
        !            18: --    + reporting/silent : with/without intermediate output
        !            19: --    + standard/function evaluator.
        !            20:
        !            21: -- NEWTON'S METHOD :
        !            22:
        !            23:   procedure Silent_Newton
        !            24:                ( p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jaco_Mat;
        !            25:                  zero : in out Solution; epsxa,epsfa : in double_float;
        !            26:                  numit : in out natural; max : in natural; fail : out boolean );
        !            27:
        !            28:   procedure Silent_Newton
        !            29:                ( p_eval : in Standard_Complex_Poly_SysFun.Evaluator;
        !            30:                  j_eval : in Standard_Complex_Jaco_Matrices.Evaluator;
        !            31:                  zero : in out Solution; epsxa,epsfa : in double_float;
        !            32:                  numit : in out natural; max : in natural; fail : out boolean );
        !            33:
        !            34:   procedure Reporting_Newton
        !            35:                ( file : in file_type;
        !            36:                  p_eval : in Eval_Poly_Sys; j_eval : in Eval_Jaco_Mat;
        !            37:                  zero : in out Solution; epsxa,epsfa : in double_float;
        !            38:                  numit : in out natural; max : in natural; fail : out boolean );
        !            39:
        !            40:   procedure Reporting_Newton
        !            41:                ( file : in file_type;
        !            42:                  p_eval : in Standard_Complex_Poly_SysFun.Evaluator;
        !            43:                  j_eval : in Standard_Complex_Jaco_Matrices.Evaluator;
        !            44:                  zero : in out Solution; epsxa,epsfa : in double_float;
        !            45:                  numit : in out natural; max : in natural; fail : out boolean );
        !            46:
        !            47:   -- DESCRIPTION :
        !            48:   --   Newton's method is applied to refine the approximation of a root.
        !            49:   --   The stopping criteria are:
        !            50:   --     * numit > max   (maximum number of iterations is exceeded);
        !            51:   --     * zero.err < epsxa (accuracy for x is reached);
        !            52:   --     * zero.res < epsfa (tolerance for residual is reached).
        !            53:   --   When one of these conditions is fulfilled, the procedure stops.
        !            54:
        !            55:   -- ON ENTRY :
        !            56:   --   file      to write intermediate results on;
        !            57:   --   p_eval    evaluable form of the polynomial system;
        !            58:   --   j_eval    evaluable form of the Jacobian matrix;
        !            59:   --   zero      starting value;
        !            60:   --   epsxa     maximum absolute error on the zero;
        !            61:   --   epsfa     maximum absolute value of the residue;
        !            62:   --   numit     number of iterations, to be initialized with zero;
        !            63:   --   max       maximum number of iterations.
        !            64:
        !            65:   -- ON RETURN :
        !            66:   --   zero      refined root;
        !            67:   --   numit     number of iterations performed;
        !            68:   --   fail      is true when the desired precision is not reached.
        !            69:
        !            70: -- APPLICATION of Newton's Method on a list of solutions.
        !            71: --   The silent versions simply perform the calculations.
        !            72: --   The reporting root refiners allow the output of intermediate results and
        !            73: --   produce a summary of the calculations.
        !            74: --   With each version, an additional output parameter can be supplied to
        !            75: --   contain only those solutions that satisfy the accuracy requirements.
        !            76:
        !            77:   procedure Silent_Root_Refiner
        !            78:                ( p : in Poly_Sys; sols : in out Solution_List;
        !            79:                  epsxa,epsfa,tolsing : in double_float;
        !            80:                  numit : in out natural; max : in natural );
        !            81:
        !            82:   procedure Silent_Root_Refiner
        !            83:                ( p : in Standard_Complex_Poly_SysFun.Evaluator;
        !            84:                  j : in Standard_Complex_Jaco_Matrices.Evaluator;
        !            85:                  sols : in out Solution_List;
        !            86:                  epsxa,epsfa,tolsing : in double_float;
        !            87:                  numit : in out natural; max : in natural );
        !            88:
        !            89:   procedure Silent_Root_Refiner
        !            90:                ( p : in Poly_Sys; sols,refsols : in out Solution_List;
        !            91:                  epsxa,epsfa,tolsing : in double_float;
        !            92:                  numit : in out natural; max : in natural );
        !            93:
        !            94:   procedure Silent_Root_Refiner
        !            95:                ( p : in Standard_Complex_Poly_SysFun.Evaluator;
        !            96:                  j : in Standard_Complex_Jaco_Matrices.Evaluator;
        !            97:                  sols,refsols : in out Solution_List;
        !            98:                  epsxa,epsfa,tolsing : in double_float;
        !            99:                  numit : in out natural; max : in natural );
        !           100:
        !           101:   procedure Reporting_Root_Refiner
        !           102:                ( file : in file_type;
        !           103:                  p : in Poly_Sys; sols : in out Solution_List;
        !           104:                  epsxa,epsfa,tolsing : in double_float;
        !           105:                  numit : in out natural; max : in natural; wout : in boolean );
        !           106:
        !           107:   procedure Reporting_Root_Refiner
        !           108:                ( file : in file_type;
        !           109:                  p : in Standard_Complex_Poly_SysFun.Evaluator;
        !           110:                  j : in Standard_Complex_Jaco_Matrices.Evaluator;
        !           111:                  sols : in out Solution_List;
        !           112:                  epsxa,epsfa,tolsing : in double_float;
        !           113:                  numit : in out natural; max : in natural; wout : in boolean );
        !           114:
        !           115:   procedure Reporting_Root_Refiner
        !           116:                ( file : in file_type;
        !           117:                  p : in Poly_Sys; sols,refsols : in out Solution_List;
        !           118:                  epsxa,epsfa,tolsing : in double_float;
        !           119:                  numit : in out natural; max : in natural; wout : in boolean );
        !           120:
        !           121:   procedure Reporting_Root_Refiner
        !           122:                ( file : in file_type;
        !           123:                  p : in Standard_Complex_Poly_SysFun.Evaluator;
        !           124:                  j : in Standard_Complex_Jaco_Matrices.Evaluator;
        !           125:                  sols,refsols : in out Solution_List;
        !           126:                  epsxa,epsfa,tolsing : in double_float;
        !           127:                  numit : in out natural; max : in natural; wout : in boolean );
        !           128:
        !           129:   -- DESCRIPTION :
        !           130:   --   The list of solutions sols is refined w.r.t. the system p.
        !           131:   --   The multiplicity of each solution in sols is determined as follows:
        !           132:   --     m = 0 : if the solution is singular and probably non isolated
        !           133:   --             or if the solution lies at infinity ( in fact no solution );
        !           134:   --     m = 1 : if the solution is regular;
        !           135:   --     m > 1 : a multiple solution with multiplicity m.
        !           136:
        !           137:   -- ON ENTRY :
        !           138:   --   file      file for writing diagnostics on;
        !           139:   --   p         a polynomial system;
        !           140:   --   j         Jacobian matrix of p;
        !           141:   --   sols      the start solutions;
        !           142:   --   epsxa     maximum absolute error on the zero;
        !           143:   --   epsfa     maximum absolute value for the residue;
        !           144:   --   tolsing   tolerance on inverse condition number for singular solution;
        !           145:   --   numit     the number of iterations, to be initialized with zero;
        !           146:   --   max       maximum number of iterations per zero;
        !           147:   --   wout      has to be true when intermediate output is wanted.
        !           148:
        !           149:   -- ON RETURN :
        !           150:   --   sols      a list of computed solutions;
        !           151:   --   refsols   only those solutions which satisfy the given accuracy;
        !           152:   --   numit     the number of iterations.
        !           153:
        !           154: end Standard_Root_Refiners;

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