File : run_rg1.adb
with Reps, Messages, Fouriers_Init;
use Reps, Messages, Fouriers_Init;
with RG_Ops;
with Intervals, Intervals.Ops, Intervals.IO;
use Intervals, Intervals.Ops, Intervals.IO;
pragma Elaborate_All(Intervals.Ops, Intervals.IO);
procedure Run_RG1 is
subtype Scalar is Interval;
Lmax: constant Positive := 40;
Wmax: constant Positive := 40;
Pdeg: constant Positive := 16;
Dho: constant Natural := 8;
Sigma: constant Rep := 0.85001;
Kappa: constant Rep := Sigma/0.4;
package Run_RG1_Ops is new RG_Ops (Lmax => Lmax, Wmax => Wmax, Pdeg => Pdeg, Dho => Dho,
Sigma => Sigma, Kappa => Kappa, Scalar => Scalar);
use Run_RG1_Ops;
use Scal_Fou, Scal_Fou_Ops, Scal_Fou_IO;
R: constant Weights := (0.85,0.15); -- for domain of RG
Iname: constant String := "40-16-8"; -- name stem for input Fix and Psi
HDec: constant Boolean := False; -- use decimal IO for Hamiltonians
Err: constant Radius := 1.0E-15; -- precision for NumFixComp3 etc.
B3: Rep;
Rs: Weights;
Hq,Hzp,H1,H2,Psi0: Hamilton;
begin
Trace; -- activate TraceEnter/TraceLeave
ShowParam;
Rs := (Up(R.Q),Up(R.P)); -- for range of RG
Show(" Rs =",Rs);
Show("Err =",Err);
Read("Fix-" & Iname & ".nh",0,(Two,One),H1,HDec);
Read("Psi-" & Iname & ".nh",0,(Two,One),Psi0,HDec);
Read("Hzp-" & Iname & ".nh",0,(Two,One),Hzp,HDec);
B3 := Sup(Norm(Rs,Hzp));
Read("Hq-" & Iname & ".nh",1,(Rs.Q,B3),Hq,HDec);
Show("Computing image R1(H1) of approximate fixed point H1");
RG1(Err,Rs,Psi0,Hq,Hzp,H1,H1,H2); -- also shows |R1(H1)-H1|
end Run_RG1;