Commit 65e1cc9e authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed ILU preconditioners for distributed matrices

parent 863a4f69
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -96,9 +96,6 @@ solve( ConstVectorViewType b, VectorViewType x ) const
   const auto b_view = b.getConstLocalView();
   auto x_view = x.getLocalView();

   // wait for pending synchronization
   b.waitForSynchronization();

   // compute without ghosts (diagonal includes only local rows)
   x_view = b_view / diag_view;

+6 −1
Original line number Diff line number Diff line
@@ -90,7 +90,12 @@ protected:
   template< typename M >
   static IndexType getMinColumn( const Matrices::DistributedMatrix< M >& m )
   {
      if( m.getRows() == m.getColumns() )
         // square matrix, assume global column indices
         return m.getLocalRowRange().getBegin();
      else
         // non-square matrix, assume ghost indexing
         return 0;
   }
};

+3 −0
Original line number Diff line number Diff line
@@ -145,6 +145,9 @@ solve( ConstVectorViewType _b, VectorViewType _x ) const

   // Step 2: solve x from Ux = y
   triangularSolveUpper< true, true >( U, x, x );

   // synchronize ghosts
   Traits< Matrix >::startSynchronization( _x );
}


+6 −1
Original line number Diff line number Diff line
@@ -79,7 +79,12 @@ protected:
   template< typename M >
   static IndexType getMinColumn( const Matrices::DistributedMatrix< M >& m )
   {
      if( m.getRows() == m.getColumns() )
         // square matrix, assume global column indices
         return m.getLocalRowRange().getBegin();
      else
         // non-square matrix, assume ghost indexing
         return 0;
   }
};

+3 −0
Original line number Diff line number Diff line
@@ -272,6 +272,9 @@ solve( ConstVectorViewType _b, VectorViewType _x ) const

   // Step 2: solve x from Ux = y
   triangularSolveUpper< true, false >( U, x, x );

   // synchronize ghosts
   Traits< Matrix >::startSynchronization( _x );
}

} // namespace Preconditioners
Loading