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

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

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

revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC revision 425 by gross, Tue Jan 10 04:10:39 2006 UTC
# Line 27  Line 27 
27    
28  void Paso_SCSL_direct_free(Paso_SystemMatrix* A) {  void Paso_SCSL_direct_free(Paso_SystemMatrix* A) {
29  #ifdef SCSL  #ifdef SCSL
30        if (A->direct!=NULL) {        if (A->solver!=NULL) {
31      int token=*(int*)(A->direct);      int token=*(int*)(A->solver);
32          TokenList[token]=0;          TokenList[token]=0;
33          if (TokenSym[token]) {          if (TokenSym[token]) {
34              DPSLDLT_Destroy(token);              DPSLDLT_Destroy(token);
35          } else {          } else {
36              DPSLDU_Destroy(token);              DPSLDU_Destroy(token);
37          }          }
38          A->direct=NULL;          A->solver=NULL;
39       }       }
40  #endif  #endif
41  }  }
# Line 70  void Paso_SCSL_direct(Paso_SystemMatrix* Line 70  void Paso_SCSL_direct(Paso_SystemMatrix*
70    if (Paso_noError()) {    if (Paso_noError()) {
71    
72       /* if no token has been assigned a free token must be found*/       /* if no token has been assigned a free token must be found*/
73       if (A->direct==NULL) {       if (A->solver==NULL) {
74          /* find the next available token */          /* find the next available token */
75         for(token=0;token<l && TokenList[token]!=0;token++);         for(token=0;token<l && TokenList[token]!=0;token++);
76          if (token==l) {          if (token==l) {
# Line 78  void Paso_SCSL_direct(Paso_SystemMatrix* Line 78  void Paso_SCSL_direct(Paso_SystemMatrix*
78          } else {          } else {
79            TokenList[token] = 1;            TokenList[token] = 1;
80            TokenSym[token]=(method==PASO_CHOLEVSKY);            TokenSym[token]=(method==PASO_CHOLEVSKY);
81            A->direct=&Token[token];            A->solver=&Token[token];
82            /* map the reordering method onto SCSL */            /* map the reordering method onto SCSL */
83            switch (options->reordering) {            switch (options->reordering) {
84                  case PASO_NO_REORDERING:                  case PASO_NO_REORDERING:
# Line 109  void Paso_SCSL_direct(Paso_SystemMatrix* Line 109  void Paso_SCSL_direct(Paso_SystemMatrix*
109    time0=Paso_timer();    time0=Paso_timer();
110    
111    if (Paso_noError())  {    if (Paso_noError())  {
112       token=*(int*)(A->direct);       token=*(int*)(A->solver);
113       if (TokenSym[token]) {       if (TokenSym[token]) {
114          DPSLDLT_Solve(token,out,in);          DPSLDLT_Solve(token,out,in);
115       } else {       } else {

Legend:
Removed from v.415  
changed lines
  Added in v.425

  ViewVC Help
Powered by ViewVC 1.1.26