Skip to content

Commit

Permalink
add some more comments about confusing matrix formats
Browse files Browse the repository at this point in the history
- triplet gives lower diagonal, but CSR gives upper diagonal
- see also #638
  • Loading branch information
svigerske committed Feb 7, 2023
1 parent b4e7461 commit 5bd7fd4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ namespace Ipopt
*
* This defines the general interface to linear solvers for sparse
* symmetric indefinite matrices. The matrices can be provided
* either in "triplet format" (like for Harwell's MA27 solver), or
* in compressed sparse row (CSR) format for the upper triangular
* part of the symmetric matrix.
* either in "triplet format" for the lower triangular part
* (like for Harwell's MA27 solver), or in compressed sparse row
* (CSR) format for the upper triangular part of the symmetric matrix.
* The latter may equivalently (or better) be referred as compressed
* sparse column (CSC) format for the lower triangular part.
*
* The solver should be able to compute the inertia of the matrix,
* or more specifically, the number of negative eigenvalues in the
Expand Down Expand Up @@ -99,7 +101,7 @@ class SparseSymLinearSolverInterface: public AlgorithmStrategyObject
/** Enum to specify sparse matrix format. */
enum EMatrixFormat
{
/** Triplet (MA27) format */
/** Triplet (MA27) format for lower triangular part */
Triplet_Format,
/** Compressed sparse row format for upper triangular part, with 0 offset */
CSR_Format_0_Offset,
Expand Down

0 comments on commit 5bd7fd4

Please sign in to comment.