TestForConvergence Subroutine

public subroutine TestForConvergence()

Arguments

None

Contents

Source Code


Source Code

    subroutine TestForConvergence()

        ! This just tests the convergence on the grounds that the force is
        ! smaller that the input parameter: ConvergedForce

        if (tLagrange) then
            if ((abs(Force) < ConvergedForce) .and. (abs(OrthoForce) < ConvergedForce)) then
                tNotConverged = .false.
            end if
        else if (tROIteration) then
            if (Iteration == ROIterMax) then
                tNotConverged = .false.
            end if
        else if (abs(TotCorrectedForce) < ConvergedForce) then
            tNotConverged = .false.
        end if
! if an ROIteration value is specified, use this to specify the end of the orbital rotation, otherwise use the
! conversion limit (ConvergedForce).

    end subroutine TestForConvergence