      subroutine radint_nomom(ci,theta,phi,imgprob,ceth,cephi)


      include 'ctparm.inc'
      include 'ctgeom.inc'
      include 'ctgeom2.inc'
      include 'ctgeomjunc.inc'

      integer imgprob
      real theta, phi
      complex ci(1), htheta, hphi
      complex ctsta, ctstp
      real r(3,8)
      real khat(3), escat(3)
      complex cescat(3), carg, ctemp(8), ceth, cephi, cg1
      complex ctemp1(8), cvtemp
      complex ctempcent, cvtempvec(3)
      real ru(3), rv(3), ruu(3), rvv(3), ruv(3)
      real basis(3,8), ak, pi, r1(3), ftemp(3), rhohat(3)
      integer ijk, numimgs, numimgs2, iii, k, i1, iref, icmp
      real argmnt, alamda
      real test(3)
      integer n(3), numbas
      integer np, ik, ipnt
      real u_n, v_n, u, v, rjac, rsint, xsi, eta, g, rho, rho_s
      real w
      data n/3,1,2/
      integer iget_images, iget_matrix_position, iget_num_int_points
      integer iget_num_basis
      real vecmag, get_rho, get_rho_s, fget_weight
      real dotp

      common/kkk/ak,pi
      common/field/htheta,hphi,alamda
      common/tst/ ctsta(3,6,mxfaces),ctstp(6,mxfaces)

      cescat(1) = 0.
      cescat(2) = 0.
      cescat(3) = 0.

      khat(1) = sin(theta)*cos(phi)
      khat(2) = sin(theta)*sin(phi)   
      khat(3) = cos(theta)


      do 499 ijk=1,nfaces
        u = datctr(1,ijk)
        v = datctr(2,ijk)
        call rvec( ijk, u, v, r(1,1))
        argmnt = dotp(r(1,1), khat)
        carg = cmplx(0.0,ak*argmnt)
        ctempcent = cexp(carg)

        test(1) = 0.
        test(2) = 0.
        test(3) = 0.

        np = iget_num_int_points(ijk,2)
        numbas = iget_num_basis(ijk)
        do 460 ik=1,numbas
          i1 = iget_matrix_position(ijk,ik)
          if (i1 .eq. 0) go to 460
          if(ik .gt. 3) then
c           junction function on surface
            u_n = tzpt(2*(ik-3),ijk)
            v_n = tzpt(2*(ik-3)-1,ijk)
            call rvec( ijk, u_n, v_n, r(1,1))
            numimgs = iget_images(imgprob, r(1,1), 1)
            do iii=1,numimgs
              argmnt = dotp(r(1,iii), khat)
              carg = cmplx(0.0,ak*argmnt)
              ctemp1(iii) = cexp(carg)
            end do

            u = datctr(1,ijk)
            v = datctr(2,ijk)
            call tanvecs(ijk,u,v,ru,rv,ruu,rvv,ruv)
            do k=1,3
              ftemp(k) = (u-u_n)*ru(k) + (v-v_n)*rv(k)
            end do
            do k=1,3
              rhohat(k) = ftemp(k)/vecmag(ftemp)
            end do

            call tanvecs(ijk,u_n,v_n,ru,rv,ruu,rvv,ruv)
            call crossp(ru,rv,ftemp)
            rjac = vecmag(ftemp)

            call sigint(ijk,u_n,v_n,rsint)

            cvtemp = 0.

c perform gaussian integration...
            do ipnt = 1,np
              call get_uv(ijk,ipnt,2,u,v)
              call uv_trans(ijk,u,v,xsi,eta)

              if(ik .eq. 4) then
                g = 1. - (1.-xsi)*(1.-xsi)
              elseif(ik .eq. 5) then
                g = 1. - (1.-eta)*(1.-eta)
              elseif(ik .eq. 6) then
                g = 1. - (xsi+eta)*(xsi+eta)
              else
                write(6,*) '*** internal error ***'
                write(6,*) 'wrong basis index in gentesters'
                stop
              endif

              rho = get_rho(ijk,ik,u,v)
              rho_s = get_rho_s(ijk,ik,u,v)
              w = fget_weight(ijk,ipnt,2)

              call rvec_indexed( ijk, ipnt, 2, r(1,1))
              numimgs = iget_images(imgprob, r(1,1), 1)
              do iii=1,numimgs
                argmnt = dotp(r(1,iii), khat)
                carg = cmplx(0.0,ak*argmnt)
                ctemp(iii) = cexp(carg)
                cvtemp = cvtemp + w*(g/rho - 1./rho_s)*ctemp(iii)
              end do
            enddo !integration

            do k=1,3
              do iii=1,numimgs
                test(k) = test(k) +
     &                       rhohat(k) * rjac/alpha(ik-3,ijk) *
     &                         (cvtemp*aa(ijk) + rsint)
                cescat(k) = cescat(k) + ci(i1)*test(k)
              end do
            end do 
          else
c	    surface or wire function
            if(ntype(ijk) .eq. ep_pattypwire) then
c             wire segment
              do icmp=1,3
                cescat(icmp) = cescat(icmp) +
     &                 ctempcent*ci(i1)*ctsta(icmp,ik,ijk)
              end do
            else
c             surface
              cvtempvec(1) = 0.
              cvtempvec(2) = 0.
              cvtempvec(3) = 0.
              do ipnt=1,np
                call rvec_indexed( ijk, ipnt, 2, r(1,1))
                numimgs = iget_images(imgprob, r(1,1), 1)

                do iii=1,numimgs
                  argmnt = dotp(r(1,iii), khat)
                  carg = cmplx(0.0,ak*argmnt)
                  ctemp(iii) = cexp(carg)
                end do
  
                call get_weighted_basis(ijk,ik,ipnt,2,basis(1,1))
                numimgs2 = iget_images(imgprob,basis(1,1),2)
                do iii=1,numimgs2
                  do icmp=1,3
                  cvtempvec(icmp) = cvtempvec(icmp) + basis(icmp,iii)*
     &                                  ctemp(iii)
                  end do
                end do
              end do   ! integration points
 
              do iii=1,numimgs2
                do icmp = 1,3
                  cescat(icmp) = cescat(icmp) + 
     &                         ci(i1)*cvtempvec(icmp)
                end do
              end do
            endif
          endif
 460    continue   !basis function
 499  continue   !faces


      ceth  =  cescat(1)*cos(theta)*cos(phi) + 
     &         cescat(2)*cos(theta)*sin(phi) - 
     &         cescat(3)*sin(theta)

      cephi = -cescat(1)*sin(phi) + cescat(2)*cos(phi)


      return
      end

