/[escript]/trunk/paso/src/Solver_Function.c
ViewVC logotype

Diff of /trunk/paso/src/Solver_Function.c

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

revision 1797 by phornby, Tue Jul 15 09:33:48 2008 UTC revision 1798 by gross, Wed Sep 17 06:21:12 2008 UTC
# Line 29  Paso_Function * Paso_Function_LinearSyst Line 29  Paso_Function * Paso_Function_LinearSyst
29          out->kind=LINEAR_SYSTEM;          out->kind=LINEAR_SYSTEM;
30          out->mpi_info=Paso_MPIInfo_getReference(A->mpi_info);          out->mpi_info=Paso_MPIInfo_getReference(A->mpi_info);
31          out->n=Paso_SystemMatrix_getTotalNumRows(A);          out->n=Paso_SystemMatrix_getTotalNumRows(A);
32          out->more=Paso_SystemMatrix_reference(A);          out->more=(void*)Paso_SystemMatrix_reference(A);
33          out->b=b;          out->b=b;
34          out->tmp=MEMALLOC(out->n, double);          out->tmp=MEMALLOC(out->n, double);
35          Paso_checkPtr(out->tmp);          Paso_checkPtr(out->tmp);
# Line 57  void Paso_Function_LinearSystem_free(Pas Line 57  void Paso_Function_LinearSystem_free(Pas
57  err_t Paso_Function_LinearSystem_call(Paso_Function * F,double* value, const double* arg)  err_t Paso_Function_LinearSystem_call(Paso_Function * F,double* value, const double* arg)
58  {  {
59      Paso_SystemMatrix* A=(Paso_SystemMatrix*)(F->more);      Paso_SystemMatrix* A=(Paso_SystemMatrix*)(F->more);
 printf("F B\n");  
60      Paso_Copy(F->n,F->tmp,F->b); /* tmp=b */      Paso_Copy(F->n,F->tmp,F->b); /* tmp=b */
61  printf("F C %#lx %#lx %#lx\n",A,arg,F->tmp);      Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, arg,-ONE, F->tmp); /* tmp=(A*arg-tmp) */
62      Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(-ONE, A, arg,ONE, F->tmp); /* tmp=(tmp-A*arg) */      Paso_Solver_solvePreconditioner(A,value,F->tmp);  /* value=P*tmp */
 printf("F D \n");  
     Paso_Solver_solvePreconditioner(A,value,F->tmp); /* value=P*tmp */  
 printf("F E\n");  
63      return NO_ERROR;      return NO_ERROR;
64  }  }
   

Legend:
Removed from v.1797  
changed lines
  Added in v.1798

  ViewVC Help
Powered by ViewVC 1.1.26