21 include
'compol_add.inc'
45 if(kstep.eq.0 .OR. (ngav.eq.0 .AnD. kastr.eq.0))
then
47 ch4astra
if(kstep.eq.0)
then
57 curcen=rm*curp+curf/rm
63 sqcen=sqcen+sq1(1,j)+sq4(1,j)
73 right(il)=curcen*sqcen
81 sqk=sq1(i,j)+sq2(i-1,j)+sq3(i-1,j-1)+sq4(i,j-1)
85 sqk=sq2(i-1,j)+sq3(i-1,j-1)
86 r0=(3.d0*r(i,j)+r(i-1,j))*0.25d0
87 psn=(3.d0*psin(i,j)+psin(i-1,j))*0.25d0
94 cur(i,j)=r0*curp+curf/r0
96 tokp=tokp+cur(i,j)*sqk
97 tokff=tokff+curf*sqk/r0
98 tokpp=tokpp+curp*sqk*r0
101 right(il)=cur(i,j)*sqk
114 write(*,*)
'cnor,tok,tokp'
115 write(*,*) cnor,tok,tokp/amu0
128 cur(i,j)=cur(i,j)*cnor
141 right(il)=right(il)*cnor
148 dfdpsi(i)=dfdpsi(i)*cnor
167 curcen=rm*
dpdpsi(1)+dfdpsi(1)/rm
173 sqcen=sqcen+sq1(1,j)+sq4(1,j)
181 right(il)=curcen*sqcen
195 sqk=sq1(i,j)+sq2(i-1,j)+sq3(i-1,j-1)+sq4(i,j-1)
198 sqk=sq2(i-1,j)+sq3(i-1,j-1)
199 r0=(3.d0*r(i,j)+r(i-1,j))*0.25d0
205 cur(i,j)=r0*curp+curf/r0
207 tokp=tokp+cur(i,j)*sqk
210 right(il)=cur(i,j)*sqk
231 write(*,*)
'rightp:tok tokp ',tok,tokp
239 cur(i,j)=cur(i,j)*cnor
244 right(il)=right(il)*cnor
250 write(*,*)
'cnor cur_mu',cnor,cur_mu
267 include
'compol_add.inc'
270 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
271 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
280 a2=a34(i-1,j-1)+a12(i-1,j)
287 dltk=(dlt(i,j-1)+dlt(i,j))*0.5d0
288 dgdnl=a1*g1+a2*g2+a3*g3
302 psb=psb+binadg(jb,j)*(dgdn(jb)+dgdn(jb+1))*0.5d0
323 a8=a34(i,j-1)+a12(i,j)
328 right(il)= (a7*psib(j-1)+a8*psib(j)+a9*psib(j+1))
351 include
'compol_add.inc'
353 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
354 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
366 psib(j)=psie(iplas,j)
380 a8=a34(i,j-1)+a12(i,j)
385 right(il)=-(a7*psib(j-1)+a8*psib(j)+a9*psib(j+1))
402 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
403 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
432 a8=a34(i,j-1)+a12(i,j)
437 right(il)=right(il)-(a7*psib(j-1)+a8*psib(j)+a9*psib(j+1))
454 include
'compol_add.inc'
456 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
457 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
470 a2=a34(i-1,j-1)+a12(i-1,j)
485 dpidni=a1*ps1+a2*ps2+a3*ps3+a4*ps4+a5*ps5+a6*ps6-right(il)
495 dpedni=a1*ps1+a2*ps2+a3*ps3+a4*ps4+a5*ps5+a6*ps6
500 a8=a34(i,j-1)+a12(i,j)
513 dpidne=-(a4*ps4+a5*ps5+a6*ps6+a7*ps7+a8*ps8+a9*ps9)
520 sqk=sq2(i-1,j)+sq3(i-1,j-1)
522 dlt0=(dlt(i,j-1)+dlt(i,j))*0.5d0
528 curs(j)=(dlt0/r0**2)*fpv/(dpsdni+dpsdne)
531 right(il)=right(il)+curs(j)*dlt0
533 cur(i,j)=curs(j)*dlt0/sqk+cur(i,j)
535 toksfi=toksfi+curs(j)*dlt0
542 fvv=sqrt(f(iplas)**2+fpv)
543 write(6,*)
'Fp,Fvac,fv',f(iplas),fvac,fvv
557 include
'compol_add.inc'
559 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
560 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
569 a2=a34(i-1,j-1)+a12(i-1,j)
576 dltk=(dlt(i,j-1)+dlt(i,j))*0.5d0
577 dgdnl=a1*g1+a2*g2+a3*g3
591 psb=psb+binadg(jb,j)*(dgdn(jb)+dgdn(jb+1))*0.5d0
631 a8=a34(i,j-1)+a12(i,j)
636 right(il)= (a7*psib(j-1)+a8*psib(j)+a9*psib(j+1))
662 include
'compol_add.inc'
683 include
'compol_add.inc'
685 dimension psex_b(ntp),rbon(ntp),zbon(ntp)
686 dimension pspl_b(ntp),psi_bon(ntp)
695 psi_bon(j)=pspl_b(j)+psex_b(j)
698 psex_b(1)=psex_b(nt1)
715 include
'compol_add.inc'
717 common/comaaa/ a12(nrp,ntp),a23(nrp,ntp),a34(nrp,ntp),
718 + a14(nrp,ntp),a13(nrp,ntp),a24(nrp,ntp)
720 common/com_bgr/ bin_adg(ntp,ntp),dg_dn(ntp)
721 dimension pspl_b(ntp)
731 pspl_b(1)=pspl_b(nt1)
750 include
'compol_add.inc'
752 dimension dif_g(nrp,ntp)
759 dif_g(i,j)=g(i,j)-r(i,j)**2
760 dif_abs=dabs(dif_g(i,j))
761 errg_max=dmax1(errg_max,dif_abs)
786 include
'compol_add.inc'
real(r8) function dpdpsi(psi_n)
function numlin(i, j, nr, nt)
subroutine f_psib_ext(psex_av)
real *8 function avr_bnd(arr)
subroutine put_psib0(psi0_bnd)
subroutine f_psib_pla(pspl_av)
subroutine f_procof(icq, cur_mu)