Annotation of OpenXM_contrib/PHC/Ada/Continuation/path_trackers.ads, Revision 1.1.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; use Standard_Complex_Vectors;
6: with Standard_Complex_Matrices; use Standard_Complex_Matrices;
7: with Standard_Complex_Solutions; use Standard_Complex_Solutions;
8: with Continuation_Data; use Continuation_Data;
9:
10: package Path_Trackers is
11:
12: -- DESCRIPTION :
13: -- This package offers some routines for tracking solution paths,
14: -- using an increment-and-fix predictor-corrector method.
15:
16: -- The following options can be made :
17: -- (Linear,Circular)
18: -- A linear path tracker takes t from a starting to a target value.
19: -- For computing winding numbers, a circular path tracker is needed.
20: -- (Single,Multiple)
21: -- A single path tracker only deals with one path at a time.
22: -- A multiple path tracker follows more than one path when it is called.
23: -- (Normal,Conditioned)
24: -- A normal path tracker does not compute an estimate for the inverse of
25: -- the condition number of the Jacobian matrix. This additional work
26: -- is done by a conditioned path tracker.
27: -- (Silent,Reporting)
28: -- A silent path tracker does not produce any output on file.
29: -- A reporting path tracker allows to put intermediate results on file.
30:
31: -- By combining these options, the following path trackers are provided:
32:
33: -- Linear_Single_Normal_Silent_Continue
34: -- Linear_Single_Normal_Reporting_Continue
35: -- Linear_Single_Conditioned_Silent_Continue
36: -- Linear_Single_Conditioned_Reporting_Continue
37: -- Linear_Multiple_Normal_Silent_Continue
38: -- Linear_Multiple_Normal_Reporting_Continue
39: -- Linear_Multiple_Conditioned_Silent_Continue
40: -- Linear_Multiple_Conditioned_Reporting_Continue
41: -- Circular_Single_Normal_Reporting_Continue
42: -- Circular_Single_Conditioned_Reporting_Continue
43:
44: -- LINEAR PATH FOLLOWING FOR ONE PATH :
45:
46: generic
47:
48: with function Norm ( x : Vector ) return double_float;
49: with function H ( x : Vector; t : Complex_Number ) return Vector;
50: with function dH ( x : Vector; t : Complex_Number ) return Vector;
51: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
52:
53: procedure Linear_Single_Normal_Silent_Continue
54: ( s : in out Solu_Info; target : in Complex_Number;
55: tol : in double_float; proj : in boolean;
56: p : in Pred_Pars; c : in Corr_Pars );
57:
58: generic
59:
60: with function Norm ( x : Vector ) return double_float;
61: with function H ( x : Vector; t : Complex_Number ) return Vector;
62: with function dH ( x : Vector; t : Complex_Number ) return Vector;
63: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
64:
65: procedure Linear_Single_Normal_Reporting_Continue
66: ( file : in file_type; s : in out Solu_Info;
67: target : in Complex_Number; tol : in double_float;
68: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
69:
70: generic
71:
72: with function Norm ( x : Vector ) return double_float;
73: with function H ( x : Vector; t : Complex_Number ) return Vector;
74: with function dH ( x : Vector; t : Complex_Number ) return Vector;
75: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
76:
77: procedure Linear_Single_Conditioned_Silent_Continue
78: ( s : in out Solu_Info; target : in Complex_Number;
79: tol : in double_float; proj : in boolean;
80: rtoric : in natural;
81: v : in out Standard_Floating_Vectors.Link_to_Vector;
82: errorv : in out double_float;
83: p : in Pred_Pars; c : in Corr_Pars );
84:
85: generic
86:
87: with function Norm ( x : Vector) return double_float;
88: with function H ( x : Vector; t : Complex_Number ) return Vector;
89: with function dH ( x : Vector; t : Complex_Number ) return Vector;
90: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
91:
92: procedure Linear_Single_Conditioned_Reporting_Continue
93: ( file : in file_type; s : in out Solu_Info;
94: target : in Complex_Number; tol : in double_float;
95: proj : in boolean; rtoric : in natural;
96: v : in out Standard_Floating_Vectors.Link_to_Vector;
97: errorv : in out double_float;
98: p : in Pred_Pars; c : in Corr_Pars );
99:
100: -- DESCRIPTION :
101: -- This routine follows a path of solutions of the system
102: -- H(x,t) = 0, with t : t ---> target.
103: -- An increment-and-fix path-following technique is applied.
104:
105: -- ON ENTRY :
106: -- file to write intermediate results on;
107: -- s start solution and initial value of t;
108: -- target target value of the continuation parameter;
109: -- tol tolerance to decide when two double_floats are the same;
110: -- proj when perpendicular-projective corrector has to be used;
111: -- rtoric order of extrapolation for computation of path directions;
112: -- v direction of toric compactificiation, null when (rtoric = 0);
113: -- errorv error on the current direction;
114: -- p parameters for the predictor;
115: -- c parameters for the corrector.
116:
117: -- ON RETURN :
118: -- s the computed solution of H(x,t) = 0;
119: -- v direction of the compactification, when rtoric > 0;
120: -- errorv difference with previously computed direction.
121:
122: -- LINEAR PATH FOLLOWING FOR A NUMBER OF PATHS :
123:
124: generic
125:
126: with function Norm ( x : Vector ) return double_float;
127: with function H ( x : Vector; t : Complex_Number ) return Vector;
128: with function dH ( x : Vector; t : Complex_Number ) return Vector;
129: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
130:
131: procedure Linear_Multiple_Normal_Silent_Continue
132: ( s : in out Solu_Info_Array;
133: target : in Complex_Number; tol,dist_sols : in double_float;
134: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
135:
136: generic
137:
138: with function Norm ( x : Vector ) return double_float;
139: with function H ( x : Vector; t : Complex_Number ) return Vector;
140: with function dH ( x : Vector; t : Complex_Number ) return Vector;
141: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
142:
143: procedure Linear_Multiple_Normal_Reporting_Continue
144: ( file : in file_type; s : in out Solu_Info_Array;
145: target : in Complex_Number; tol,dist_sols : in double_float;
146: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
147:
148: generic
149:
150: with function Norm ( x : Vector ) return double_float;
151: with function H ( x : Vector; t : Complex_Number ) return Vector;
152: with function dH ( x : Vector; t : Complex_Number ) return Vector;
153: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
154:
155: procedure Linear_Multiple_Conditioned_Silent_Continue
156: ( s : in out Solu_Info_Array;
157: target : in Complex_Number; tol,dist_sols : in double_float;
158: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
159:
160: generic
161:
162: with function Norm ( x : Vector ) return double_float;
163: with function H ( x : Vector; t : Complex_Number ) return Vector;
164: with function dH ( x : Vector; t : Complex_Number ) return Vector;
165: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
166:
167: procedure Linear_Multiple_Conditioned_Reporting_Continue
168: ( file : in file_type; s : in out Solu_Info_Array;
169: target : in Complex_Number; tol,dist_sols : in double_float;
170: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
171:
172: -- DESCRIPTION :
173: -- This routine follows simultaneously a number of paths in order
174: -- to avoid clustering of solutions.
175:
176: -- ON ENTRY :
177: -- file to write intermediate results on;
178: -- s array of start solutions, all for the same t;
179: -- target target value of the continuation parameters;
180: -- tol tolerance to decide when two double_floats are the same;
181: -- dist_sols distance to be kept between the solutions;
182: -- proj indicates whether perpendicular-projective corrector has
183: -- to be used or not;
184: -- p parameters for the predictor;
185: -- c parameters for the corrector.
186:
187: -- ON RETURN :
188: -- s the computed solutions of H(x,t) = 0.
189:
190: -- CIRCULAR PATH FOLLOWING FOR ONE PATH :
191:
192: generic
193:
194: with function Norm ( x : Vector ) return double_float;
195: with function H ( x : Vector; t : Complex_Number ) return Vector;
196: with function dH ( x : Vector; t : Complex_Number ) return Vector;
197: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
198:
199: procedure Circular_Single_Normal_Reporting_Continue
200: ( file : in file_type; s : in out Solu_Info;
201: target : in Complex_Number; tol,epslop : in double_float;
202: wc : out natural; max_wc : in natural;
203: sum,all_sum : out Vector;
204: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
205:
206: generic
207:
208: with function Norm ( x : Vector ) return double_float;
209: with function H ( x : Vector; t : Complex_Number ) return Vector;
210: with function dH ( x : Vector; t : Complex_Number ) return Vector;
211: with function dH ( x : Vector; t : Complex_Number ) return Matrix;
212:
213: procedure Circular_Single_Conditioned_Reporting_Continue
214: ( file : in file_type; s : in out Solu_Info;
215: target : in Complex_Number; tol,epslop : in double_float;
216: wc : out natural; max_wc : in natural;
217: sum,all_sum : out Vector;
218: proj : in boolean; p : in Pred_Pars; c : in Corr_Pars );
219:
220:
221: -- DESCRIPTION :
222: -- This routine follows a path of solutions of the system
223: -- H(x,t) = 0, with t circuling around the target.
224: -- An increment-and-fix path-following technique is applied.
225:
226: -- ON ENTRY :
227: -- file to write intermediate results on;
228: -- s array of start solutions, all for the same t;
229: -- target target value of the continuation parameters;
230: -- tol tolerance to decide when two floats are the same;
231: -- epslop tolerance to decide when w(0) = w(2*PI*wc);
232: -- max_wc maximum bound for winding number;
233: -- proj indicates whether perpendicular-projective corrector has
234: -- to be used or not;
235: -- p parameters for the predictor;
236: -- c parameters for the corrector.
237:
238: -- ON RETURN :
239: -- s the computed solution of H(x,t) = 0;
240: -- wc estimated cycle number;
241: -- sum is the trapezium sum over the equidistant points;
242: -- all_sum is the trapezium sum over all the points.
243:
244: end Path_Trackers;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>