aprod2 Subroutine

private subroutine aprod2(me, m, n, maxmn, minmn, x, y, d, hy, hz, w)

aprod2 computes x = x + A(t)y for subroutine aprod, where A is a test matrix of the form A = HYD*HZ, and the latter matrices HY, D, HZ are represented by input vectors with the same name.

Type Bound

test_solver

Arguments

Type IntentOptional Attributes Name
class(test_solver), intent(inout) :: me
integer :: m
integer :: n
integer :: maxmn
integer :: minmn
real(kind=wp) :: x(n)
real(kind=wp) :: y(m)
real(kind=wp) :: d(minmn)
real(kind=wp) :: hy(m)
real(kind=wp) :: hz(n)
real(kind=wp) :: w(maxmn)

Calls

proc~~aprod2~~CallsGraph proc~aprod2 lsqrtest_module::test_solver%aprod2 proc~hprod lsqrtest_module::hprod proc~aprod2->proc~hprod

Called by

proc~~aprod2~~CalledByGraph proc~aprod2 lsqrtest_module::test_solver%aprod2 proc~aprod_test_solver lsqrtest_module::test_solver%aprod_test_solver proc~aprod_test_solver->proc~aprod2

Source Code

    subroutine aprod2( me, m, n, maxmn, minmn, x, y, d, hy, hz, w )

    class(test_solver),intent(inout) :: me
    integer :: m, n, maxmn, minmn
    real(wp) :: x(n), y(m), d(minmn), hy(m), hz(n), w(maxmn)

    integer :: i

    call hprod ( m, hy, y, w )

    do i = 1, minmn
        w(i)  = d(i)*w(i)
    end do

    do i = m + 1, n
        w(i)  = zero
    end do

    call hprod ( n, hz, w, w )

    do i = 1, n
        x(i)  = x(i) + w(i)
    end do

    end subroutine aprod2