SUBROUTINE ic(mx,my,dx,dy,x,y,iprob,centers,kappa,q)
  IMPLICIT REAL (a-h,o-z)
  INCLUDE "parms.h"

  REAL, DIMENSION(1-mbc:maxmx+mbc,1-mbc:maxmy+mbc) :: kappa
  REAL, DIMENSION(1-mbc:maxmx+mbc,1-mbc:maxmy+mbc,*) :: q, centers

  SELECT CASE(iprob)
  CASE(channel)
     CALL channel_ic(mx,my,dx,dy,x,y,centers,kappa,q)
  CASE(annulus)
     CALL annulus_ic(mx,my,dx,dy,x,y,centers,kappa,q)
  CASE(irr_objs)
     CALL irr_ic(mx,my,dx,dy,x,y,centers,kappa,q)
  CASE(user_domain)
     CALL user_ic(mx,my,dx,dy,x,y,centers,kappa,q)
  END SELECT

END SUBROUTINE ic


SUBROUTINE bc2(maxmx_arg,maxmy_arg,meqn_arg,mbc_arg,mx,my,q,aux,t)
  IMPLICIT DOUBLE PRECISION (a-h,o-z)

  INCLUDE "parms.h"

  REAL, DIMENSION(1-mbc:maxmx+mbc, 1-mbc:maxmx+mbc, meqn) :: q
  REAL, DIMENSION(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, *) :: aux

  COMMON /grid/ x,y
  COMMON /problem_type/ iprob


  SELECT CASE(iprob)
  CASE(channel)
     CALL bc2_channel(mx,my,dx,dy,x,y,q,aux,t)
  CASE(annulus)
     CALL bc2_annulus(mx,my,dx,dy,x,y,q,aux,t)
  CASE(irr_objs)
     CALL bc2_irr(mx,my,dx,dy,x,y,q,aux,t)
  CASE(user_domain)
     CALL bc2_user(mx,my,dx,dy,x,y,q,aux,t)
  END SELECT

  RETURN
END SUBROUTINE bc2
