       function xibtorsq ( xi )
c
c    dac:zeus3d.xibtorsq <-------- integrand for magnetic energy density
c                                                              may, 1990
c
c    written by: David Clarke
c    modified 1:
c
c  PURPOSE:  This function describes the integrand for integrating the
c  toroidal magnetic field energy density across the jet orifice.  For
c  a cylindrical jet, the integrand is xi * btor(xi)**2 and for a slab
c  jet, the integrand is btor(xi)**2, where BTOR is an external function
c  describing the profile of the toroidal field.
c
c  INPUT VARIABLES:
c    xi        point at which function is being evaluated (in units of
c              jet radii).
c
c  OUTPUT VARIABLES:
c    xibtorsq  the value of the integrand at "xi".
c
c  LOCAL VARIABLES:
c
c  EXTERNALS:
c    BTOR
c
c-----------------------------------------------------------------------
c
c
c-----------------------------------------------------------------------
c------------------------ IMPLICIT STATEMENTS --------------------------
c-----------------------------------------------------------------------
c
       implicit      none
c
       real*8        xi      , xibtorsq
c
c      External statements
c
       real*8        btor
       external      btor
c
c-----------------------------------------------------------------------
c
       xibtorsq = 2.0 * xi * btor(xi)**2
c
       return
       end
