9#include <fei_macros.hpp>
11#include <test_utils/test_Factory_helper.hpp>
13#include <test_utils/LibraryFactory.hpp>
15#include <fei_Factory_Trilinos.hpp>
17#include <snl_fei_Factory.hpp>
19#include <fei_Vector_Impl.hpp>
21#include <fei_Matrix_Impl.hpp>
24#define fei_file "test_Factory_helper.cpp"
25#include <fei_ErrMacros.hpp>
27int test_Factory_helper::dyncastMatrix(
fei::Matrix* matrix,
30 std::string sname(libname);
32 if (sname ==
"TEST_LSC") {
36 if (smatrix2 == NULL) {
37 fei::console_out() <<
"dynamic_cast<fei::Matrix_Impl<LinearSystemCore>*> failed"<<FEI_ENDL;
42 if (sname ==
"Aztec") {
43#ifdef HAVE_FEI_AZTECOO
46 if (smatrix == NULL) {
47 fei::console_out() <<
"dynamic_cast<fei::Matrix_Impl<LinearSystemCore>*> failed"<<FEI_ENDL;
51 fei::console_out() <<
"libname==Aztec but HAVE_FEI_AZTECOO not defined."<<FEI_ENDL;
56 if (sname ==
"Trilinos") {
60 if (smatrix == NULL) {
61 fei::console_out() <<
"dynamic_cast<fei::Matrix_Impl<Epetra_CrsMatrix>*> failed"<<FEI_ENDL;
65 fei::console_out() <<
"libname==Trilinos but HAVE_FEI_EPETRA not defined."<<FEI_ENDL;
73int test_Factory_helper::dyncastVector(
fei::Vector* vector,
76 std::string sname(libname);
77 if (sname ==
"TEST_LSC") {
80 if (svector == NULL) {
81 fei::console_out() <<
"dynamic_cast<fei::Vector_Impl<LinearSystemCore>*> failed"<<FEI_ENDL;
86 if (sname ==
"Aztec") {
87#ifdef HAVE_FEI_AZTECOO
90 if (svector == NULL) {
91 fei::console_out() <<
"dynamic_cast<fei::Vector_Impl<LinearSystemCore>*> failed"<<FEI_ENDL;
95 fei::console_out() <<
"libname==Aztec but HAVE_FEI_AZTECOO not defined."<<FEI_ENDL;
100 if (sname ==
"Trilinos") {
101#ifdef HAVE_FEI_EPETRA
104 if (svector == NULL) {
105 fei::console_out() <<
"dynamic_cast<fei::Vector_Impl<Epetra_MultiVector>*> failed"<<FEI_ENDL;
109 fei::console_out() <<
"libname==Trilinos but HAVE_FEI_EPETRA not defined."<<FEI_ENDL;
std::ostream & console_out()