diff --git a/src/pgen/tests/shock_tube.cpp b/src/pgen/tests/shock_tube.cpp index 393eccae..87bf5635 100644 --- a/src/pgen/tests/shock_tube.cpp +++ b/src/pgen/tests/shock_tube.cpp @@ -114,6 +114,7 @@ void ProblemGenerator::ShockTube(ParameterInput *pin, const bool restart) { Real yr = pin->GetOrAddReal("problem","yr",0.0); auto &w0 = pmbp->phydro->w0; + auto &nscal = pmbp->phydro->nscalars; par_for("pgen_shock1", DevExeSpace(),0,(pmbp->nmb_thispack-1),ks,ke,js,je,is,ie, KOKKOS_LAMBDA(int m,int k, int j, int i) { Real x; @@ -141,7 +142,7 @@ void ProblemGenerator::ShockTube(ParameterInput *pin, const bool restart) { w0(m,ivy,k,j,i) = wl.vy*u0l; w0(m,ivz,k,j,i) = wl.vz*u0l; w0(m,IEN,k,j,i) = wl.e; - for (int r=0; rphydro->nscalars; ++r) { + for (int r=0; rphydro->nscalars; ++r) { + for (int r=0; rpmhd->w0; auto &b0 = pmbp->pmhd->b0; auto &bcc0 = pmbp->pmhd->bcc0; + auto &nscal = pmbp->pmhd->nscalars; par_for("pgen_shock1", DevExeSpace(),0,(pmbp->nmb_thispack-1),ks,ke,js,je,is,ie, KOKKOS_LAMBDA(int m,int k, int j, int i) { Real x,bxl,byl,bzl,bxr,byr,bzr; @@ -243,7 +245,7 @@ void ProblemGenerator::ShockTube(ParameterInput *pin, const bool restart) { w0(m,ivy,k,j,i) = wl.vy*u0l; w0(m,ivz,k,j,i) = wl.vz*u0l; w0(m,IEN,k,j,i) = wl.e; - for (int r=0; rpmhd->nscalars; ++r) { + for (int r=0; rpmhd->nscalars; ++r) { + for (int r=0; r