Skip to content

Commit

Permalink
Fix partitioning
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson committed Apr 18, 2024
1 parent 4a9ed11 commit d02dc11
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/Fortran/distributed_algebra_includes/ScaleDiagonal.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INTEGER :: II, row
INTEGER :: II, col

!! Merge to the local block
CALL MergeMatrixLocalBlocks(this, lmat)
Expand All @@ -7,10 +7,10 @@
CALL ConstructTripletList(filtered)
DO II = 1, tlist%CurrentSize
CALL GetTripletAt(tlist, II, trip)
row = trip%index_row
IF (row .GE. this%start_row .AND. row .LT. this%end_row) THEN
trip%index_row = trip%index_row - this%start_row + 1
trip%index_column = trip%index_row
col = trip%index_column
IF (col .GE. this%start_column .AND. col .LT. this%end_column) THEN
trip%index_column = trip%index_column - this%start_column + 1
trip%index_row = trip%index_column
CALL AppendToTripletList(filtered, trip)
END IF
END DO
Expand All @@ -21,4 +21,4 @@
!! Split
CALL SplitMatrixToLocalBlocks(this, lmat)
CALL DestructMatrix(lmat)
CALL DestructTripletList(filtered)
CALL DestructTripletList(filtered)

0 comments on commit d02dc11

Please sign in to comment.