        real function minmod(s1,s2) 
        if (s1*s2 .gt. 0.0 .and. s1.lt.0.0) then
   C      s1 and s2 are < 0   
          minmod =  AMAX1(s1,s2)   
        else if (s1*s2 .gt. 0.0)  then
   C      s1 and s2 are > 0   
          minmod = AMIN1(s1,s2)   
        else 
   C    If s1 and s2 are not of the same sign or one is 0   
           minmod = 0.0   
        endif 
        return 
        end 
