33 #ifndef STRUMPACK_SPARSE_SOLVER_HPP 
   34 #define STRUMPACK_SPARSE_SOLVER_HPP 
   49   template<
typename scalar_t,
typename integer_t> 
class MatrixReordering;
 
   50   template<
typename scalar_t,
typename integer_t> 
class EliminationTree;
 
   73   template<
typename scalar_t,
typename integer_t=
int>
 
   97     SparseSolver(
int argc, 
char* argv[], 
bool verbose=
true, 
bool root=
true);
 
  148                         const integer_t* row_ptr, 
const integer_t* col_ind,
 
  149                         const scalar_t* values, 
bool symmetric_pattern=
false);
 
  181                               const integer_t* row_ptr,
 
  182                               const integer_t* col_ind,
 
  183                               const scalar_t* values,
 
  184                               bool symmetric_pattern=
false);
 
  207     void setup_tree() 
override;
 
  208     void setup_reordering() 
override;
 
  209     int compute_reordering(
const int* p, 
int base,
 
  210                            int nx, 
int ny, 
int nz,
 
  211                            int components, 
int width) 
override;
 
  212     void separator_reordering() 
override;
 
  214     SpMat_t* matrix()
 override { 
return mat_.get(); }
 
  215     std::unique_ptr<SpMat_t> matrix_nonzero_diag()
 override {
 
  216       return mat_->add_missing_diagonal(opts_.pivot_threshold());
 
  218     Reord_t* reordering()
 override { 
return nd_.get(); }
 
  219     Tree_t* tree()
 override { 
return tree_.get(); }
 
  220     const SpMat_t* matrix()
 const override { 
return mat_.get(); }
 
  221     const Reord_t* reordering()
 const override { 
return nd_.get(); }
 
  222     const Tree_t* tree()
 const override { 
return tree_.get(); }
 
  224     void permute_matrix_values();
 
  226     ReturnCode solve_internal(
const scalar_t* b, scalar_t* x,
 
  227                               bool use_initial_guess=
false) 
override;
 
  228     ReturnCode solve_internal(
const DenseM_t& b, DenseM_t& x,
 
  229                               bool use_initial_guess=
false) 
override;
 
  231     void delete_factors_internal() 
override;
 
  233     void transform_x0(DenseM_t& x, DenseM_t& xtmp);
 
  234     void transform_b(
const DenseM_t& b, DenseM_t& bloc);
 
  235     void transform_x(DenseM_t& x, DenseM_t& xtmp);
 
  237     std::unique_ptr<CSRMatrix<scalar_t,integer_t>> mat_;
 
  238     std::unique_ptr<MatrixReordering<scalar_t,integer_t>> nd_;
 
  239     std::unique_ptr<EliminationTree<scalar_t,integer_t>> tree_;
 
  241     using SPBase_t = SparseSolverBase<scalar_t,integer_t>;
 
  242     using SPBase_t::opts_;
 
  243     using SPBase_t::is_root_;
 
  244     using SPBase_t::matching_;
 
  245     using SPBase_t::equil_;
 
  246     using SPBase_t::factored_;
 
  247     using SPBase_t::reordered_;
 
  248     using SPBase_t::Krylov_its_;
 
  251   template<
typename scalar_t,
typename integer_t>
 
  252   using StrumpackSparseSolver = SparseSolver<scalar_t,integer_t>;
 
Contains the definition of the base (abstract/pure virtual) sparse solver class.
Class for storing a compressed sparse row matrix (single node).
Definition: CSRMatrix.hpp:55
Abstract base class for compressed sparse matrix storage.
Definition: CompressedSparseMatrix.hpp:149
Like DenseMatrix, this class represents a matrix, stored in column major format, to allow direct use ...
Definition: DenseMatrix.hpp:1015
This class represents a matrix, stored in column major format, to allow direct use of BLAS/LAPACK rou...
Definition: DenseMatrix.hpp:138
Definition: SparseSolverBase.hpp:53
Definition: SparseSolverBase.hpp:52
SparseSolverBase is the virtual base for both the sequential/multithreaded and distributed sparse sol...
Definition: SparseSolverBase.hpp:78
SparseSolver is the main sequential or multithreaded sparse solver class.
Definition: StrumpackSparseSolver.hpp:75
void update_matrix_values(const CSRMatrix< scalar_t, integer_t > &A)
void update_matrix_values(integer_t N, const integer_t *row_ptr, const integer_t *col_ind, const scalar_t *values, bool symmetric_pattern=false)
SparseSolver(bool verbose=true, bool root=true)
SparseSolver(int argc, char *argv[], bool verbose=true, bool root=true)
void set_matrix(const CSRMatrix< scalar_t, integer_t > &A)
void set_csr_matrix(integer_t N, const integer_t *row_ptr, const integer_t *col_ind, const scalar_t *values, bool symmetric_pattern=false)
Definition: StrumpackOptions.hpp:43
ReturnCode
Enumeration for the possible return codes.
Definition: StrumpackParameters.hpp:50