
      subroutine speedup()

      include 'ctparm.inc'
      include 'ctgeom2.inc'
      include 'ctgeom.inc'
      include 'speed.inc'

      integer ipatch, itype, np, ipnt, inumbas, ibasref
      real u, v
      integer iget_num_int_points
      real fget_divbasis

      do ipatch=1,nfaces
        do itype=1,2
     
          call get_uv(ipatch,0,1,u,v)
          call rvec(ipatch,u,v,r_vect(1,ipatch,0,1))
          call get_uv(ipatch,0,2,u,v)
          call rvec(ipatch,u,v,r_vect(1,ipatch,0,2))

          np = iget_num_int_points(ipatch,itype)
          do ipnt=1,np
            call get_uv(ipatch,ipnt,itype,u,v)
            call tanvec_uandv(ipatch,u,v,dr_u(1,ipatch,ipnt,itype),
     &                                   dr_v(1,ipatch,ipnt,itype))
            call rvec(ipatch,u,v,r_vect(1,ipatch,ipnt,itype))
            if(ntype(ipatch) .eq. 4) then
              inumbas = 4
            else
              inumbas = 3
            endif
            do ibasref=1,inumbas
              call get_basis(ipatch,ibasref,u,v,
     &                    bas_f(1,ipatch,ipnt,itype,ibasref))
              divbas_f(ipatch,ipnt,itype,ibasref) = 
     &                    fget_divbasis(ipatch,ibasref,u,v)
            end do
          end do
        end do
      end do

      return
      end
