/[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 1859 - (hide annotations)
Wed Oct 8 03:03:37 2008 UTC (11 years ago) by gross
File MIME type: text/plain
File size: 2004 byte(s)
first version of testing for transport solver.
1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4     * Copyright (c) 2003-2008 by University of Queensland
5     * 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     /* Author: gross@access.edu.au */
23    
24     /**************************************************************/
25    
26     #include "Paso.h"
27     #include "Options.h"
28     #include "SystemMatrix.h"
29    
30     /**************************************************************/
31    
32 gross 1859 index_t Paso_SystemMatrix_getSystemMatrixTypeId(const index_t solver,const index_t preconditioner, const index_t package,const bool_t symmetry) {
33     index_t true_package;
34 gross 415 index_t out=MATRIX_FORMAT_DEFAULT;
35 gross 1859 true_package=Paso_Options_getPackage(solver,package,symmetry);
36 jgs 150
37 gross 1859 switch(true_package) {
38 jgs 150
39     case PASO_PASO:
40 gross 1859 if (preconditioner == PASO_AMG) {
41     out=MATRIX_FORMAT_DEFAULT + MATRIX_FORMAT_BLK1;
42     } else {
43     out=MATRIX_FORMAT_DEFAULT;
44     }
45 jgs 150 break;
46    
47     case PASO_SCSL:
48 gross 415 out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;
49 gross 425 /* if (solver == PASO_CHOLEVSKY) out+=MATRIX_FORMAT_SYM */
50 jgs 150 break;
51 gross 415
52 jgs 150 case PASO_MKL:
53 gross 425 out=MATRIX_FORMAT_BLK1 + MATRIX_FORMAT_OFFSET1;
54     /* if (solver == PASO_CHOLEVSKY) out+=MATRIX_FORMAT_SYM */
55 jgs 150 break;
56    
57     case PASO_UMFPACK:
58 gross 806 out=MATRIX_FORMAT_CSC + MATRIX_FORMAT_BLK1;
59 jgs 150 break;
60    
61 ksteube 1312 case PASO_TRILINOS:
62     out=MATRIX_FORMAT_TRILINOS_CRS + MATRIX_FORMAT_BLK1; /* Distributed CRS */
63     break;
64    
65 jgs 150 default:
66     Paso_setError(VALUE_ERROR,"unknown package code");
67     }
68     return out;
69     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26