     wave[mv + meqn*2] = a3*v;
     s[2] = u+a;
     
-#if 1
     double smin[3],smax[3];
     for(int mw = 0; mw < mwaves; mw++)
     {

        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];
   }    

}

__device__ cudaclaw_cuda_rpn2_t bump_rpn2 = bump_rpn2shallow;
