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

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

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

revision 2987 by gross, Tue Mar 16 01:32:43 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 24  Paso_Function * Paso_FCTSolver_Function_ Line 24  Paso_Function * Paso_FCTSolver_Function_
24  {  {
25      Paso_Function * out=NULL;      Paso_Function * out=NULL;
26      Paso_Solver_setPreconditioner(tp->iteration_matrix,options);      Paso_Solver_setPreconditioner(tp->iteration_matrix,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=FCT;          out->kind=FCT;
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(fctp->iteration_matrix);          out->n=Paso_SystemMatrix_getTotalNumRows(fctp->iteration_matrix);
33    
34          out->more=(void*)Paso_SystemMatrix_getReference(A);          out->more=(void*)Paso_SystemMatrix_getReference(A);
35          out->b=NULL;          out->b=NULL;
36          out->tmp=MEMALLOC(out->n, double);          out->tmp=MEMALLOC(out->n, double);
37          Paso_checkPtr(out->tmp);          Esys_checkPtr(out->tmp);
38      }      }
39      if (Paso_noError()) {      if (Esys_noError()) {
40          return out;          return out;
41      } else {      } else {
42          Paso_Function_FCTSolver_free(out);          Paso_Function_FCTSolver_free(out);
# Line 46  Paso_Function * Paso_FCTSolver_Function_ Line 46  Paso_Function * Paso_FCTSolver_Function_
46  void Paso_Function_FCTSolver_free(Paso_Function * F)  void Paso_Function_FCTSolver_free(Paso_Function * F)
47  {  {
48     if (F!=NULL) {     if (F!=NULL) {
49         Paso_MPIInfo_free(F->mpi_info);         Esys_MPIInfo_free(F->mpi_info);
50         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));         Paso_SystemMatrix_free((Paso_SystemMatrix*)(F->more));
51         MEMFREE(F->tmp);         MEMFREE(F->tmp);
52         MEMFREE(F);         MEMFREE(F);

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

  ViewVC Help
Powered by ViewVC 1.1.26