root / synthbench / euroben-dm / mod2cr / .svn / text-base / sym7pol.f.svn-base @ 0:839f52ef7657
History | View | Annotate | Download (1.2 kB)
1 |
Subroutine sym7pol( n1, n2, n3, m, mp, a, al, rmr, x, y, gamma ) |
---|---|
2 |
! --------------------------------------------------------------------- |
3 |
! --- Polynomial (Neumann) preconditioner. |
4 |
! --------------------------------------------------------------------- |
5 |
Use numerics |
6 |
Use floptime |
7 |
Use mpi_module |
8 |
Implicit None |
9 |
|
10 |
Integer :: n1, n2, n3, m, mp |
11 |
Real(l_) :: a(m,0:3), al(m,1:3), x(n1*n2*n3), y(n1*n2*n3) |
12 |
Real(l_) :: gamma(mp+1) |
13 |
Real(l_) :: rmr |
14 |
|
15 |
Real(l_) :: w(n1*n2*n3) |
16 |
Integer :: i |
17 |
Real(l_) :: nrm2 |
18 |
External nrm2 |
19 |
! --------------------------------------------------------------------- |
20 |
y(lb:gub) = gamma(mp+1)*x(lb:gub) |
21 |
Do i = 1, mp |
22 |
Call sym7mxv( n1, n2, n3, m, a, al, y, w ) |
23 |
y(lb:gub) = y(lb:gub) - w(lb:gub) |
24 |
y(lb:gub) = y(lb:gub) + gamma(mp-i+1)*x(lb:gub) |
25 |
End Do |
26 |
! --------------------------------------------------------------------- |
27 |
! --- Computation of (r,Mr) where M is the preconditioner. |
28 |
|
29 |
rmr = nrm2( m, y(lb) ) |
30 |
flops = flops + m*( 1 + 3*mp ) |
31 |
! --------------------------------------------------------------------- |
32 |
End Subroutine sym7pol |