1 SUBROUTINE unique_boundary_pg
2 > (rbc, zbs, rhobc, nmax, mmax, mpol,ntor)
8 INTEGER,
INTENT(in) :: nmax, mmax, mpol, ntor
9 REAL(rprec),
DIMENSION(-nmax:nmax,-mmax:mmax),
10 >
INTENT(inout) :: rhobc
11 REAL(rprec),
DIMENSION(-nmax:nmax,0:mmax),
INTENT(out) ::
16 INTEGER :: mcount, ncount
17 REAL(rprec),
PARAMETER :: zero = 0, one = 1
18 INTEGER :: mb, nb, m_bdyn, m_bdyp, n_bdy
19 REAL(rprec) :: rnorm, r00
28 DO mcount = -mmax, mmax
29 DO ncount = -nmax, nmax
30 IF (rhobc(ncount,mcount) .ne. zero )
THEN
31 m_bdyn = min(m_bdyn,mcount)
32 m_bdyp = max(m_bdyp,mcount)
33 n_bdy = max(n_bdy,abs(ncount))
38 rnorm = rhobc(0,0)/rhobc(0,1)
49 DO ncount = -n_bdy, n_bdy
51 rbc( nb, mb) = rbc( nb, mb) + rhobc( ncount, mcount)
52 zbs( nb, mb) = zbs( nb, mb) + rhobc( ncount, mcount)
57 DO ncount = -n_bdy, n_bdy
59 rbc( nb, mb) = rbc( nb, mb) + rhobc( ncount, mcount)
60 zbs( nb, mb) = zbs( nb, mb) - rhobc( ncount, mcount)
64 rbc( ncount, 0 ) = rbc( ncount, 0 ) + rbc( -ncount, 0 )
65 rbc( -ncount, 0 ) = zero
66 zbs( ncount, 0 ) = zbs( ncount, 0 ) - zbs( -ncount, 0 )
67 zbs( -ncount, 0 ) = zero
72 DO ncount = -ntor, ntor
73 rbc(ncount,mcount)=rnorm*rbc(ncount,mcount)
74 zbs(ncount,mcount)=rnorm*zbs(ncount,mcount)
81 END SUBROUTINE unique_boundary_pg