c *********************************************************************** subroutine trucommvv(v,b,c,u,w,n) c inputs: matrices b,c , vectores u,w c output: vector v c Operacion a realizar: v = b * c^(-1) * u + w c La matriz c va a ser invertida c c es diagonal, b no c Aprovechamos esa condicion para invertir c, y acelerar el calculo c jul 2011 malv+fgg c *********************************************************************** real*8 v(n),b(n,n),c(n,n),u(n),w(n), sum integer n,i,j,k do 1,i=2,n-1 sum=0.0d0 do 2,j=2,n-1 sum=sum+ (b(i,j)) * (u(j)/c(j,j)) 2 continue v(i) = sum + w(i) 1 continue v(1) = 0.d0 v(n) = 0.d0 return end