diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILU0.h b/src/TNL/Solvers/Linear/Preconditioners/ILU0.h index b94d7905263a353a40faa5be495486fa00625e6b..868cb81b3ff8d1053c1289ce990fa022c768e75e 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILU0.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILU0.h @@ -59,7 +59,7 @@ public: virtual void update( const MatrixPointer& matrixPointer ) override; - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override; + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override; protected: Matrices::CSR< RealType, DeviceType, IndexType > L; @@ -87,7 +87,7 @@ public: virtual void update( const MatrixPointer& matrixPointer ) override; - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override; + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override; ~ILU0_impl() { @@ -188,7 +188,7 @@ public: throw std::runtime_error("Not Iplemented yet for MIC"); } - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override { throw std::runtime_error("Not Iplemented yet for MIC"); } diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h b/src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h index 2b2244df365cacfc0779b037b79c80cbd833b784..8d220b8b0d7fe313e9507494e1f4e06c554fa0c6 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILU0_impl.h @@ -103,7 +103,7 @@ update( const MatrixPointer& matrixPointer ) } template< typename Matrix, typename Real, typename Index > -bool +void ILU0_impl< Matrix, Real, Devices::Host, Index >:: solve( ConstVectorViewType b, VectorViewType x ) const { @@ -147,8 +147,6 @@ solve( ConstVectorViewType b, VectorViewType x ) const x[ i ] /= U_ii; } - - return true; } @@ -262,7 +260,7 @@ update( const MatrixPointer& matrixPointer ) } template< typename Matrix > -bool +void ILU0_impl< Matrix, double, Devices::Cuda, int >:: solve( ConstVectorViewType b, VectorViewType x ) const { @@ -290,8 +288,6 @@ solve( ConstVectorViewType b, VectorViewType x ) const y.getData(), x.getData(), policy_U, (void*) pBuffer.getData() ); - - return true; #else throw std::runtime_error("The program was not compiled with the CUSPARSE library. Pass -DHAVE_CUSPARSE -lcusparse to the compiler."); #endif diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILUT.h b/src/TNL/Solvers/Linear/Preconditioners/ILUT.h index f9147c7b88972bc2d4e409fe08c14614ed8bc274..3fbb1ee11c612432e63e6678457af867c79c6e67 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILUT.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILUT.h @@ -64,7 +64,7 @@ public: virtual void update( const MatrixPointer& matrixPointer ) override; - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override; + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override; protected: Index p = 0; @@ -92,7 +92,7 @@ public: throw std::runtime_error("Not Iplemented yet for CUDA"); } - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override { throw std::runtime_error("Not Iplemented yet for CUDA"); } @@ -115,7 +115,7 @@ public: throw std::runtime_error("Not Iplemented yet for MIC"); } - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const override + virtual void solve( ConstVectorViewType b, VectorViewType x ) const override { throw std::runtime_error("Not Iplemented yet for MIC"); } diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILUT_impl.h b/src/TNL/Solvers/Linear/Preconditioners/ILUT_impl.h index bb08ffb1440d79ea8b4e9b354e7088b0b3194245..4a7a724a5b89a977190b48a2cc8dc68ffaf052b2 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILUT_impl.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILUT_impl.h @@ -241,7 +241,7 @@ update( const MatrixPointer& matrixPointer ) } template< typename Matrix, typename Real, typename Index > -bool +void ILUT_impl< Matrix, Real, Devices::Host, Index >:: solve( ConstVectorViewType b, VectorViewType x ) const { @@ -289,8 +289,6 @@ solve( ConstVectorViewType b, VectorViewType x ) const x[ i ] /= U_ii; } - - return true; } } // namespace Preconditioners diff --git a/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h b/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h index cda81802da2c92c8e23d5e42537196a0625d0b2e..70c5d7cf844799c9c39cb43a9aa7a7d194e1c41c 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h +++ b/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h @@ -46,10 +46,9 @@ public: virtual void update( const MatrixPointer& matrixPointer ) {} - virtual bool solve( ConstVectorViewType b, VectorViewType x ) const + virtual void solve( ConstVectorViewType b, VectorViewType x ) const { TNL_ASSERT_TRUE( false, "The solve() method of a dummy preconditioner should not be called." ); - return true; } String getType() const