20 #ifndef LIBMESH_LASPACK_LINEAR_SOLVER_H
21 #define LIBMESH_LASPACK_LINEAR_SOLVER_H
23 #include "libmesh/libmesh_common.h"
25 #if defined(LIBMESH_HAVE_LASPACK)
34 #include "libmesh/linear_solver.h"
35 #include "libmesh/laspack_vector.h"
36 #include "libmesh/laspack_matrix.h"
50 class LaspackLinearSolver :
public LinearSolver<T>
66 virtual void clear ()
override;
71 virtual void init (
const char *
name =
nullptr)
override;
76 virtual std::pair<unsigned int, Real>
77 solve (SparseMatrix<T> & matrix,
78 NumericVector<T> & solution,
79 NumericVector<T> & rhs,
81 const unsigned int m_its)
override;
86 virtual std::pair<unsigned int, Real>
88 NumericVector<T> & solution,
89 NumericVector<T> & rhs,
91 const unsigned int m_its)
override;
96 virtual std::pair<unsigned int, Real>
97 solve (SparseMatrix<T> & matrix,
99 NumericVector<T> & solution,
100 NumericVector<T> & rhs,
102 const unsigned int m_its)
override;
107 virtual std::pair<unsigned int, Real>
108 solve (
const ShellMatrix<T> & shell_matrix,
109 NumericVector<T> & solution_in,
110 NumericVector<T> & rhs_in,
112 const unsigned int m_its)
override;
119 virtual std::pair<unsigned int, Real>
120 solve (
const ShellMatrix<T> & shell_matrix,
121 const SparseMatrix<T> & precond_matrix,
122 NumericVector<T> & solution_in,
123 NumericVector<T> & rhs_in,
125 const unsigned int m_its)
override;
154 template <
typename T>
158 _precond_type (ILUPrecond)
164 template <
typename T>
173 template <
typename T>
175 std::pair<unsigned int, Real>
183 libmesh_error_msg(
"ERROR: LASPACK does not support a user-supplied preconditioner!");
185 std::pair<unsigned int, Real> p;
191 #endif // #ifdef LIBMESH_HAVE_LASPACK
192 #endif // LIBMESH_LASPACK_LINEAR_SOLVER_H