Mercurial > fem-fenics-eugenio
comparison src/femfenics_factory.cc @ 251:b1dc98050634
Add support for PETSc algebra back-end
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Sun, 20 Jul 2014 18:59:17 +0200 |
parents | 8f309b85bb7e |
children | 2b51546a28f7 |
comparison
equal
deleted
inserted
replaced
250:8f309b85bb7e | 251:b1dc98050634 |
---|---|
15 this program; if not, see <http://www.gnu.org/licenses/>. | 15 this program; if not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #include "femfenics_factory.h" | 18 #include "femfenics_factory.h" |
19 #include "uBLAS_factory.h" | 19 #include "uBLAS_factory.h" |
20 #include "PETSc_factory.h" | |
20 #include <octave/parse.h> | 21 #include <octave/parse.h> |
21 | 22 |
22 femfenics_base_factory const& | 23 femfenics_base_factory const& |
23 femfenics_factory::factory (void) const | 24 femfenics_factory::factory (void) const |
24 { | 25 { |
25 std::string backend = linear_algebra_backend (); | 26 std::string backend = linear_algebra_backend (); |
26 /* Here go the returns for other back-ends | 27 |
27 if (backend == "PETSc") | 28 if (backend == "PETSc") |
28 return PETSc_factory::instance (); ... | 29 return PETSc_factory::instance (); |
29 */ | |
30 | 30 |
31 // Default back-end | 31 // Default back-end |
32 return uBLAS_factory::instance (); | 32 return uBLAS_factory::instance (); |
33 } | 33 } |
34 | 34 |