   Real vm, pm; //velocity and pressure in the star region
 
   #ifdef DE
-  Real gel, ger;
+  Real gel, ger, E_kin, E, dge ;
   #endif
 
   #ifdef SCALAR

    vxl = dev_bounds_L[o1*n_cells + tid]/dl;
    vyl = dev_bounds_L[o2*n_cells + tid]/dl;
    vzl = dev_bounds_L[o3*n_cells + tid]/dl;
    pl  = (dev_bounds_L[4*n_cells + tid] - 0.5*dl*(vxl*vxl + vyl*vyl + vzl*vzl)) * (gamma - 1.0);
    pl  = fmax(pl, (Real) TINY_NUMBER);
    #ifdef SCALAR
    for (int i=0; i<NSCALARS; i++) {

    }
    #endif
    #ifdef DE
    gel = dge / dl;
    #endif
    dr  = dev_bounds_R[            tid];
    vxr = dev_bounds_R[o1*n_cells + tid]/dr;
    vyr = dev_bounds_R[o2*n_cells + tid]/dr;
    vzr = dev_bounds_R[o3*n_cells + tid]/dr;
    #ifdef DE //PRESSURE_DE
    E = dev_bounds_R[4*n_cells + tid];
    E_kin = 0.5 * dr * ( vxr*vxr + vyr*vyr + vzr*vzr );
    dge = dev_bounds_R[(n_fields-1)*n_cells + tid];
    pr = Get_Pressure_From_DE( E, E - E_kin, dge, gamma ); 
    #else   
    pr  = (dev_bounds_R[4*n_cells + tid] - 0.5*dr*(vxr*vxr + vyr*vyr + vzr*vzr)) * (gamma - 1.0);  
    #endif //PRESSURE_DE
    pr  = fmax(pr, (Real) TINY_NUMBER);
    #ifdef SCALAR
    for (int i=0; i<NSCALARS; i++) {
