CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Number of Vectors in Krylov Solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 2021, 13:42
Default Number of Vectors in Krylov Solver
  #1
New Member
 
ugurtan
Join Date: May 2020
Location: Munich, Germany
Posts: 19
Rep Power: 5
ugurtan666 is on a distinguished road
Hello SU2 users,

I am using SU2 707 for my research. Actually, I have three questions.

1) Is there a way to see the final residual (residual from the last linear solver iteration) from the linear solver in screen output or history file?

2) I can control the number of iterations by the LINEAR_SOLVER_ITER variable, but I do not know how many vectors in the Krylov subspace applied in the solver. Is it automatically equal to the maximum number of iterations, if not what is it? (For example in HiSA solver of OpenFOAM, nKrylov and max iteration parameters are assigned separately.)

3) Is there a way to see that iteration completed since the max number of iteration is reached or minimum LINEAR_SOLVER_ERROR convergence criterion is satisfied?

I think that those questions are important because the optimization of CFL number arrangements and linear solver settings depend on the mesh and physics of problem, mostly the physical eigenvalues in the flux jacobian matrices. I have to optimize it because I have limited computational source and I have to complete series of runs at different BC's with strict deadlines.

Thank you for answers and for your time.
ugurtan666 is offline   Reply With Quote

Old   April 18, 2021, 16:16
Default
  #2
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 465
Rep Power: 13
pcg is on a distinguished road
Hello

1 and 3) For screen output LINSOL_RESIDUAL and LINSOL_ITER, for history output LINSOL outputs both

2) I think you are referring to FGMRES with restarts? FGMRES uses up to LINEAR_SOLVER_ITER vectors, RESTARTED_FGMRES uses up to LINEAR_SOLVER_RESTART_FREQUENCY vectors and up to LINEAR_SOLVER_ITER total iterations. Other linear solvers in SU2 never restart.
pcg is offline   Reply With Quote

Old   April 22, 2021, 08:15
Default
  #3
New Member
 
ugurtan
Join Date: May 2020
Location: Munich, Germany
Posts: 19
Rep Power: 5
ugurtan666 is on a distinguished road
Quote:
Originally Posted by pcg View Post
Hello

1 and 3) For screen output LINSOL_RESIDUAL and LINSOL_ITER, for history output LINSOL outputs both

2) I think you are referring to FGMRES with restarts? FGMRES uses up to LINEAR_SOLVER_ITER vectors, RESTARTED_FGMRES uses up to LINEAR_SOLVER_RESTART_FREQUENCY vectors and up to LINEAR_SOLVER_ITER total iterations. Other linear solvers in SU2 never restart.
Hello,

Thank you very much for brief explanation and answers for 1 and 3.

When it comes to 2, I still have some troubles.

I am using FGMRES and ILU preconditioner with zero level. Linear solver settings are as shown below.

% ------------------------ LINEAR SOLVER DEFINITION ---------------------------%
%
% Linear solver for the implicit (or discrete adjoint) formulation (BCGSTAB, FGMRES)
LINEAR_SOLVER= FGMRES
%
% Preconditioner of the Krylov linear solver (NONE, JACOBI, LINELET)
LINEAR_SOLVER_PREC= ILU

%
% Min error of the linear solver for the implicit formulation
LINEAR_SOLVER_ERROR= 1E-10
%
% Max number of iterations of the linear solver for the implicit formulation
LINEAR_SOLVER_ITER= 25


Let me write what I understood below. Linear solver starts with a maximum number of 25 iterations unless linear solver error condition is satisfied.

I think that the solver starts with the construction of Krylov subspace vectors at each iteration (I do not know how many vectors in it, actually I tried to ask it.). After the execution of GMRES algorithm, first iteration is completed.

New residual is calculated for the second iteration with other Krylov basis vectors until max iteration or linear solver residual criterion is satisfied.

I tried to ask the number of Krylov basis vectors in the solver, but I understood from your answer that LINEAR_SOLVER_ITER is actually the number of Krylov subspace basis vectors to which gram-schmidt orthogonalization is applied to find the cost function. It also means that there is no second tour of Krylov construction procedure.

If it is true all I need your approval but if it is not I have still some problems with the notation and variables.
ugurtan666 is offline   Reply With Quote

Old   April 23, 2021, 11:58
Default
  #4
pcg
Senior Member
 
Pedro Gomes
Join Date: Dec 2017
Posts: 465
Rep Power: 13
pcg is on a distinguished road
The linear solvers in SU2 are implemented exactly as they are described in the literature, see for example the fundamental book by Saad.
pcg is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar no field transfert Jeanp OpenFOAM Pre-Processing 3 June 18, 2022 13:01
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 06:02
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 23:29
SigFpe when running ANY application in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 23, 2015 15:53
foam-extend_3.1 decompose and pyfoam warning shipman OpenFOAM 3 July 24, 2014 09:14


All times are GMT -4. The time now is 00:25.