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 | Intent | Optional | 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) |
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