/[escript]/trunk/esys2/finley/src/finleyC/System_solve.c
ViewVC logotype

Diff of /trunk/esys2/finley/src/finleyC/System_solve.c

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

revision 96 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC
# Line 21  Line 21 
21  #include "Solvers/Solver.h"  #include "Solvers/Solver.h"
22  #endif  #endif
23    
24    #if ITERATIVE_SOLVER == SGI_SCSL
25    #include "SCSL/SCSL.h"
26    #else
27    #include "Solvers/Solver.h"
28    #endif
29    
30  /**************************************************************/  /**************************************************************/
31    
32  void Finley_SystemMatrix_solve(Finley_SystemMatrix* A,  void Finley_SystemMatrix_solve(Finley_SystemMatrix* A,
# Line 43  void Finley_SystemMatrix_solve(Finley_Sy Line 49  void Finley_SystemMatrix_solve(Finley_Sy
49      Finley_ErrorCode=TYPE_ERROR;      Finley_ErrorCode=TYPE_ERROR;
50      sprintf(Finley_ErrorMsg,"output Data object has to be expanded");      sprintf(Finley_ErrorMsg,"output Data object has to be expanded");
51    }    }
52      if (options->method==ESCRIPT_DIRECT || options->method==ESCRIPT_CHOLEVSKY) {
53    #ifdef Finley_TRACE        #ifdef Finley_TRACE
54    printf("Finley calls direct solver.\n");           printf("Finley calls direct solver.\n");
55    #endif        #endif
56    #if DIRECT_SOLVER == SGI_SCSL        #if DIRECT_SOLVER == SGI_SCSL
57       Finley_SCSL_solve(A,getSampleData(out,0),getSampleData(in,0),options);           Finley_SCSL(A,getSampleData(out,0),getSampleData(in,0),options);
58    #else        #else
59       Finley_Solver(A,getSampleData(out,0),getSampleData(in,0),options);           Finley_Solver(A,getSampleData(out,0),getSampleData(in,0),options);
60    #endif        #endif
61    #ifdef Finley_TRACE    }  else {
62    printf("direct solver finalized.\n");       #ifdef Finley_TRACE
63    #endif       printf("Iterative solver is called with tolerance %e.\n",options->tolerance);
64         #endif
65         #if ITERATIVE_SOLVER == SGI_SCSL
66            Finley_SCSL(A,getSampleData(out,0),getSampleData(in,0),options);
67         #else
68            Finley_Solver(A,getSampleData(out,0),getSampleData(in,0),options);
69         #endif
70      }
71  }  }
72    
73  /*  free memory possibly resereved for a recall */  /*  free memory possibly resereved for a recall */
74    
75  void Finley_SystemMatrix_solve_free(Finley_SystemMatrix* in) {  void Finley_SystemMatrix_solve_free(Finley_SystemMatrix* in) {
76          #if DIRECT_SOLVER == SGI_SCSL              #if DIRECT_SOLVER == SGI_SCSL
77              Finley_SCSL_solve_free(in);                  Finley_SCSL_free(in);
78          #else              #else
79              Finley_Solver_free(in);                  Finley_Solver_free(in);
80          #endif              #endif
81                #if ITERATIVE_SOLVER == SGI_SCSL
82                    Finley_SCSL_free(in);
83                #else
84                    Finley_Solver_free(in);
85                #endif
86  }  }
87  /*  /*
88   * $Log$   * $Log$
89   * Revision 1.1  2004/10/26 06:53:57  jgs   * Revision 1.2  2004/12/14 05:39:31  jgs
90   * Initial revision   * *** empty log message ***
91     *
92     * Revision 1.1.1.1.2.1  2004/11/12 06:58:19  gross
93     * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry
94     *
95     * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
96     * initial import of project esys2
97   *   *
98   * Revision 1.1  2004/07/02 04:21:13  gross   * Revision 1.1  2004/07/02 04:21:13  gross
99   * Finley C code has been included   * Finley C code has been included

Legend:
Removed from v.96  
changed lines
  Added in v.97

  ViewVC Help
Powered by ViewVC 1.1.26