Loading src/TNL/Containers/DistributedArrayView.h +4 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,10 @@ public: __cuda_callable__ DistributedArrayView( const LocalRangeType& localRange, IndexType globalSize, CommunicationGroup group, LocalViewType localData ) : localRange(localRange), globalSize(globalSize), group(group), localData(localData) {} { TNL_ASSERT_EQ( localData.getSize(), localRange.getSize(), "The local array size does not match the local range of the distributed array." ); } __cuda_callable__ DistributedArrayView() = default; Loading src/TNL/Solvers/Linear/Preconditioners/Diagonal_impl.h +3 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ solve( ConstVectorViewType b, VectorViewType x ) const const auto b_view = b.getConstLocalView(); auto x_view = x.getLocalView(); TNL_ASSERT_EQ( b_view.getSize(), diagonal.getSize(), "The size of the vector b does not match the size of the extracted diagonal." ); TNL_ASSERT_EQ( x_view.getSize(), diagonal.getSize(), "The size of the vector x does not match the size of the extracted diagonal." ); auto kernel = [=] __cuda_callable__ ( IndexType i ) mutable { x_view[ i ] = b_view[ i ] / diag_view[ i ]; Loading src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h +3 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,9 @@ solve( ConstVectorViewType _b, VectorViewType _x ) const const auto b = Traits< Matrix >::getConstLocalView( _b ); auto x = Traits< Matrix >::getLocalView( _x ); TNL_ASSERT_EQ( b.getSize(), L.getRows(), "The size of the vector b does not match the size of the decomposed matrix." ); TNL_ASSERT_EQ( x.getSize(), U.getRows(), "The size of the vector x does not match the size of the decomposed matrix." ); // Step 1: solve y from Ly = b triangularSolveLower< true >( L, x, b ); Loading Loading
src/TNL/Containers/DistributedArrayView.h +4 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,10 @@ public: __cuda_callable__ DistributedArrayView( const LocalRangeType& localRange, IndexType globalSize, CommunicationGroup group, LocalViewType localData ) : localRange(localRange), globalSize(globalSize), group(group), localData(localData) {} { TNL_ASSERT_EQ( localData.getSize(), localRange.getSize(), "The local array size does not match the local range of the distributed array." ); } __cuda_callable__ DistributedArrayView() = default; Loading
src/TNL/Solvers/Linear/Preconditioners/Diagonal_impl.h +3 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ solve( ConstVectorViewType b, VectorViewType x ) const const auto b_view = b.getConstLocalView(); auto x_view = x.getLocalView(); TNL_ASSERT_EQ( b_view.getSize(), diagonal.getSize(), "The size of the vector b does not match the size of the extracted diagonal." ); TNL_ASSERT_EQ( x_view.getSize(), diagonal.getSize(), "The size of the vector x does not match the size of the extracted diagonal." ); auto kernel = [=] __cuda_callable__ ( IndexType i ) mutable { x_view[ i ] = b_view[ i ] / diag_view[ i ]; Loading
src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h +3 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,9 @@ solve( ConstVectorViewType _b, VectorViewType _x ) const const auto b = Traits< Matrix >::getConstLocalView( _b ); auto x = Traits< Matrix >::getLocalView( _x ); TNL_ASSERT_EQ( b.getSize(), L.getRows(), "The size of the vector b does not match the size of the decomposed matrix." ); TNL_ASSERT_EQ( x.getSize(), U.getRows(), "The size of the vector x does not match the size of the decomposed matrix." ); // Step 1: solve y from Ly = b triangularSolveLower< true >( L, x, b ); Loading