Skip to content

Commit

Permalink
Why does n become zero?
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Aug 5, 2024
1 parent 40e07f1 commit 123c31b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions fem/src/IterativeMethods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,10 @@ SUBROUTINE ComplexBiCGStabl( n, A, x, b, MaxRounds, Tol, MaxTol, Converged, &

IF ( l < 2) CALL Fatal( 'RealBiCGStabl', 'Polynomial degree < 2' )

IF(InfoActive(25)) THEN
PRINT *,'ndim:',ndim,n
END IF

IF ( ALL(x == CMPLX(0.0d0,0.0d0,kind=dp)) ) x = b

zzero = CMPLX( 0.0d0,0.0d0, KIND=dp)
Expand All @@ -2229,6 +2233,11 @@ SUBROUTINE ComplexBiCGStabl( n, A, x, b, MaxRounds, Tol, MaxTol, Converged, &
yl = y0+1
y = yl+1

IF(InfoActive(25)) THEN
PRINT *,'ndim2:',ndim,n
END IF


CALL matvecsubr( x, work(1:n,r), ipar )
work(1:n,r) = b(1:n) - work(1:n,r)
bnrm = normfun(n, b(1:n), 1)
Expand Down Expand Up @@ -2257,14 +2266,31 @@ SUBROUTINE ComplexBiCGStabl( n, A, x, b, MaxRounds, Tol, MaxTol, Converged, &
sigma = zone
rho0 = zone

IF(InfoActive(25)) THEN
PRINT *,'ndim3:',ndim,n
END IF


DO Round=1,MaxRounds
!-------------------------
! --- The BiCG part ---
!-------------------------
rho0 = -omega*rho0

DO k=1,l

IF(InfoActive(25)) THEN
PRINT *,'ndim4:',ndim,n
END IF


rho1 = dotprodfun(n, work(1:n,rr), 1, work(1:n,r+k-1), 1)

IF(InfoActive(25)) THEN
PRINT *,'ndim5:',ndim,n
END IF


IF (rho0 == zzero) THEN
CALL Fatal( 'ComplexBiCGStab(l)', 'Breakdown error 1.' )
ENDIF
Expand Down

0 comments on commit 123c31b

Please sign in to comment.