       subroutine bsetmag
c
c    dac:zeus3d.bsetmag <------------------ sets all magnetic boundaries
c                                                            march, 1990
c
c    written by: David Clarke
c    modified 1:
c
c  PURPOSE:  This routine collects the calls to the subroutines BSET*
c  which set the inflow boundaries of the magnetic variables.  It is
c  intended to be called just ONCE during the initialisation of the
c  problem.  If the inflow boundary values for the emfs change in time,
c  it is best to update these by calling the subroutines BSETEMF* by
c  themselves.  If BSETMAG is called to update the inflow emfs, then
c  the boundary values for the magnetic fields will be reset without
c  regard to maintaining div(B)=0 numerically.  This could lead to the
c  introduction of monopoles into the grid.
c
c  Also note that the since the emfs are located at different positions
c  on the grid than the velocities and the magnetic fields, the emfs are
c  evaluated by either averaging or upwinding the relevant quantities.
c  If the boundary values for the velocities and magnetic fields are
c  constant in space, then this prescription is OK.  But, if these
c  quantities possess some spatial dependence, it is probably best to
c  set the emfs directly in the intialising subroutine with the known
c  values of the velocities and magnetic fields at the locations of the
c  emfs, rather than relying on this subroutine to set them correctly.
c
c  INPUT VARIABLES: [NONE]
c
c  OUTPUT VARIABLES: [NONE]
c
c  LOCAL VARIABLES: [NONE]
c
c  EXTERNALS:
c    BSETB1  , BSETB2  , BSETB3
c    BSETEMF1, BSETEMF2, BSETEMF3
c
c-----------------------------------------------------------------------
c
c
c-----------------------------------------------------------------------
c------------------------ IMPLICIT STATEMENTS --------------------------
c-----------------------------------------------------------------------
c
       implicit      none
c
c      External statements
c
       external      bsetb1  , bsetb2  , bsetb3
     1             , bsetemf1, bsetemf2, bsetemf3
c
c-----------------------------------------------------------------------
c
       call bsetb1
       call bsetb2
       call bsetb3
       call bsetemf1
       call bsetemf2
       call bsetemf3
c
       return
       end
