Base linear accelerator subroutine that scales and reorders the system of equations, if necessary, updates the preconditioner, and calls the appropriate linear accelerator.
668 CLASS(ImsLinearDataType),
INTENT(INOUT) :: this
669 integer(I4B),
INTENT(INOUT) :: ICNVG
670 integer(I4B),
INTENT(IN) :: KSTP
671 integer(I4B),
INTENT(IN) :: KITER
672 integer(I4B),
INTENT(INOUT) :: IN_ITER
674 integer(I4B),
INTENT(IN) :: NCONV
675 integer(I4B),
INTENT(IN) :: CONVNMOD
676 integer(I4B),
DIMENSION(CONVNMOD + 1),
INTENT(INOUT) :: CONVMODSTART
677 character(len=31),
DIMENSION(NCONV),
INTENT(INOUT) :: CACCEL
678 type(ConvergenceSummaryType),
pointer,
intent(in) :: summary
681 integer(I4B) :: innerit
683 integer(I4B) :: itmax
687 this%EPFACT = ims_base_epfact(this%ICNVGOPT, kstp)
690 IF (this%ISCL .NE. 0)
THEN
691 CALL ims_base_scale(0, this%ISCL, &
692 this%NEQ, this%NJA, this%IA, this%JA, &
693 this%AMAT, this%X, this%RHS, &
694 this%DSCALE, this%DSCALE2)
698 IF (this%IORD /= 0)
THEN
699 CALL dperm(this%NEQ, this%AMAT, this%JA, this%IA, &
700 this%ARO, this%JARO, this%IARO, &
701 this%LORDER, this%ID, 1)
702 CALL dvperm(this%NEQ, this%X, this%LORDER)
703 CALL dvperm(this%NEQ, this%RHS, this%LORDER)
704 this%IA0 => this%IARO
705 this%JA0 => this%JARO
714 CALL ims_base_pcu(this%iout, this%NJA, this%NEQ, this%NIAPC, this%NJAPC, &
715 this%IPC, this%RELAX, this%A0, this%IA0, this%JA0, &
716 this%APC, this%IAPC, this%JAPC, this%IW, this%W, &
717 this%LEVEL, this%DROPTOL, this%NJLU, this%NJW, &
718 this%NWLU, this%JLU, this%JW, this%WLU)
735 call ims_base_residual(this%NEQ, this%NJA, this%X, this%RHS, this%D, &
736 this%A0, this%IA0, this%JA0)
737 this%L2NORM0 =
dnrm2(this%NEQ, this%D, 1)
741 IF (this%L2NORM0 == dzero)
THEN
747 IF (this%ILINMETH == 1)
THEN
748 CALL ims_base_cg(icnvg, itmax, innerit, &
749 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
750 this%IPC, this%ICNVGOPT, this%NORTH, &
751 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
752 this%EPFACT, this%IA0, this%JA0, this%A0, &
753 this%IAPC, this%JAPC, this%APC, &
754 this%X, this%RHS, this%D, this%P, this%Q, this%Z, &
755 this%NJLU, this%IW, this%JLU, &
756 nconv, convnmod, convmodstart, &
760 ELSE IF (this%ILINMETH == 2)
THEN
761 CALL ims_base_bcgs(icnvg, itmax, innerit, &
762 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
763 this%IPC, this%ICNVGOPT, this%NORTH, &
764 this%ISCL, this%DSCALE, &
765 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
766 this%EPFACT, this%IA0, this%JA0, this%A0, &
767 this%IAPC, this%JAPC, this%APC, &
768 this%X, this%RHS, this%D, this%P, this%Q, &
769 this%T, this%V, this%DHAT, this%PHAT, this%QHAT, &
770 this%NJLU, this%IW, this%JLU, &
771 nconv, convnmod, convmodstart, &
776 IF (this%IORD /= 0)
THEN
777 CALL dperm(this%NEQ, this%A0, this%JA0, this%IA0, &
778 this%AMAT, this%JA, this%IA, &
779 this%IORDER, this%ID, 1)
780 CALL dvperm(this%NEQ, this%X, this%IORDER)
781 CALL dvperm(this%NEQ, this%RHS, this%IORDER)
785 IF (this%ISCL .NE. 0)
THEN
786 CALL ims_base_scale(1, this%ISCL, &
787 this%NEQ, this%NJA, this%IA, this%JA, &
788 this%AMAT, this%X, this%RHS, &
789 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)