Skip to content

Commit 452bbcf

Browse files
committed
correct ghost communication
1 parent 36ae82e commit 452bbcf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/shammodels/sph/src/Solver.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,8 +1439,11 @@ void shammodels::sph::Solver<Tvec, Kern>::communicate_merge_ghosts_fields() {
14391439
if (has_B_field) {
14401440
sender_patch.get_field<Tvec>(iB_on_rho).append_subset_to(
14411441
buf_idx, cnt, pdat.get_field<Tvec>(iB_interf));
1442-
sender_patch.get_field<Tvec>(iJ).append_subset_to(
1443-
buf_idx, cnt, pdat.get_field<Tvec>(iJ_interf));
1442+
// sender_patch.get_field<Tvec>(iJ).append_subset_to(
1443+
// buf_idx, cnt, pdat.get_field<Tvec>(iJ_interf));
1444+
shambase::get_check_ref(storage.MagCurrentJ)
1445+
.get(sender)
1446+
.append_subset_to(buf_idx, cnt, pdat.get_field<Tvec>(iJ_interf));
14441447
}
14451448

14461449
if (has_psi_field) {
@@ -1523,7 +1526,9 @@ void shammodels::sph::Solver<Tvec, Kern>::communicate_merge_ghosts_fields() {
15231526

15241527
if (has_B_field) {
15251528
pdat_new.get_field<Tvec>(iB_interf).insert(pdat.get_field<Tvec>(iB_on_rho));
1526-
pdat_new.get_field<Tvec>(iJ_interf).insert(pdat.get_field<Tvec>(iJ));
1529+
// pdat_new.get_field<Tvec>(iJ_interf).insert(pdat.get_field<Tvec>(iJ));
1530+
pdat_new.get_field<Tvec>(iJ_interf).insert(
1531+
shambase::get_check_ref(storage.MagCurrentJ).get(p.id_patch));
15271532
}
15281533

15291534
if (has_psi_field) {

0 commit comments

Comments
 (0)