Base linear accelerator subroutine that scales and reorders the system of equations, if necessary, updates the preconditioner, and calls the appropriate linear accelerator.
638 CLASS(ImsLinearDataType),
INTENT(INOUT) :: this
639 integer(I4B),
INTENT(INOUT) :: ICNVG
640 integer(I4B),
INTENT(IN) :: KSTP
641 integer(I4B),
INTENT(IN) :: KITER
642 integer(I4B),
INTENT(INOUT) :: IN_ITER
644 integer(I4B),
INTENT(IN) :: NCONV
645 integer(I4B),
INTENT(IN) :: CONVNMOD
646 integer(I4B),
DIMENSION(CONVNMOD + 1),
INTENT(INOUT) :: CONVMODSTART
647 character(len=31),
DIMENSION(NCONV),
INTENT(INOUT) :: CACCEL
648 type(ConvergenceSummaryType),
pointer,
intent(in) :: summary
651 integer(I4B) :: innerit
653 integer(I4B) :: itmax
657 this%EPFACT = ims_base_epfact(this%ICNVGOPT, kstp)
660 IF (this%ISCL .NE. 0)
THEN
661 CALL ims_base_scale(0, this%ISCL, &
662 this%NEQ, this%NJA, this%IA, this%JA, &
663 this%AMAT, this%X, this%RHS, &
664 this%DSCALE, this%DSCALE2)
668 IF (this%IORD /= 0)
THEN
669 CALL dperm(this%NEQ, this%AMAT, this%JA, this%IA, &
670 this%ARO, this%JARO, this%IARO, &
671 this%LORDER, this%ID, 1)
672 CALL dvperm(this%NEQ, this%X, this%LORDER)
673 CALL dvperm(this%NEQ, this%RHS, this%LORDER)
674 this%IA0 => this%IARO
675 this%JA0 => this%JARO
684 CALL ims_base_pcu(this%iout, this%NJA, this%NEQ, this%NIAPC, this%NJAPC, &
685 this%IPC, this%RELAX, this%A0, this%IA0, this%JA0, &
686 this%APC, this%IAPC, this%JAPC, this%IW, this%W, &
687 this%LEVEL, this%DROPTOL, this%NJLU, this%NJW, &
688 this%NWLU, this%JLU, this%JW, this%WLU)
705 call ims_base_residual(this%NEQ, this%NJA, this%X, this%RHS, this%D, &
706 this%A0, this%IA0, this%JA0)
707 this%L2NORM0 =
dnrm2(this%NEQ, this%D, 1)
711 IF (this%L2NORM0 == dzero)
THEN
717 IF (this%ILINMETH == 1)
THEN
718 CALL ims_base_cg(icnvg, itmax, innerit, &
719 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
720 this%IPC, this%ICNVGOPT, this%NORTH, &
721 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
722 this%EPFACT, this%IA0, this%JA0, this%A0, &
723 this%IAPC, this%JAPC, this%APC, &
724 this%X, this%RHS, this%D, this%P, this%Q, this%Z, &
725 this%NJLU, this%IW, this%JLU, &
726 nconv, convnmod, convmodstart, &
730 ELSE IF (this%ILINMETH == 2)
THEN
731 CALL ims_base_bcgs(icnvg, itmax, innerit, &
732 this%NEQ, this%NJA, this%NIAPC, this%NJAPC, &
733 this%IPC, this%ICNVGOPT, this%NORTH, &
734 this%ISCL, this%DSCALE, &
735 this%DVCLOSE, this%RCLOSE, this%L2NORM0, &
736 this%EPFACT, this%IA0, this%JA0, this%A0, &
737 this%IAPC, this%JAPC, this%APC, &
738 this%X, this%RHS, this%D, this%P, this%Q, &
739 this%T, this%V, this%DHAT, this%PHAT, this%QHAT, &
740 this%NJLU, this%IW, this%JLU, &
741 nconv, convnmod, convmodstart, &
746 IF (this%IORD /= 0)
THEN
747 CALL dperm(this%NEQ, this%A0, this%JA0, this%IA0, &
748 this%AMAT, this%JA, this%IA, &
749 this%IORDER, this%ID, 1)
750 CALL dvperm(this%NEQ, this%X, this%IORDER)
751 CALL dvperm(this%NEQ, this%RHS, this%IORDER)
755 IF (this%ISCL .NE. 0)
THEN
756 CALL ims_base_scale(1, this%ISCL, &
757 this%NEQ, this%NJA, this%IA, this%JA, &
758 this%AMAT, this%X, this%RHS, &
759 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)