Block decomposition: fix sparse indices of static Jacobian when mfs > 0
parent
9013a5cb1b
commit
7db02b23e9
|
@ -687,7 +687,8 @@ StaticModel::computeChainRuleJacobian()
|
|||
{
|
||||
auto &[eq, var, lag] { indices };
|
||||
assert(lag == 0);
|
||||
blocks_jacobian_sparse_column_major_order[blk].emplace(pair{eq, var}, d1);
|
||||
if (eq >= nb_recursives && var >= nb_recursives)
|
||||
blocks_jacobian_sparse_column_major_order[blk].emplace(pair{eq-nb_recursives, var-nb_recursives}, d1);
|
||||
}
|
||||
blocks_jacobian_sparse_colptr[blk] = computeCSCColPtr(blocks_jacobian_sparse_column_major_order[blk], size);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue