diff --git a/src/TNL/Solvers/Linear/GMRES_impl.h b/src/TNL/Solvers/Linear/GMRES_impl.h index 2e412398e579cfa62d59f79eec40299aa0945d68..eb2dd89d336ad57a35c62c29e3fb86399668bda0 100644 --- a/src/TNL/Solvers/Linear/GMRES_impl.h +++ b/src/TNL/Solvers/Linear/GMRES_impl.h @@ -459,8 +459,10 @@ hauseholder_apply_trunc( HostView out, // no-op if the problem is not distributed CommunicatorType::Bcast( YL_i.getData(), YL_i.getSize(), 0, Traits::getCommunicationGroup( *this->matrix ) ); - // TODO: is aux always 1? - const RealType aux = T[ i + i * (restarting_max + 1) ] * y_i.scalarProduct( z ); + // NOTE: aux = t_i * (y_i, z) = 1 since t_i = 2 / ||y_i||^2 and + // (y_i, z) = ||z_trunc||^2 + |z_i| ||z_trunc|| = ||y_i||^2 / 2 +// const RealType aux = T[ i + i * (restarting_max + 1) ] * y_i.scalarProduct( z ); + constexpr RealType aux = 1.0; if( localOffset == 0 ) { if( std::is_same< DeviceType, Devices::Host >::value ) { for( int k = 0; k <= i; k++ )