📄 sym7pol.f
字号:
Subroutine sym7pol( n1, n2, n3, m, a, rmr, q, x, y, gamma )! ---------------------------------------------------------------------! --- Polynomial (Neumann) preconditioner.! --------------------------------------------------------------------- Use numerics Use floptime Implicit None Integer :: n1, n2, n3, m Real(l_) :: a(n1*n2*n3,0:3), rmr, q(n1*n2*n3), x(n1*n2*n3), & y(n1*n2*n3) Real(l_) :: gamma(m+1) Real(l_) :: nrm2 Real(l_) :: t(n1*n2*n3), w(n1*n2*n3) Integer :: i, j, n12, ntot! --------------------------------------------------------------------- n12 = n1*n2 ntot = n12*n3!$omp parallel do Do j = 1, ntot t(j) = q(j)*x(j) y(j) = t(j) y(j) = gamma(m+1)*y(j) End Do Do i = 1, m Call sym7mxv( n1, n2, n3, a, y, w )!$omp parallel do Do j = 1, ntot w(j) = q(j)*w(j) y(j) = y(j) - w(j) y(j) = y(j) + gamma(m-i+1)*t(j) End Do End Do! ---------------------------------------------------------------------! --- Computation of (r,Mr) where M is the preconditioner. rmr = nrm2( ntot, y ) flops = flops + ntot*( 2 + 4*m )! --------------------------------------------------------------------- End Subroutine sym7pol
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -