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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2608 - (hide annotations)
Tue Aug 18 01:25:18 2009 UTC (10 years, 2 months ago) by jfenwick
File MIME type: text/plain
File size: 2145 byte(s)
Updating Lutz' email

1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4 jfenwick 2548 * Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1312
14 ksteube 1811
15 jgs 150 /**************************************************************/
16    
17     /* Paso: returns the matrix format requested by a particular linear solver */
18    
19     /**************************************************************/
20    
21     /* Copyrights by ACcESS Australia 2004,2005 */
22 jfenwick 2608 /* Author: Lutz Gross, l.gross@uq.edu.au */
23 jgs 150
24     /**************************************************************/
25    
26     #include "Paso.h"
27     #include "Options.h"
28     #include "SystemMatrix.h"
29    
30     /**************************************************************/
31    
32 gross 2315 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 gross 1859 index_t true_package;
34 gross 415 index_t out=MATRIX_FORMAT_DEFAULT;
35 gross 2315 true_package=Paso_Options_getPackage(solver,package,symmetry, mpi_info);
36 jgs 150
37 gross 1859 switch(true_package) {
38 jgs 150
39     case PASO_PASO:
40 artak 2566 /* AMG on blocksize > 1 not supported yet */
41     /* if (preconditioner == PASO_AMG) {
42 gross 1859 out=MATRIX_FORMAT_DEFAULT + MATRIX_FORMAT_BLK1;
43     } else {
44 artak 2566 */
45 gross 1859 out=MATRIX_FORMAT_DEFAULT;
46 artak 2566 /* } */
47 jgs 150 break;
48    
49 gross 415
50 jgs 150 case PASO_MKL:
51 gross 425 out=MATRIX_FORMAT_BLK1 + MATRIX_FORMAT_OFFSET1;
52     /* if (solver == PASO_CHOLEVSKY) out+=MATRIX_FORMAT_SYM */
53 jgs 150 break;
54    
55     case PASO_UMFPACK:
56 gross 2315 if (mpi_info->size > 1) {
57     Paso_setError(VALUE_ERROR,"The selected solver UMFPACK requires CSC format which is not supported with MPI.");
58     return -1;
59     }
60 gross 806 out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;
61 jgs 150 break;
62    
63 ksteube 1312 case PASO_TRILINOS:
64     out=MATRIX_FORMAT_TRILINOS_CRS + MATRIX_FORMAT_BLK1; /* Distributed CRS */
65     break;
66    
67 jgs 150 default:
68     Paso_setError(VALUE_ERROR,"unknown package code");
69     }
70     return out;
71     }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26