16 #ifndef dealii_trilinos_solver_h 17 # define dealii_trilinos_solver_h 20 # include <deal.II/base/config.h> 22 # ifdef DEAL_II_WITH_TRILINOS 24 # include <deal.II/lac/exceptions.h> 25 # include <deal.II/lac/la_parallel_vector.h> 26 # include <deal.II/lac/solver_control.h> 27 # include <deal.II/lac/vector.h> 31 # include <Epetra_LinearProblem.h> 32 # include <Epetra_Operator.h> 37 DEAL_II_NAMESPACE_OPEN
43 class PreconditionBase;
167 solve(
const Epetra_Operator & A,
182 solve(
const Epetra_Operator &A,
185 const Epetra_Operator &preconditioner);
197 solve(
const Epetra_Operator & A,
198 Epetra_MultiVector & x,
199 const Epetra_MultiVector &b,
213 solve(
const Epetra_Operator & A,
214 Epetra_MultiVector & x,
215 const Epetra_MultiVector &b,
216 const Epetra_Operator & preconditioner);
233 const ::Vector<double> &b,
248 solve(Epetra_Operator & A,
250 const ::Vector<double> &b,
262 const ::LinearAlgebra::distributed::Vector<double> &b,
273 solve(Epetra_Operator & A,
275 const ::LinearAlgebra::distributed::Vector<double> &b,
290 <<
"An error with error number " << arg1
291 <<
" occurred while calling a Trilinos function");
307 template <
typename Preconditioner>
309 do_solve(
const Preconditioner &preconditioner);
314 template <
typename Preconditioner>
353 const Epetra_Operator &preconditioner);
453 const unsigned int restart_parameter = 30);
645 const ::LinearAlgebra::distributed::Vector<double> &b);
666 const ::Vector<double> &b);
677 const ::LinearAlgebra::distributed::Vector<double> &b);
690 <<
"An error with error number " << arg1
691 <<
" occurred while calling a Trilinos function");
720 std::unique_ptr<Amesos_BaseSolver>
solver;
730 DEAL_II_NAMESPACE_CLOSE
732 # endif // DEAL_II_WITH_TRILINOS void set_preconditioner(AztecOO &solver, const Preconditioner &preconditioner)
SolverCG(SolverControl &cn, const AdditionalData &data=AdditionalData())
virtual ~SolverDirect()=default
SolverBase(SolverControl &cn, const AdditionalData &data=AdditionalData())
const bool output_solver_details
std::unique_ptr< Amesos_BaseSolver > solver
const AdditionalData additional_data
std::unique_ptr< AztecOO_StatusTest > status_test
const AdditionalData additional_data
AdditionalData(const bool output_solver_details=false, const unsigned int restart_parameter=30)
const AdditionalData additional_data
void initialize(const SparseMatrix &A)
static ::ExceptionBase & ExcTrilinosError(int arg1)
void solve(MPI::Vector &x, const MPI::Vector &b)
void solve(const SparseMatrix &A, MPI::Vector &x, const MPI::Vector &b, const PreconditionBase &preconditioner)
const AdditionalData additional_data
virtual ~SolverBase()=default
SolverControl & solver_control
#define DeclException1(Exception1, type1, outsequence)
SolverCGS(SolverControl &cn, const AdditionalData &data=AdditionalData())
AdditionalData(const bool output_solver_details=false)
SolverBicgstab(SolverControl &cn, const AdditionalData &data=AdditionalData())
SolverControl & solver_control
std::unique_ptr< Epetra_LinearProblem > linear_problem
SolverControl & control() const
std::unique_ptr< Epetra_LinearProblem > linear_problem
SolverTFQMR(SolverControl &cn, const AdditionalData &data=AdditionalData())
AdditionalData(const bool output_solver_details=false)
const AdditionalData additional_data
AdditionalData(const bool output_solver_details=false, const std::string &solver_type="Amesos_Klu")
SolverDirect(SolverControl &cn, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
bool output_solver_details
AdditionalData(const bool output_solver_details=false)
SolverControl & control() const
void do_solve(const Preconditioner &preconditioner)
AdditionalData(const bool output_solver_details=false, const unsigned int gmres_restart_parameter=30)
SolverGMRES(SolverControl &cn, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
static ::ExceptionBase & ExcTrilinosError(int arg1)
AdditionalData(const bool output_solver_details=false)
const unsigned int gmres_restart_parameter