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

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

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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 2315 by gross, Wed Mar 18 00:38:48 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 30  Line 29 
29    
30  /**************************************************************/  /**************************************************************/
31    
32  index_t Paso_SystemMatrix_getSystemMatrixTypeId(index_t solver,index_t package, bool_t symmetry) {  index_t Paso_SystemMatrix_getSystemMatrixTypeId(const index_t solver,const index_t preconditioner, const index_t package,const  bool_t symmetry, Paso_MPIInfo *mpi_info) {
33      index_t true_package;
34    index_t out=MATRIX_FORMAT_DEFAULT;    index_t out=MATRIX_FORMAT_DEFAULT;
35    package=Paso_Options_getPackage(solver,package,symmetry);    true_package=Paso_Options_getPackage(solver,package,symmetry, mpi_info);
36    
37    switch(package)  {    switch(true_package)  {
38    
39       case PASO_PASO:       case PASO_PASO:
40         out=MATRIX_FORMAT_DEFAULT;         if (preconditioner == PASO_AMG) {
41              out=MATRIX_FORMAT_DEFAULT + MATRIX_FORMAT_BLK1;
42           } else {
43              out=MATRIX_FORMAT_DEFAULT;
44           }
45         break;         break;
46    
47       case PASO_SCSL:       case PASO_SCSL:
48           if (mpi_info->size > 1) {
49               Paso_setError(VALUE_ERROR,"The selected solver SCSL requires CSC format which is not supported with MPI.");
50               return -1;
51           }
52         out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;         out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;
53         /* if (solver == PASO_CHOLEVSKY) out+=MATRIX_FORMAT_SYM */         /* if (solver == PASO_CHOLEVSKY) out+=MATRIX_FORMAT_SYM */
54         break;         break;
# Line 51  index_t Paso_SystemMatrix_getSystemMatri Line 59  index_t Paso_SystemMatrix_getSystemMatri
59         break;         break;
60    
61       case PASO_UMFPACK:       case PASO_UMFPACK:
62           if (mpi_info->size > 1) {
63               Paso_setError(VALUE_ERROR,"The selected solver UMFPACK requires CSC format which is not supported with MPI.");
64               return -1;
65           }
66         out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;         out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;
67        break;        break;
68    
# Line 63  index_t Paso_SystemMatrix_getSystemMatri Line 75  index_t Paso_SystemMatrix_getSystemMatri
75    }    }
76    return out;    return out;
77  }  }
 /*  
  * $Log$  
  * Revision 1.2  2005/09/15 03:44:39  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.1.2.1  2005/09/05 06:29:48  gross  
  * These files have been extracted from finley to define a stand alone libray for iterative  
  * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but  
  * has not been tested yet.  
  *  
  *  
  */  

Legend:
Removed from v.1388  
changed lines
  Added in v.2315

  ViewVC Help
Powered by ViewVC 1.1.26