/[escript]/branches/doubleplusgood/paso/src/Solver_Function.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/paso/src/Solver_Function.cpp

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

revision 4323 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4324 by jfenwick, Wed Mar 20 00:55:44 2013 UTC
# Line 27  Paso_Function * Paso_Function_LinearSyst Line 27  Paso_Function * Paso_Function_LinearSyst
27      Paso_Function * out=NULL;      Paso_Function * out=NULL;
28      Paso_SystemMatrix_setPreconditioner(A,options);      Paso_SystemMatrix_setPreconditioner(A,options);
29      if (! Esys_noError()) return NULL;      if (! Esys_noError()) return NULL;
30      out=MEMALLOC(1,Paso_Function);      out=new Paso_Function;
31      if (! Esys_checkPtr(out)) {      if (! Esys_checkPtr(out)) {
32          out->kind=LINEAR_SYSTEM;          out->kind=LINEAR_SYSTEM;
33          out->mpi_info=Esys_MPIInfo_getReference(A->mpi_info);          out->mpi_info=Esys_MPIInfo_getReference(A->mpi_info);
34          out->n=Paso_SystemMatrix_getTotalNumRows(A);          out->n=Paso_SystemMatrix_getTotalNumRows(A);
35          out->more=(void*)Paso_SystemMatrix_getReference(A);          out->more=(void*)Paso_SystemMatrix_getReference(A);
36          out->b=b;          out->b=b;
37          out->tmp=MEMALLOC(out->n, double);          out->tmp=new double[out->n];
38          Esys_checkPtr(out->tmp);          Esys_checkPtr(out->tmp);
39      }      }
40      if (Esys_noError()) {      if (Esys_noError()) {
# Line 49  void Paso_Function_LinearSystem_free(Pas Line 49  void Paso_Function_LinearSystem_free(Pas
49     if (F!=NULL) {     if (F!=NULL) {
50         Esys_MPIInfo_free(F->mpi_info);         Esys_MPIInfo_free(F->mpi_info);
51         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));
52         MEMFREE(F->tmp);         delete[] F->tmp;
53         MEMFREE(F);         delete F;
54     }     }
55  }  }
56  /*  /*

Legend:
Removed from v.4323  
changed lines
  Added in v.4324

  ViewVC Help
Powered by ViewVC 1.1.26