anchor.diff:  c
     310 continue
   c     # zero-order extrapolation:
  -      do 315 m=1,meqn
  -         do 315 jbc=1,mbc
  -            do 315 i = 1-mbc, mx+mbc
  +      do m=1,meqn
  +         do jbc=1,mbc
  +            do i = 1-mbc, mx+mbc
                  q(i,1-jbc,m) = q(i,1,m)
  -  315       continue
  +            end do
  +         end do
  +      end do
         go to 399
   
     320 continue
   c     # periodic:
  -      do 325 m=1,meqn
  -         do 325 jbc=1,mbc
  -            do 325 i = 1-mbc, mx+mbc
  +      do m=1,meqn
  +         do jbc=1,mbc
  +            do i = 1-mbc, mx+mbc
                  q(i,1-jbc,m) = q(i,my+1-jbc,m)
  -  325       continue
  +            end do
  +         end do
  +      end do
         go to 399
   
     330 continue
   c     # solid wall (assumes 3'rd component is velocity or momentum in y):
  -      do 335 m=1,meqn
  -         do 335 jbc=1,mbc
  -            do 335 i = 1-mbc, mx+mbc
  +      do m=1,meqn
  +         do jbc=1,mbc
  +            do i = 1-mbc, mx+mbc
                  q(i,1-jbc,m) = q(i,jbc,m)
  -  335       continue
  -c     # negate the normal velocity:
  -      do 336 jbc=1,mbc
  -         do 336 i = 1-mbc, mx+mbc
  +            end do
  +         end do
  +      end do
  +c     # negate the normal velocity:
  +      do jbc=1,mbc
  +         do i = 1-mbc, mx+mbc
               q(i,1-jbc,3) = -q(i,jbc,3)
  -  336    continue
  +         end do
  +      end do
         go to 399
   
     399 continue
  
positive.code: c     #   (1-ibc, j)   for ibc = 1,mbc,  j = 1-mbc, my+mbc
  c     #   (mx+ibc, j)  for ibc = 1,mbc,  j = 1-mbc, my+mbc
  c
        implicit double precision (a-h,o-z)
        dimension q(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, meqn)
        dimension aux(1-mbc:maxmx+mbc, 1-mbc:maxmy+mbc, *)
        dimension mthbc(4)
  
        common /cominf/ rinf,vinf,einf
  
  c
  c
  c-------------------------------------------------------
  
negative.code: c
    100 continue
  c     # user-specified boundary conditions go here in place of error output
        do ibc=1,mbc
           do j=1-mbc,my+mbc
              q(1-ibc,j,1) = rinf
              q(1-ibc,j,2) = rinf*vinf
              q(1-ibc,j,3) = 0.d0
              q(1-ibc,j,4) = einf
           end do
        end do
        go to 199
  c
    110 continue
  c     # zero-order extrapolation:
        do m=1,meqn
           do ibc=1,mbc
              do j = 1-mbc, my+mbc
                 q(1-ibc,j,m) = q(1,j,m)
              end do
           end do
        end do
        go to 199
  
    120 continue
  c     # periodic:
        do m=1,meqn
           do ibc=1,mbc
              do j = 1-mbc, my+mbc
                 q(1-ibc,j,m) = q(mx+1-ibc,j,m)
              end do
           end do
        end do
        go to 199
  
    130 continue
  c     # solid wall (assumes 2'nd component is velocity or momentum in x):
        do m=1,meqn
           do ibc=1,mbc
              do j = 1-mbc, my+mbc
                 q(1-ibc,j,m) = q(ibc,j,m)
              end do
           end do
        end do
  c     # negate the normal velocity:
        do ibc=1,mbc
           do j = 1-mbc, my+mbc
              q(1-ibc,j,2) = -q(ibc,j,2)
           end do
        end do
        go to 199
  
    199 continue
  