/[escript]/trunk/paso/src/Solvers/Solver_jacobi.c
ViewVC logotype

Diff of /trunk/paso/src/Solvers/Solver_jacobi.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 414 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC
# Line 63  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 63  Paso_Solver_Jacobi* Paso_Solver_getJacob
63                out->values[i]=1.;                out->values[i]=1.;
64                /* find main diagonal */                /* find main diagonal */
65                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {
66                    if (A_p->pattern->index[iPtr]==i+INDEX_OFFSET) {                    if (A_p->pattern->index[iPtr]==i) {
67                        if (ABS(A_p->val[iPtr])>0.) out->values[i]=1./A_p->val[iPtr];                        if (ABS(A_p->val[iPtr])>0.) out->values[i]=1./A_p->val[iPtr];
68                        break;                        break;
69                    }                    }
# Line 78  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 78  Paso_Solver_Jacobi* Paso_Solver_getJacob
78                out->values[i*4+3]= 1.;                out->values[i*4+3]= 1.;
79                /* find main diagonal */                /* find main diagonal */
80                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {
81                    if (A_p->pattern->index[iPtr]==i+INDEX_OFFSET) {                    if (A_p->pattern->index[iPtr]==i) {
82                       A11=A_p->val[iPtr*4];                       A11=A_p->val[iPtr*4];
83                       A12=A_p->val[iPtr*4+2];                       A12=A_p->val[iPtr*4+2];
84                       A21=A_p->val[iPtr*4+1];                       A21=A_p->val[iPtr*4+1];
# Line 109  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 109  Paso_Solver_Jacobi* Paso_Solver_getJacob
109                out->values[i*9+8]=1.;                out->values[i*9+8]=1.;
110                /* find main diagonal */                /* find main diagonal */
111                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {                for (iPtr = A_p->pattern->ptr[i]; iPtr < A_p->pattern->ptr[i + 1]; iPtr++) {
112                    if (A_p->pattern->index[iPtr]==i+INDEX_OFFSET) {                    if (A_p->pattern->index[iPtr]==i) {
113                        A11=A_p->val[iPtr*9  ];                        A11=A_p->val[iPtr*9  ];
114                        A21=A_p->val[iPtr*9+1];                        A21=A_p->val[iPtr*9+1];
115                        A31=A_p->val[iPtr*9+2];                        A31=A_p->val[iPtr*9+2];

Legend:
Removed from v.414  
changed lines
  Added in v.415

  ViewVC Help
Powered by ViewVC 1.1.26