Skip to content

Commit 5bd7fd4

Browse files
committed
add some more comments about confusing matrix formats
- triplet gives lower diagonal, but CSR gives upper diagonal - see also #638
1 parent b4e7461 commit 5bd7fd4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Algorithm/LinearSolvers/IpSparseSymLinearSolverInterface.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ namespace Ipopt
1919
*
2020
* This defines the general interface to linear solvers for sparse
2121
* symmetric indefinite matrices. The matrices can be provided
22-
* either in "triplet format" (like for Harwell's MA27 solver), or
23-
* in compressed sparse row (CSR) format for the upper triangular
24-
* part of the symmetric matrix.
22+
* either in "triplet format" for the lower triangular part
23+
* (like for Harwell's MA27 solver), or in compressed sparse row
24+
* (CSR) format for the upper triangular part of the symmetric matrix.
25+
* The latter may equivalently (or better) be referred as compressed
26+
* sparse column (CSC) format for the lower triangular part.
2527
*
2628
* The solver should be able to compute the inertia of the matrix,
2729
* or more specifically, the number of negative eigenvalues in the
@@ -99,7 +101,7 @@ class SparseSymLinearSolverInterface: public AlgorithmStrategyObject
99101
/** Enum to specify sparse matrix format. */
100102
enum EMatrixFormat
101103
{
102-
/** Triplet (MA27) format */
104+
/** Triplet (MA27) format for lower triangular part */
103105
Triplet_Format,
104106
/** Compressed sparse row format for upper triangular part, with 0 offset */
105107
CSR_Format_0_Offset,

0 commit comments

Comments
 (0)