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

Annotation of OpenXM_contrib/PHC/Ada/Continuation/directions_of_solution_paths.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_Numbers;           use Standard_Complex_Numbers;
        !             4: with Standard_Floating_Vectors;
        !             5: with Standard_Complex_Vectors;
        !             6: with Standard_Floating_VecVecs;          use Standard_Floating_VecVecs;
        !             7:
        !             8: package Directions_of_Solution_Paths is
        !             9:
        !            10: -- DESCRIPTION :
        !            11: --   This package provides some routines to estimate numerically the direction
        !            12: --   of a solution path diverging to a solution of a face system.
        !            13:
        !            14:   procedure Affine_Update_Direction
        !            15:                 ( t,prev_t,target : in Complex_Number;
        !            16:                   x,prevx : in Standard_Complex_Vectors.Vector;
        !            17:                   prevdls,prevstep : in out double_float;
        !            18:                   prevdiff,v : in out Standard_Floating_Vectors.Vector );
        !            19:
        !            20:   -- DESCRIPTION :
        !            21:   --   Computes an approximation of the direction of the path.
        !            22:   --   When prevdls /= 0.0, a second-order extrapolation will be applied.
        !            23:
        !            24:   -- ON ENTRY :
        !            25:   --   t          current value of continuation parameter;
        !            26:   --   prev_t     previous value of continuation parameter;
        !            27:   --   target     target value of continuation parameter;
        !            28:   --   x          current solution vector;
        !            29:   --   prevx      solution vector for previous value of continuation parameter;
        !            30:   --   prevdls    previous difference of the logs of distances to target;
        !            31:   --   prevstep   previous step size;
        !            32:   --   prevdiff   previous difference of the logs of the solution vectors;
        !            33:   --   v          current approximate direction of the path.
        !            34:
        !            35:   procedure Projective_Update_Direction
        !            36:                 ( t,prev_t,target : in Complex_Number;
        !            37:                   x,prevx : in Standard_Complex_Vectors.Vector;
        !            38:                   prevdls,prevstep : in out double_float;
        !            39:                   prevdiff,v : in out Standard_Floating_Vectors.Vector );
        !            40:
        !            41:   -- DESCRIPTION :
        !            42:   --   Does the same as the other procedure, under the assumption that the
        !            43:   --   solution vector lies in projective space.
        !            44:
        !            45:   -- REQUIRED :
        !            46:   --   The homogenization variable is the last element of the solution vector.
        !            47:
        !            48:   procedure Affine_Update_Direction
        !            49:                 ( r,m,estm,cntm : in out natural; thresm : in natural;
        !            50:                   er : in out integer; t,target : in Complex_Number;
        !            51:                   x : in Standard_Complex_Vectors.Vector;
        !            52:                   dt,s,logs : in out Standard_Floating_Vectors.Vector;
        !            53:                   logx,wvl0,wvl1,wvltmp : in out VecVec;
        !            54:                   v,diferr : in out Standard_Floating_Vectors.Vector;
        !            55:                   error : in out double_float );
        !            56:
        !            57:   procedure Affine_Update_Direction
        !            58:                 ( file : in file_type;
        !            59:                   r,m,estm,cntm : in out natural; thresm : in natural;
        !            60:                   er : in out integer; t,target : in Complex_Number;
        !            61:                   x : in Standard_Complex_Vectors.Vector;
        !            62:                   dt,s,logs : in out Standard_Floating_Vectors.Vector;
        !            63:                   logx,wvl0,wvl1,wvltmp : in out VecVec;
        !            64:                   v,diferr : in out Standard_Floating_Vectors.Vector;
        !            65:                   error : in out double_float );
        !            66:
        !            67:   -- DESCRIPTION :
        !            68:   --   Higher-order extrapolation method that produces direction with error of
        !            69:   --   order (t-target)^r, when the solution path converges to regular solution
        !            70:   --   in affine space.
        !            71:
        !            72:   -- REQUIRED : s'range = logs'range = logx'range = 0..max,
        !            73:   --   wvl'range = 1..max, logx(i)'range = wvl'range(i) = 1..n,
        !            74:   --   diferr'range = 0..max, max >= 1, equals maximal order of extrapolator.
        !            75:
        !            76:   -- ON ENTRY :
        !            77:   --   file       to write intermediate data, if not submitted, no output;
        !            78:   --   r          last meaningful entry in logx and logs;
        !            79:   --   m          current value for multiplicity;
        !            80:   --   estm       current estimate for multiplicity;
        !            81:   --   cntm       number of consecutive times estm has been guessed;
        !            82:   --   thresm     threshold for changing the m to estm;
        !            83:   --   er         order of extrapolator on the errors;
        !            84:   --   t          current value of continuation parameter;
        !            85:   --   target     target value of continuation parameter;
        !            86:   --   x          current solution for t;
        !            87:   --   dt         consecutive distances of t-values to target value;
        !            88:   --   s          consecutive s-values, with proper value for m;
        !            89:   --   logs       logarithms of previous values (target - t);
        !            90:   --   logx       logarithms of previous solution vectors;
        !            91:   --   wvl0       previous consecutive estimates for direction;
        !            92:   --   wvl1       current consecutive estimates for direction;
        !            93:   --   wvltmp     work space for updating wvl0 and wvl1.
        !            94:
        !            95:   -- ON RETURN :
        !            96:   --   r          if r < logs'last, then r will be raised by one,
        !            97:   --              otherwise r remains unchanged;
        !            98:   --   s          updated distance vector;
        !            99:   --   logs       updated vector of logarithms of distances to target;
        !           100:   --   logx       updated vector of solution vectors;
        !           101:   --   wvl0       updated previous consecutive estimates, equals wvl1;
        !           102:   --   wvl1       updated current consecutive estimates for direction;
        !           103:   --   v          estimated direction of path;
        !           104:   --   diferr     norms of consecutive differences of estimates for v;
        !           105:   --   error      norm of errorv;
        !           106:
        !           107:   procedure Projective_Update_Direction
        !           108:                 ( r,m,estm,cntm : in out natural; thresm : in natural;
        !           109:                   er : in out integer; t,target : in Complex_Number;
        !           110:                   x : in Standard_Complex_Vectors.Vector;
        !           111:                   dt,s,logs : in out Standard_Floating_Vectors.Vector;
        !           112:                   logx : in out VecVec;
        !           113:                   prevv,v : in out Standard_Floating_Vectors.Vector;
        !           114:                   error : in out double_float );
        !           115:
        !           116:   procedure Projective_Update_Direction
        !           117:                 ( file : in file_type;
        !           118:                   r,m,estm,cntm : in out natural; thresm : in natural;
        !           119:                   er : in out integer; t,target : in Complex_Number;
        !           120:                   x : in Standard_Complex_Vectors.Vector;
        !           121:                   dt,s,logs : in out Standard_Floating_Vectors.Vector;
        !           122:                   logx : in out VecVec;
        !           123:                   prevv,v : in out Standard_Floating_Vectors.Vector;
        !           124:                   error : in out double_float );
        !           125:
        !           126:   -- DESCRIPTION :
        !           127:   --   Higher-order extrapolation method that produces direction with error of
        !           128:   --   order (t-target)^r, when the solution path converges to regular solution
        !           129:   --   in affine space.
        !           130:
        !           131:   -- REQUIRED :
        !           132:   --   x(x'last) contains value of variable introduced to homogenize the system.
        !           133:
        !           134: end Directions_of_Solution_Paths;

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