         bpasdq[mq] += smax[1]*waveb[meqn + mq];
         bpasdq[mq] += smax[2]*waveb[2*meqn + mq];
     }
-#else
-
-    for(int mq = 0; mq < meqn; mq++)
-    {
-        bmasdq[mq] = 0;
-        bpasdq[mq] = 0;
-    }
-    for(int mw = 0; mw < mwaves; mw++)
-    {        
-        double smin = (sb[mw] <  0) ? sb[mw] : 0.0;
-        double smax = (sb[mw] >= 0) ? sb[mw] : 0.0; 
-        int idx = mw*meqn;
-
-        bmasdq[0] += smin*waveb[0 + idx];
-        bmasdq[1] += smin*waveb[1 + idx];
-        bmasdq[2] += smin*waveb[2 + idx];
-
-        bpasdq[0] += smax*waveb[0 + idx];
-        bpasdq[1] += smax*waveb[1 + idx];
-        bpasdq[2] += smax*waveb[2 + idx];
-    }
-#endif    
-
 }
 
 

        apdq[mq] += smax[1]*wave[meqn + mq];
        apdq[mq] += smax[2]*wave[2*meqn + mq];
   }    
#else
    for(int mq = 0; mq < meqn; mq++)
    {
        amdq[mq] = 0;
        apdq[mq] = 0;
    }
    for(int mw = 0; mw < mwaves; mw++)
    {        
        double smin = (s[mw] <  0) ? s[mw] : 0.0;
        double smax = (s[mw] >= 0) ? s[mw] : 0.0; 
        int idx = mw*meqn;
        
        amdq[0] += smin*wave[0 + idx];
        amdq[1] += smin*wave[1 + idx];
        amdq[2] += smin*wave[2 + idx];

        apdq[0] += smax*wave[0 + idx];
        apdq[1] += smax*wave[1 + idx];
        apdq[2] += smax*wave[2 + idx];
    }
#endif
}

__device__ cudaclaw_cuda_rpn2_t bump_rpn2 = bump_rpn2shallow;

    waveb[2*meqn + mv] = alpha3*(v+a);
    sb[2] = v + a;

    double smin[3], smax[3];
    for(int mw = 0; mw < mwaves; mw++)
    {
        smin[mw] = (sb[mw] < 0) ? sb[mw] : 0.0;
        smax[mw] = (sb[mw] >= 0) ? sb[mw] : 0.0;        
    }

    for(int mq = 0; mq < meqn; mq++)
    {        
