Skip to content

Commit

Permalink
Bugfix in Hypre ParCSR to BSR conversion.
Browse files Browse the repository at this point in the history
The Hypre ParCSR to Raptor BSR conversion utility used column instead
of row major ordering for the blocks.
  • Loading branch information
andrewreisner committed Sep 27, 2024
1 parent 6f963f6 commit fa7a961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raptor/external/hypre_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ raptor::ParBSRMatrix* convert(hypre_ParCSRMatrix* A_hypre,
bmap[pos] = blk;
} else
blk = blkit->second;
blk[(diag_j[off] % b_cols) * b_rows + i] = diag_data[off];
blk[i * b_cols + (diag_j[off] % b_cols)] = diag_data[off];
}
}
// add blocks to A
Expand Down Expand Up @@ -307,7 +307,7 @@ raptor::ParBSRMatrix* convert(hypre_ParCSRMatrix* A_hypre,
bmap[pos] = blk;
} else
blk = blkit->second;
blk[(global_col % b_cols) * b_rows + i] = offd_data[off];
blk[i * b_cols + (global_col % b_cols)] = offd_data[off];
}
}
// add blocks to A
Expand Down

0 comments on commit fa7a961

Please sign in to comment.