Skip to content

Commit

Permalink
complete factor extraction implementation, as far as i can tell
Browse files Browse the repository at this point in the history
  • Loading branch information
superwhiskers committed Jul 22, 2024
1 parent c8deb1e commit 479fd70
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resolve/LinSolverDirectLUSOL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ namespace ReSolve
}

if (L_ != nullptr) {
// by the way we've implemented setup, we can just return the
// because of the way we've implemented setup, we can just return the
// existing pointer in L_ as this means we've already extracted L
//
// this isn't perfect, but it's functional
Expand Down Expand Up @@ -299,7 +299,8 @@ namespace ReSolve
}

rows[insertion_offset] = row;
values[insertion_offset] = a_[offset];
// why. why
values[insertion_offset] = -a_[offset];

offset--;
}
Expand Down Expand Up @@ -445,7 +446,7 @@ namespace ReSolve
{
// NOTE: determines a hopefully "good enough" size for a_, indc_, indr_.
// see lena_'s documentation for more details
lena_ = std::max({2 * nelem_, 10 * m_, 10 * n_, 10000});
lena_ = std::max({2 * nelem_, 10 * m_, 10 * n_, 1000000});

a_ = new real_type[lena_];
indc_ = new index_type[lena_];
Expand Down

0 comments on commit 479fd70

Please sign in to comment.