Skip to content

Commit d1653a9

Browse files
committed
Add TPTVR to x2 Riemann
1 parent bd88c70 commit d1653a9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/hydro/hydro.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,13 +1248,28 @@ TaskStatus CalculateFluxes(MeshData<Real> *u0_data, MeshData<Real> *u1_data,
12481248
u0_wr_pack(b, n, k, j, i));
12491249
});
12501250
}
1251+
#if 0
12511252
pmb->par_for(
12521253
"x2 Riemann", 0, u0_cons_pack.GetDim(5) - 1, kb.s, kb.e, jb.s, jb.e + 1, ib.s,
12531254
ib.e, KOKKOS_LAMBDA(const int b, const int k, const int j, const int i) {
12541255
auto &wl = u0_wl_pack(b);
12551256
const auto &wr = u0_wr_pack(b);
12561257
riemann.Solve(k, j, i, IV2, wl, wr, eos, c_h);
12571258
});
1259+
#endif
1260+
scratch_size_in_bytes = 0;
1261+
parthenon::par_for_outer(
1262+
DEFAULT_OUTER_LOOP_PATTERN, "x2 Riemann TeamPolicy", DevExecSpace(),
1263+
scratch_size_in_bytes, scratch_level, 0, u0_cons_pack.GetDim(5) - 1, kb.s, kb.e,
1264+
jb.s, jb.e + 1,
1265+
KOKKOS_LAMBDA(parthenon::team_mbr_t member, const int b, const int k,
1266+
const int j) {
1267+
auto &wl = u0_wl_pack(b);
1268+
const auto &wr = u0_wr_pack(b);
1269+
parthenon::par_for_inner(member, ib.s, ib.e, [&](const int i) {
1270+
riemann.Solve(k, j, i, IV2, wl, wr, eos, c_h);
1271+
});
1272+
});
12581273
const auto dx2 = pmb->coords.CellWidth<X2DIR>(0, 0, 0);
12591274
pmb->par_for(
12601275
"UpdateFluxDiv x2", 0, u0_cons_pack.GetDim(5) - 1, 0, u0_cons_pack.GetDim(4) - 1,

0 commit comments

Comments
 (0)