GEOSX
TrilinosSolver.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 Total, S.A
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOSX_LINEARALGEBRA_INTERFACES_TRILINOSSOLVER_HPP_
20 #define GEOSX_LINEARALGEBRA_INTERFACES_TRILINOSSOLVER_HPP_
21 
24 
25 namespace geosx
26 {
27 
28 class DofManager;
29 class EpetraVector;
30 class EpetraMatrix;
31 
36 {
37 public:
38 
45 
51 
61  void solve( EpetraMatrix & mat,
62  EpetraVector & sol,
63  EpetraVector & rhs,
64  DofManager const * const dofManager = nullptr );
65 
71  {
72  return m_result;
73  }
74 
75 private:
76 
77  LinearSolverParameters m_parameters;
78  LinearSolverResult m_result;
79 
80  void solve_direct( EpetraMatrix & mat,
81  EpetraVector & sol,
82  EpetraVector & rhs );
83 
84  void solve_krylov( EpetraMatrix & mat,
85  EpetraVector & sol,
86  EpetraVector & rhs );
87 
88 };
89 
90 } // end geosx namespace
91 
92 #endif /* TRILINOSSOLVER_HPP_ */
Wrapper class for Epetra's CrsMatrix.
void solve(EpetraMatrix &mat, EpetraVector &sol, EpetraVector &rhs, DofManager const *const dofManager=nullptr)
Solve system with an iterative solver.
Set of parameters for a linear solver or preconditioner.
Results/stats of a linear solve.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns, and generally simplifying the interaction between PhysicsSolvers and linear algebra operations.
Definition: DofManager.hpp:42
LinearSolverResult const & result()
Get the result of previous solve.
TrilinosSolver(LinearSolverParameters parameters)
Solver constructor, with parameter list reference.
~TrilinosSolver()
Virtual destructor.
This class creates and provides basic support for AztecOO, Amesos and ML libraries.
This class creates and provides basic support for the Epetra_FEVector vector object type used in Tril...