#include #define MAXITS 1000 #define EPS 1.e-5 void sor(a,b,c,d,e,f,u,jmax,rjac) double **a,**b,**c,**d,**e,**f,**u,rjac; int jmax; { int n,l,j; double resid,omega,anormf,anorm; void nrerror(); anormf=0.0; for (j=2;j 1 && anorm < EPS*anormf) return; } nrerror("Maximum number of iterations exceeded in SOR"); } #undef MAXITS #undef EPS