@@ -381,3 +381,42 @@ TYPED_TEST(SchwarzPreconditioner, CanApplyPreconditionerWithL1Smoother)
381381 this ->assert_equal_to_non_distributed_vector (this ->dist_x ,
382382 this ->non_dist_x );
383383}
384+
385+ TYPED_TEST (SchwarzPreconditioner, CanApplyPreconditionedSolverWithL1Smoother)
386+ {
387+ using value_type = typename TestFixture::value_type;
388+ using csr = typename TestFixture::local_matrix_type;
389+ using cg = typename TestFixture::solver_type;
390+ using prec = typename TestFixture::dist_prec_type;
391+ constexpr double tolerance = 1e-20 ;
392+ auto iter_stop = gko::share (
393+ gko::stop::Iteration::build ().with_max_iters (200u ).on (this ->exec ));
394+ auto tol_stop = gko::share (
395+ gko::stop::ResidualNorm<value_type>::build ()
396+ .with_reduction_factor (
397+ static_cast <gko::remove_complex<value_type>>(tolerance))
398+ .on (this ->exec ));
399+ this ->dist_solver_factory =
400+ cg::build ()
401+ .with_preconditioner (
402+ prec::build ()
403+ .with_local_solver (this ->local_solver_factory )
404+ .with_l1_smoother (true )
405+ .on (this ->exec ))
406+ .with_criteria (iter_stop, tol_stop)
407+ .on (this ->exec );
408+ auto dist_solver = this ->dist_solver_factory ->generate (this ->dist_mat );
409+ this ->non_dist_solver_factory =
410+ cg::build ()
411+ .with_preconditioner (this ->local_solver_factory )
412+ .with_criteria (iter_stop, tol_stop)
413+ .on (this ->exec );
414+ auto non_dist_solver =
415+ this ->non_dist_solver_factory ->generate (this ->non_dist_mat );
416+
417+ dist_solver->apply (this ->dist_b .get (), this ->dist_x .get ());
418+ non_dist_solver->apply (this ->non_dist_b .get (), this ->non_dist_x .get ());
419+
420+ this ->assert_equal_to_non_distributed_vector (this ->dist_x ,
421+ this ->non_dist_x );
422+ }
0 commit comments