Update problem withouth reset workspace #750
Unanswered
damkholer
asked this question in
C Interface
Replies: 1 comment
-
|
If you still want to use the data updating features of the solver, then your only option here is to define the initial A and P matrices such that every entry that could possibly be non-zero is included in the matrix sparsity pattern at initialization. Note that it's not a problem to define a sparse matrix with a non-zero entry marked in the sparsity pattern (i.e. a structural non-zero), but for the numerical value of that entry to be zero. You are then free to assign these entries to be numerically non-zero in subsequent solves. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am solving a problem that is iteratively updated after each solve() step.
I am searching a way to setup the problem only first time (first setup) and update the matrices value on the sequent steps (update_data_vect and update_data_mat).
The problem is that i am using sparce matrices, and even if the total problem size is fixed (Amaxsize and Pmaxsize) the number of the nonzero values inside the P and A sparce marices could vary between sequent optimization steps. This cause some problems in update_data_mat function since nonzero new element are higher of nonzero old element (even if lower than nonzero max element n*n)
At the end I have concluded that for this case I have to cleanup() the workspace and setup() again the problem at each step.
Is it correct?
Other ideas?
Beta Was this translation helpful? Give feedback.
All reactions