Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6649 Discussions

## Using fgmres_full_funct sample

Beginner
149 Views

Dear Intel MKL User,

I try to see into a matter of MKL for solving systems of second order with symmetrical and unsymmetrical matrixes. Therefore I tried to analyze the examples and got stuck with part of code fgmres_full_funct with preconditioner calling. I didn't understand the code below (especially for tmp(ipar(23)+0,1,..4) assignment.

I wonder if anyone could explain it:

! If RCI_REQUEST=3, then apply the preconditioner on the vector
! TMP(IPAR(22)) and put the result in vector TMP(IPAR(23))
!---------------------------------------------------------------------------
IF (RCI_REQUEST.EQ.3) THEN
IF (IPAR(4).EQ.3) THEN
TMP(IPAR(23)+0)=-2.0D0
TMP(IPAR(23)+1)= 0.08519601586107672D0
TMP(IPAR(23)+2)=-1.1590871369607090D0
TMP(IPAR(23)+3)=-0.65791939687456980D0
TMP(IPAR(23)+4)= 0.75660051476696133D0
ELSE
IF(IPAR(4).EQ.4) THEN
TMP(IPAR(23)+0)= 0.0D0
TMP(IPAR(23)+1)= 0.0D0
TMP(IPAR(23)+2)= 0.0D0
TMP(IPAR(23)+3)= 1.0D0
TMP(IPAR(23)+4)=-1.0D0
ELSE
DO I=0,N-1
TMP(IPAR(23)+I)=I*TMP(IPAR(22)+I)
ENDDO
ENDIF
ENDIF

GOTO 1
ENDIF

Thanks

Ivan

1 Reply
Moderator
149 Views
 RCI_request= 3 apply the preconditioner to tmp[ipar[21] - 1:ipar[21] + n - 2], put the result intmp[ipar[22] - 1:ipar[22] + n - 2], and return the control to the dfgmres routine. RCI_request= 4 check if the norm of the current orthogonal vector is zero, within the rounding or computational errors. Return the control to the dfgmres routine if it is not zero, otherwise complete the solution process by calling dfgmres_get routine.