Ejemplo n.º 1
0
int test_Matrix::runtests()
{

  //-------------------------------
  // Test a Factory_Trilinos matrix.
  if (localProc_==0) FEI_COUT << "Testing Factory_Trilinos fei::Matrix..." << FEI_ENDL;
  fei::SharedPtr<fei::Factory> factory_trilinos(new Factory_Trilinos(comm_));

  fei::SharedPtr<fei::Matrix> mat = create_matrix(factory_trilinos);

  matrix_test1(mat);

  if (localProc_==0) FEI_COUT << FEI_ENDL;

#ifdef HAVE_FEI_AZTECOO
  //-------------------------------
  // Test a matrix from a "snl_fei::Factory", which was created by the
  // test-util function create_fei_Factory for library "Aztec", which causes
  // an "old" LinearSystemCore object to be used as the underlying assembly layer.
  // (It still ends up using Aztec if you create a solver and solve the linear-
  // system, but it assembles data into non-Trilinos matrix/vector data structures.)
  if (localProc_==0) FEI_COUT << "Testing 'old' factory_aztec fei::Matrix..." << FEI_ENDL;
  fei::SharedPtr<fei::Factory> factory_aztec =
    fei::create_fei_Factory(comm_, "Aztec");

  fei::SharedPtr<fei::Matrix> mat1 = create_matrix(factory_aztec);

  matrix_test1(mat1);
#endif

  return(0);
}
Ejemplo n.º 2
0
int main(int argc, char *argv[]) {
    matrix_test1();

    return 0;
}