Base linear accelerator subroutine that scales and reorders the system of equations, if necessary, updates the preconditioner, and calls the appropriate linear accelerator.
623 CLASS(ImsLinearDataType),
INTENT(INOUT) :: this
624 integer(I4B),
INTENT(INOUT) :: ICNVG
625 integer(I4B),
INTENT(IN) :: KSTP
626 integer(I4B),
INTENT(IN) :: KITER
627 integer(I4B),
INTENT(INOUT) :: IN_ITER
629 integer(I4B),
INTENT(IN) :: NCONV
630 integer(I4B),
INTENT(IN) :: CONVNMOD
631 integer(I4B),
DIMENSION(CONVNMOD + 1),
INTENT(INOUT) :: CONVMODSTART
632 character(len=31),
DIMENSION(NCONV),
INTENT(INOUT) :: CACCEL
633 type(ConvergenceSummaryType),
pointer,
intent(in) :: summary
636 integer(I4B) :: innerit
638 integer(I4B) :: itmax
642 this%EPFACT = ims_base_epfact(this%ICNVGOPT, kstp)
645 IF (this%ISCL .NE. 0)
THEN
646 CALL ims_base_scale(0, this%ISCL, &
647 this%NEQ, this%NJA, this%IA, this%JA, &
648 this%AMAT, this%X, this%RHS, &
649 this%DSCALE, this%DSCALE2)
653 IF (this%IORD /= 0)
THEN
654 CALL dperm(this%NEQ, this%AMAT, this%JA, this%IA, &
655 this%ARO, this%JARO, this%IARO, &
656 this%LORDER, this%ID, 1)
657 CALL dvperm(this%NEQ, this%X, this%LORDER)
658 CALL dvperm(this%NEQ, this%RHS, this%LORDER)
659 this%IA0 => this%IARO
660 this%JA0 => this%JARO
669 CALL ims_base_pcu(this%iout, this%NJA, this%NEQ, this%NIAPC, this%NJAPC, &
670 this%IPC, this%RELAX, this%A0, this%IA0, this%JA0, &
671 this%APC, this%IAPC, this%JAPC, this%IW, this%W, &
672 this%LEVEL, this%DROPTOL, this%NJLU, this%NJW, &
673 this%NWLU, this%JLU, this%JW, this%WLU)
690 call ims_base_residual(this%NEQ, this%NJA, this%X, this%RHS, this%D, &
691 this%A0, this%IA0, this%JA0)
692 this%L2NORM0 =
dnrm2(this%NEQ, this%D, 1)
696 IF (this%L2NORM0 == dzero)
THEN
702 IF (this%ILINMETH == 1)
THEN
703 CALL ims_base_cg(icnvg, itmax, innerit, &
704 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
705 this%IPC, this%ICNVGOPT, this%NORTH, &
706 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
707 this%EPFACT, this%IA0, this%JA0, this%A0, &
708 this%IAPC, this%JAPC, this%APC, &
709 this%X, this%RHS, this%D, this%P, this%Q, this%Z, &
710 this%NJLU, this%IW, this%JLU, &
711 nconv, convnmod, convmodstart, &
715 ELSE IF (this%ILINMETH == 2)
THEN
716 CALL ims_base_bcgs(icnvg, itmax, innerit, &
717 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
718 this%IPC, this%ICNVGOPT, this%NORTH, &
719 this%ISCL, this%DSCALE, &
720 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
721 this%EPFACT, this%IA0, this%JA0, this%A0, &
722 this%IAPC, this%JAPC, this%APC, &
723 this%X, this%RHS, this%D, this%P, this%Q, &
724 this%T, this%V, this%DHAT, this%PHAT, this%QHAT, &
725 this%NJLU, this%IW, this%JLU, &
726 nconv, convnmod, convmodstart, &
731 IF (this%IORD /= 0)
THEN
732 CALL dperm(this%NEQ, this%A0, this%JA0, this%IA0, &
733 this%AMAT, this%JA, this%IA, &
734 this%IORDER, this%ID, 1)
735 CALL dvperm(this%NEQ, this%X, this%IORDER)
736 CALL dvperm(this%NEQ, this%RHS, this%IORDER)
740 IF (this%ISCL .NE. 0)
THEN
741 CALL ims_base_scale(1, this%ISCL, &
742 this%NEQ, this%NJA, this%IA, this%JA, &
743 this%AMAT, this%X, this%RHS, &
744 this%DSCALE, this%DSCALE2)
real(kind=8) function dnrm2(n, x, incx)
This module contains simulation methods.
subroutine dvperm(n, x, perm)
subroutine dperm(nrow, a, ja, ia, ao, jao, iao, perm, qperm, job)