Fixed l1-Jacobi scaling

l1-and-0-aggr
Cirdans-Home 2 months ago
parent 8966ecb4a6
commit 68a9cceaa0

@ -255,7 +255,8 @@ subroutine amg_caggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
enddo enddo
if (jd == -1) then if (jd == -1) then
if (.not.do_l1correction) write(0,*) 'Wrong input: we need the diagonal!!!!', i ! if (.not.do_l1correction)
write(0,*) 'Wrong input: we need the diagonal!!!!', i
else else
acsrf%val(jd)=acsrf%val(jd)-tmp acsrf%val(jd)=acsrf%val(jd)-tmp
end if end if
@ -277,10 +278,11 @@ subroutine amg_caggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
!$OMP end parallel do !$OMP end parallel do
if (parms%aggr_omega_alg == amg_eig_est_) then if (parms%aggr_omega_alg == amg_eig_est_) then
if (do_l1correction) then !if (do_l1correction) then
! For l1-Jacobi this can be estimated with 1 ! ! For l1-Jacobi this can be estimated with 1
parms%aggr_omega_val = done ! parms%aggr_omega_val = done
else if (parms%aggr_eig == amg_max_norm_) then !
if (parms%aggr_eig == amg_max_norm_) then
allocate(arwsum(nrow)) allocate(arwsum(nrow))
call acsr%arwsum(arwsum) call acsr%arwsum(arwsum)
anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow))) anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow)))

@ -255,7 +255,8 @@ subroutine amg_daggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
enddo enddo
if (jd == -1) then if (jd == -1) then
if (.not.do_l1correction) write(0,*) 'Wrong input: we need the diagonal!!!!', i ! if (.not.do_l1correction)
write(0,*) 'Wrong input: we need the diagonal!!!!', i
else else
acsrf%val(jd)=acsrf%val(jd)-tmp acsrf%val(jd)=acsrf%val(jd)-tmp
end if end if
@ -277,10 +278,11 @@ subroutine amg_daggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
!$OMP end parallel do !$OMP end parallel do
if (parms%aggr_omega_alg == amg_eig_est_) then if (parms%aggr_omega_alg == amg_eig_est_) then
if (do_l1correction) then !if (do_l1correction) then
! For l1-Jacobi this can be estimated with 1 ! ! For l1-Jacobi this can be estimated with 1
parms%aggr_omega_val = done ! parms%aggr_omega_val = done
else if (parms%aggr_eig == amg_max_norm_) then !
if (parms%aggr_eig == amg_max_norm_) then
allocate(arwsum(nrow)) allocate(arwsum(nrow))
call acsr%arwsum(arwsum) call acsr%arwsum(arwsum)
anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow))) anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow)))

@ -255,7 +255,8 @@ subroutine amg_saggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
enddo enddo
if (jd == -1) then if (jd == -1) then
if (.not.do_l1correction) write(0,*) 'Wrong input: we need the diagonal!!!!', i ! if (.not.do_l1correction)
write(0,*) 'Wrong input: we need the diagonal!!!!', i
else else
acsrf%val(jd)=acsrf%val(jd)-tmp acsrf%val(jd)=acsrf%val(jd)-tmp
end if end if
@ -277,10 +278,11 @@ subroutine amg_saggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
!$OMP end parallel do !$OMP end parallel do
if (parms%aggr_omega_alg == amg_eig_est_) then if (parms%aggr_omega_alg == amg_eig_est_) then
if (do_l1correction) then !if (do_l1correction) then
! For l1-Jacobi this can be estimated with 1 ! ! For l1-Jacobi this can be estimated with 1
parms%aggr_omega_val = done ! parms%aggr_omega_val = done
else if (parms%aggr_eig == amg_max_norm_) then !
if (parms%aggr_eig == amg_max_norm_) then
allocate(arwsum(nrow)) allocate(arwsum(nrow))
call acsr%arwsum(arwsum) call acsr%arwsum(arwsum)
anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow))) anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow)))

@ -255,7 +255,8 @@ subroutine amg_zaggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
enddo enddo
if (jd == -1) then if (jd == -1) then
if (.not.do_l1correction) write(0,*) 'Wrong input: we need the diagonal!!!!', i ! if (.not.do_l1correction)
write(0,*) 'Wrong input: we need the diagonal!!!!', i
else else
acsrf%val(jd)=acsrf%val(jd)-tmp acsrf%val(jd)=acsrf%val(jd)-tmp
end if end if
@ -277,10 +278,11 @@ subroutine amg_zaggrmat_smth_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
!$OMP end parallel do !$OMP end parallel do
if (parms%aggr_omega_alg == amg_eig_est_) then if (parms%aggr_omega_alg == amg_eig_est_) then
if (do_l1correction) then !if (do_l1correction) then
! For l1-Jacobi this can be estimated with 1 ! ! For l1-Jacobi this can be estimated with 1
parms%aggr_omega_val = done ! parms%aggr_omega_val = done
else if (parms%aggr_eig == amg_max_norm_) then !
if (parms%aggr_eig == amg_max_norm_) then
allocate(arwsum(nrow)) allocate(arwsum(nrow))
call acsr%arwsum(arwsum) call acsr%arwsum(arwsum)
anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow))) anorm = maxval(abs(adiag(1:nrow)*arwsum(1:nrow)))

Loading…
Cancel
Save