Commit 7d6c44b3 authored by Pietro Incardona's avatar Pietro Incardona

Fixing test without PETSC

parent a78247a0
......@@ -219,7 +219,9 @@ template<typename solver_type,typename lid_nn_3d> void lid_driven_cavity_3d()
BOOST_AUTO_TEST_CASE(lid_driven_cavity)
{
lid_driven_cavity_3d<umfpack_solver<double>,lid_nn_3d_eigen>();
#ifdef HAVE_PETSC
lid_driven_cavity_3d<petsc_solver<double>,lid_nn_3d_petsc>();
#endif
}
BOOST_AUTO_TEST_SUITE_END()
......
......@@ -88,6 +88,7 @@ public:
SparseMatrix(size_t N1, size_t N2) {std::cerr << __FILE__ << ":" << __LINE__ << " Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
SparseMatrix(size_t N1, size_t N2, size_t loc) {std::cerr << __FILE__ << ":" << __LINE__ << " Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
SparseMatrix() {std::cerr << __FILE__ << ":" << __LINE__ << " Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl;}
openfpm::vector<triplet_type> & getMatrixTriplets() {std::cerr << __FILE__ << ":" << __LINE__ << " Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl; return stub_vt;}
const int & getMat() const {std::cerr << __FILE__ << ":" << __LINE__ << " Error in order to use this class you must compile OpenFPM with linear algebra support" << std::endl; return stub_i;}
......
......@@ -168,6 +168,8 @@ BOOST_AUTO_TEST_CASE(sparse_matrix_eigen_parallel)
}
}
#ifdef HAVE_PETSC
BOOST_AUTO_TEST_CASE(sparse_matrix_eigen_petsc)
{
Vcluster & vcl = create_vcluster();
......@@ -412,6 +414,8 @@ BOOST_AUTO_TEST_CASE(sparse_matrix_eigen_petsc_solve)
solver.solve(sm,v);
}
#endif
BOOST_AUTO_TEST_SUITE_END()
......
......@@ -8,6 +8,8 @@
#ifndef OPENFPM_NUMERICS_SRC_SOLVERS_PETSC_SOLVER_HPP_
#define OPENFPM_NUMERICS_SRC_SOLVERS_PETSC_SOLVER_HPP_
#ifdef HAVE_PETSC
#include "Vector/Vector.hpp"
#include "Eigen/UmfPackSupport"
#include <Eigen/SparseLU>
......@@ -891,5 +893,6 @@ public:
}
};
#endif
#endif /* OPENFPM_NUMERICS_SRC_SOLVERS_PETSC_SOLVER_HPP_ */
......@@ -129,6 +129,7 @@ BOOST_AUTO_TEST_CASE(vector_eigen_parallel)
}
}
#ifdef HAVE_PETSC
BOOST_AUTO_TEST_CASE(vector_petsc_parallel)
{
......@@ -258,6 +259,8 @@ BOOST_AUTO_TEST_CASE(vector_petsc_parallel)
}
#endif
BOOST_AUTO_TEST_SUITE_END()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment