Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Belos: Question about setting custom convergence tolerances #6733

Closed
stelin314 opened this issue Feb 4, 2020 · 4 comments
Closed

Belos: Question about setting custom convergence tolerances #6733

stelin314 opened this issue Feb 4, 2020 · 4 comments

Comments

@stelin314
Copy link

I currently have a problem with the following form

r = b - Ax

I've set up the problem to use the CG solver within Belos (currently not preconditioned, will change later). Right now, (I believe) it judges convergence by using the l2 norm of the residual 'r' if I don't use any Implicit/Explicit residual scaling.

I was wondering if there is a way make some kind of custom convergence calculation where rather than using the l2 norm of just the residual r, it uses the l2 norm of something that looks like r/d (an element wise division), where d is some vector of diagonal values from a matrix.

Any input would be appreciated, and thanks for your time!

-Stephen

@mayrmt
Copy link
Member

mayrmt commented Feb 4, 2020

@trilinos/belos

@mayrmt
Copy link
Member

mayrmt commented Feb 4, 2020

@stelin314 Here's an excerpt from the Belos design paper:

Belos provides a generic interface called StatusTest for stopping criteria. Solvers construct im- plementations of this interface to control termination of the subspace construction (Iteration). Users can also provide custom stopping criteria by implementing their own StatusTest subclass and passing an instance of it to the solver.

Here's the full reference with more information on that topic:

@article{Bavier2012a,
	Author = {Bavier, Eric and Hoemmen, Mark and Rajamanickam, Sivasankaran and Thornquist, Heidi},
	Journal = {Scientific Programming},
	Number = {3},
	Pages = {241--255},
	Title = {{Amesos2 and Belos: Direct and Iterative Solvers for Large Sparse Linear Systems}},
	Volume = {20},
	Year = {2012},
	}

@mayrmt mayrmt changed the title Question about setting custom convergence tolerances Belos: Question about setting custom convergence tolerances Feb 4, 2020
@hkthorn
Copy link
Contributor

hkthorn commented Feb 4, 2020

@stelin314 Customization of status tests that define the stopping criterion of iterative solvers has been primarily targeting the GMRES solvers. The CG solvers do not have the same set of options or flexibility. The scaling that you propose would be possible if those extensions were made.

Are you using a released version of Trilinos, or the develop/master branch of Trilinos?

@stelin314
Copy link
Author

Thank you for the responses!

I believe I am using the develop/master branch of Trilinos. The status test sounds quite useful, but there may be other things I can do on my end to get around this issue. I just wanted to check if this diagonal scaling of the residual was possible (for CG), and it seems like it may be in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants