/[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 3258 by gross, Mon Aug 30 10:48:00 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 24  Paso_Function * Paso_Function_LinearSyst Line 24  Paso_Function * Paso_Function_LinearSyst
24  {  {
25      Paso_Function * out=NULL;      Paso_Function * out=NULL;
26      Paso_SystemMatrix_setPreconditioner(A,options);      Paso_SystemMatrix_setPreconditioner(A,options);
27      if (! Paso_noError()) return NULL;      if (! Esys_noError()) return NULL;
28      out=MEMALLOC(1,Paso_Function);      out=MEMALLOC(1,Paso_Function);
29      if (! Paso_checkPtr(out)) {      if (! Esys_checkPtr(out)) {
30          out->kind=LINEAR_SYSTEM;          out->kind=LINEAR_SYSTEM;
31          out->mpi_info=Paso_MPIInfo_getReference(A->mpi_info);          out->mpi_info=Esys_MPIInfo_getReference(A->mpi_info);
32          out->n=Paso_SystemMatrix_getTotalNumRows(A);          out->n=Paso_SystemMatrix_getTotalNumRows(A);
33          out->more=(void*)Paso_SystemMatrix_getReference(A);          out->more=(void*)Paso_SystemMatrix_getReference(A);
34          out->b=b;          out->b=b;
35          out->tmp=MEMALLOC(out->n, double);          out->tmp=MEMALLOC(out->n, double);
36          Paso_checkPtr(out->tmp);          Esys_checkPtr(out->tmp);
37      }      }
38      if (Paso_noError()) {      if (Esys_noError()) {
39          return out;          return out;
40      } else {      } else {
41          Paso_Function_LinearSystem_free(out);          Paso_Function_LinearSystem_free(out);
# Line 45  Paso_Function * Paso_Function_LinearSyst Line 45  Paso_Function * Paso_Function_LinearSyst
45  void Paso_Function_LinearSystem_free(Paso_Function * F)  void Paso_Function_LinearSystem_free(Paso_Function * F)
46  {  {
47     if (F!=NULL) {     if (F!=NULL) {
48         Paso_MPIInfo_free(F->mpi_info);         Esys_MPIInfo_free(F->mpi_info);
49         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));
50         MEMFREE(F->tmp);         MEMFREE(F->tmp);
51         MEMFREE(F);         MEMFREE(F);

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26