GEOSX
HypreSuiteSparse.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_HYPRESUITESPARSE_HPP_
20 #define GEOSX_LINEARALGEBRA_INTERFACES_HYPRESUITESPARSE_HPP_
21 
22 #include "common/DataTypes.hpp"
25 
26 namespace geosx
27 {
28 
34 void ConvertHypreToSuiteSparseMatrix( HypreMatrix const & matrix,
35  SuiteSparse & SSData );
36 
45 int SuiteSparseSolve( SuiteSparse & SSData,
46  HypreVector const & b,
47  HypreVector & x,
48  bool transpose = false );
49 
56 real64 HypreSuiteSparseCond( HypreMatrix const & matrix, SuiteSparse & SSData );
57 
58 }
59 
60 #endif /*GEOSX_LINEARALGEBRA_INTERFACES_HYPRESUITESPARSE_HPP_*/
constexpr void transpose(DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix)
Store the transpose of the NxM matrix srcMatrix in dstMatrix.
real64 HypreSuiteSparseCond(HypreMatrix const &matrix, SuiteSparse &SSData)
Computes an accurate condition number (time consuming function!!!)
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
void ConvertHypreToSuiteSparseMatrix(HypreMatrix const &matrix, SuiteSparse &SSData)
Converts a matrix from Hypre to SuiteSparse format.
int SuiteSparseSolve(SuiteSparse &SSData, HypreVector const &b, HypreVector &x, bool transpose=false)
Solves a linear system with SuiteSparse (matrix has already been factorized)