/[escript]/branches/doubleplusgood/paso/src/Options_getPackage.cpp
ViewVC logotype

Contents of /branches/doubleplusgood/paso/src/Options_getPackage.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4261 - (show annotations)
Wed Feb 27 06:09:33 2013 UTC (6 years, 1 month ago) by jfenwick
File size: 2196 byte(s)
Initial all c++ build.
But ... there are now reinterpret_cast<>'s
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 /************************************************************************************/
18
19 /* Paso: returns the package to be used */
20
21 /************************************************************************************/
22
23 /* Copyrights by ACcESS Australia 2004,2005 */
24 /* Author: Lutz Gross, l.gross@uq.edu.au */
25
26 /************************************************************************************/
27
28 #include "Paso.h"
29 #include "Options.h"
30
31 /************************************************************************************/
32
33 index_t Paso_Options_getPackage(index_t solver,index_t package, bool_t symmetry, Esys_MPIInfo *mpi_info) {
34 index_t out=PASO_PASO;
35 if (package==PASO_DEFAULT) {
36 if (solver==PASO_DIRECT) {
37 #ifdef MKL
38 out=PASO_MKL;
39 #else
40 #ifdef UMFPACK
41 out=PASO_UMFPACK;
42 #else
43 #ifdef PASTIX
44 out=PASO_PASTIX
45 #endif
46 #endif
47 #endif
48 if (( (out == PASO_MKL) || (out==PASO_UMFPACK) || (out == PASO_PASTIX) ) && (mpi_info->size>1) ) { /* these packages require CSC which is not supported with MPI */
49 out= PASO_PASO;
50 }
51 } else {
52 out=PASO_PASO;
53 }
54 } else if (package==PASO_PASO) {
55 out=PASO_PASO;
56 } else if (package==PASO_PASTIX) {
57 out=PASO_PASTIX;
58 } else if (package==PASO_MKL) {
59 out=PASO_MKL;
60 } else if (package==PASO_UMFPACK) {
61 out=PASO_UMFPACK;
62 } else if (package==PASO_TRILINOS) {
63 out=PASO_TRILINOS;
64 } else {
65 Esys_setError(VALUE_ERROR,"Paso_Options_getPackage: Unidentified package.");
66 }
67 return out;
68 }
69

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26