/[escript]/trunk-mpi-branch/paso/src/Solver_jacobi.c
ViewVC logotype

Diff of /trunk-mpi-branch/paso/src/Solver_jacobi.c

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

revision 1086 by gross, Tue Mar 6 04:41:55 2007 UTC revision 1087 by gross, Thu Apr 12 10:01:47 2007 UTC
# Line 75  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 75  Paso_Solver_Jacobi* Paso_Solver_getJacob
75                out->values[i]=1.;                out->values[i]=1.;
76                /* find main diagonal */                /* find main diagonal */
77                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++) {
78                    if (A_p->pattern->index[iPtr]==i) {                    if (A_p->pattern->index[iPtr]==i+(A_p->myFirstRow)) {
79                        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];
80                        break;                        break;
81                    }                    }
# Line 90  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 90  Paso_Solver_Jacobi* Paso_Solver_getJacob
90                out->values[i*4+3]= 1.;                out->values[i*4+3]= 1.;
91                /* find main diagonal */                /* find main diagonal */
92                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++) {
93                    if (A_p->pattern->index[iPtr]==i) {                    if (A_p->pattern->index[iPtr]==i+(A_p->myFirstRow)) {
94                       A11=A_p->val[iPtr*4];                       A11=A_p->val[iPtr*4];
95                       A12=A_p->val[iPtr*4+2];                       A12=A_p->val[iPtr*4+2];
96                       A21=A_p->val[iPtr*4+1];                       A21=A_p->val[iPtr*4+1];
# Line 121  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 121  Paso_Solver_Jacobi* Paso_Solver_getJacob
121                out->values[i*9+8]=1.;                out->values[i*9+8]=1.;
122                /* find main diagonal */                /* find main diagonal */
123                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++) {
124                    if (A_p->pattern->index[iPtr]==i) {                    if (A_p->pattern->index[iPtr]==i+(A_p->myFirstRow)) {
125                        A11=A_p->val[iPtr*9  ];                        A11=A_p->val[iPtr*9  ];
126                        A21=A_p->val[iPtr*9+1];                        A21=A_p->val[iPtr*9+1];
127                        A31=A_p->val[iPtr*9+2];                        A31=A_p->val[iPtr*9+2];
# Line 151  Paso_Solver_Jacobi* Paso_Solver_getJacob Line 151  Paso_Solver_Jacobi* Paso_Solver_getJacob
151          }          }
152        }        }
153    }    }
154    if (Paso_noError()) {    if (Paso_MPI_noError(A_p->mpi_info )) {
155       return out;       return out;
156    } else {    } else {
157       Paso_Solver_Jacobi_free(out);       Paso_Solver_Jacobi_free(out);

Legend:
Removed from v.1086  
changed lines
  Added in v.1087

  ViewVC Help
Powered by ViewVC 1.1.26