Esempio n. 1
0
void overFace::rusanovFlux(void)
{
  /* Different flux function to utilize interpolated corrected flux, but still
   * apply upwinding */
  if (params->oversetMethod == 1) {
    for (int fpt=0; fpt<nFptsL; fpt++) {
      // Get primitive variables
      double rhoL = UL(fpt,0);     double rhoR = UR(fpt,0);
      double uL = UL(fpt,1)/rhoL;  double uR = UR(fpt,1)/rhoR;
      double vL = UL(fpt,2)/rhoL;  double vR = UR(fpt,2)/rhoR;

      double wL, pL, vnL=0.;
      double wR, pR, vnR=0.;
      double vgn=0.;

      // Calculate pressure
      if (params->nDims==2) {
        pL = (params->gamma-1.0)*(UL(fpt,3)-0.5*rhoL*(uL*uL+vL*vL));
        pR = (params->gamma-1.0)*(UR(fpt,3)-0.5*rhoR*(uR*uR+vR*vR));
      }
      else {
        wL = UL(fpt,3)/rhoL;   wR = UR(fpt,3)/rhoR;
        pL = (params->gamma-1.0)*(UL(fpt,4)-0.5*rhoL*(uL*uL+vL*vL+wL*wL));
        pR = (params->gamma-1.0)*(UR(fpt,4)-0.5*rhoR*(uR*uR+vR*vR+wR*wR));
      }

      // Get normal fluxes, normal velocities
      for (int dim=0; dim<params->nDims; dim++) {
        vnL += normL(fpt,dim)*UL(fpt,dim+1)/rhoL;
        vnR += normL(fpt,dim)*UR(fpt,dim+1)/rhoR;
        if (params->motion)
          vgn += normL(fpt,dim)*Vg(fpt,dim);
      }

      // Get maximum eigenvalue for diffusion coefficient
      double csqL = max(params->gamma*pL/rhoL,0.0);
      double csqR = max(params->gamma*pR/rhoR,0.0);
      double eigL = std::fabs(vnL) + sqrt(csqL);
      double eigR = std::fabs(vnR) + sqrt(csqR);
      double eig  = max(eigL,eigR);

      /* Calculate Rusanov flux using corrected normal flux from donor grid
       * (copied to Fn) */

      // Outflow - use internal state
      if (vnL - vgn > 0) {
        inviscidFlux(UL[fpt],tempFL,params);
        double tempFnL[5] = {0,0,0,0,0};
        for (int k=0; k<nFields; k++)
          for (int dim=0; dim<nDims; dim++)
            tempFnL[k] += tempFL[dim][k]*normL(fpt,dim);

        for (int k=0; k<params->nFields; k++) {
          Fn(fpt,k) = tempFnL[k] - 0.5*eig*(UR(fpt,k)-UL(fpt,k));
        }
      }

      // Inflow - use external state [previously copied into Fn]
      else {
        for (int k=0; k<params->nFields; k++) {
          Fn(fpt,k) = Fn(fpt,k) - 0.5*eig*(UR(fpt,k)-UL(fpt,k));
        }
      }

      // Store wave speed for calculation of allowable dt
      if (params->motion) {
        eigL = std::fabs(vnL-vgn) + sqrt(csqL);
        eigR = std::fabs(vnR-vgn) + sqrt(csqR);
      }
      *waveSp[fpt] = max(eigL,eigR);
    }
  }

  // For other overset methods, just call normal Rusanov flux
  else {
    face::rusanovFlux();
  }
}
Esempio n. 2
0
int R() {
int SG;
int tu;
int b;
int cbnn;
int fJA;
int Ywh;
int Sd3i;
int U;
int FTe;
;
if (AgC9 > + (Y0V(UnE, 791438648 + cK(517618502, + N_ != Ed() != - (Yk(((883538282)), nBa)), sdDM(kC, (1604897559), ! ! 528836364 / (1815076270) / 1477268768), n), psl, - 126855483))) while (om(AZ)) {
int xF;
int yd;
int xEmV;
int vc;
int m9;
while (2044928990) while (- 644557172 + 1573824677 + 1727264726 < TvAP(1980609521, Jy47, C, 953854953, - WyD(RlhU(LY0), + ipA(G, (Vg((1882502790), (1790689388) == 711715734 / (_) != + ! (134548752)))), nk1(((2078180300)) - + - 1230367323 - gD13, pK38 / 1377998756, m4G(1127784867) > u, (QSs()), 1389625403), 929895424, 895835811 < dW) * - 1339857856) / 2045295101) while (pLb) while (+ 1321345616) return ! 708468611;
(J);
return eUY;
continue;
(bRvz = 1838176344);
r(F + ! 196992386, Gg);
if (1419330106) ! (- (uG)) <= ! 996971325;
 else T((- ! 2092297653 <= AA >= ! 1494541558 == o((! + v7nD))), 1818433226);
}
 else break;
;
;
if (! (! cQ63(1853496451, i(DW9, 988295904 > _Gv, Wlbr, b) / ! ((O(xl))) - - O(+ a_O > 318640956, 1005354893, 167517361) / If, GDD, u, B) * B) + 443946612 + (dN(BFD3(mg <= 1303591176 + hFH2, x) % hch > 1053610009 / RaZ0(ZC7O((720576768)), 124325761, K(! C, 1901412912 * 1202992483, + (+ + e * 389490648), + 1244843051 < (sm = dH), W9(1583501857)), - ! sIs, 1297610228)))) lYAi(1443174874, U8R, + 925787186);
 else continue;
continue;
if (+ ! 329152016 + K2()) continue;
 else ;
continue;
continue;
}