     vx_imo =  dev_conserved[o1*n_cells + id] / d_imo;
     vy_imo =  dev_conserved[o2*n_cells + id] / d_imo;
     vz_imo =  dev_conserved[o3*n_cells + id] / d_imo;
+    #ifdef DE //PRESSURE_DE
+    E = dev_conserved[4*n_cells + id];
+    GE = dev_conserved[(n_fields-1)*n_cells + id];
+    E_kin = 0.5 * d_imo * ( vx_imo*vx_imo + vy_imo*vy_imo + vz_imo*vz_imo );
+    p_imo = Get_Pressure_From_DE( E, E - E_kin, GE, gamma ); 
+    #else
     p_imo  = (dev_conserved[4*n_cells + id] - 0.5*d_imo*(vx_imo*vx_imo + vy_imo*vy_imo + vz_imo*vz_imo)) * (gamma - 1.0);
+    #endif
     p_imo  = fmax(p_imo, (Real) TINY_NUMBER);
     #ifdef DE
     ge_imo = dev_conserved[(n_fields-1)*n_cells + id] / d_imo;

  int xid = tid - zid*nx*ny - yid*nx;

  int xs, xe, ys, ye, zs, ze;
  if (dir == 0) {
    xs = 3; xe = nx-4;
    ys = 0; ye = ny;
    zs = 0; ze = nz;
  }
  if (dir == 1) {
    xs = 0; xe = nx;
    ys = 3; ye = ny-4;
    zs = 0; ze = nz;
  }
  if (dir == 2) {
    xs = 0; xe = nx;
    ys = 0; ye = ny;
    zs = 3; ze = nz-4;
  }

  if (xid >= xs && xid < xe && yid >= ys && yid < ye && zid >= zs && zid < ze)

    vx_ipt =  dev_conserved[o1*n_cells + id] / d_ipt;
    vy_ipt =  dev_conserved[o2*n_cells + id] / d_ipt;
    vz_ipt =  dev_conserved[o3*n_cells + id] / d_ipt;
    #ifdef DE //PRESSURE_DE
    E = dev_conserved[4*n_cells + id];
    GE = dev_conserved[(n_fields-1)*n_cells + id];
    E_kin = 0.5 * d_ipt * ( vx_ipt*vx_ipt + vy_ipt*vy_ipt + vz_ipt*vz_ipt );
    p_ipt = Get_Pressure_From_DE( E, E - E_kin, GE, gamma );  
    #else
    p_ipt  = (dev_conserved[4*n_cells + id] - 0.5*d_ipt*(vx_ipt*vx_ipt + vy_ipt*vy_ipt + vz_ipt*vz_ipt)) * (gamma - 1.0);
    #endif
    p_ipt  = fmax(p_ipt, (Real) TINY_NUMBER);
    #ifdef DE
    ge_ipt = dev_conserved[(n_fields-1)*n_cells + id] / d_ipt;
