rem


rem Preliminary note. If this file has been given the extension .htm for

rem documentation purposes, it must be renamed to scr.bat to enable it 

rem to act as a batch file



rem file scr.bat which performs a series of 4 runs on

rem grids of successivel increasing fineness

rem followed by a fifth start-from-scratch run and a

rem sixth which restarts with the grid and from the phi file

rem of run 4. so as to procure a better converged result

set sweeps=5

mkdir %sweeps%sweep

echo lsweep=%sweeps% >log

rem initialization of files included in the q1

echo   no action >spinxyz1

echo Text(run1 coarsest grid >q2

rem perform the first coarse-grid run

call se

echo run 1 complete>>log

copy result res1

copy phi phi1

copy gxmoni.gif gxmoni1.gif



rem write q1spin

echo refine(x,2)            >q1spin

echo refine(y,2)            >>q1spin

echo refine(z,2)            >>q1spin

echo do not interpolate p1  >>q1spin

echo do not interpolate u1  >>q1spin

echo do not terpolate v1    >>q1spin

echo do not interpolate w1  >>q1spin

echo stop                   >>q1spin

echo q1spin created >>log



rem Call SPINTO so as to create nphi, i.e. the phi from which the 

rem next run will start and to place in spinxyz1 the nx, ny and nz

rem which are to be used.



rem Activate  'goto end', by removing the 'rem' in front of it, 

rem if it is desired to terminate at this stage

rem goto end



rem Make the second-stage run, save, call SPINTO, etc

echo Text(run 2, 1st refinement >>q2

echo lsweep=%sweeps% >>q2

echo restrt(all) >>q2

echo namfi=nphi >>q2

echo runspin about to be called >>log

call runspin

echo runspin has been called >>log

copy nphi nphi2

call se

echo run 2 complete>>log

copy result %sweeps%sweep\res2

copy phi %sweeps%sweep\phi2

copy gxmoni.gif %sweeps%sweep\gxmoni2.gif



rem Make the third-stage run, save, call SPINTO, etc

echo Text(run3, 2nd refinement >>q2

echo restrt(all) >>q2

echo namfi=nphi >>q2

call runspin

copy nphi %sweeps%sweep\nphi3

call se

echo run 3 complete>>log

copy result %sweeps%sweep\res3

copy phi %sweeps%sweep\phi3

copy gxmoni.gif %sweeps%sweep\gxmoni3.gif



rem Make the fourth-stage run, save, call SPINTO, etc

echo Text(run4, 3rd refinement >>q2

echo restrt(all) >>q2

echo namfi=nphi >>q2

call runspin

copy nph1 %sweeps%sweep\nphi4

call se

echo run 4 complete>>log

copy result res4

copy phi %sweeps%sweep\phi4

copy gxmoni.gif %sweeps%sweep\gxmoni4.gif





rem Run 5 finest grid, without restart

echo Text(Run 5 no restart >Q2

echo lsweep=%sweeps% >>q2

call se

echo run 5 complete>>log

copy result%sweeps%sweep\ res5

copy phi %sweeps%sweep\phi5

copy gxmoni.gif %sweeps%sweep\gxmoni5.gif



rem Run 6 finest grid, restart from 5

echo Text(Run 6 restart from 5 >>Q2

echo restrt(all)              >>Q2

call se

echo run 6 complete>>log

copy result %sweeps%sweep\res6

copy phi %sweeps%sweep\phi6

copy gxmoni.gif %sweeps%sweep\gxmoni6.gif



rem Run 7 finest grid, restart from 4

echo Text(Run 7 restart from 4 >>Q2

echo restrt(all)              >>Q2

echo namfi=%sweeps%sweep\phi4               >>Q2

call se

echo run 7 complete>>log

copy result %sweeps%sweep\res7

copy phi %sweeps%sweep\phi7

copy gxmoni.gif %sweeps%sweep\gxmoni7.gif





goto end

:end