Add an early out in writing jacobian.
Split from previous large 'Eigen library integration' commit.pull/1159/head
parent
aec46b608e
commit
e528fabbe4
|
@ -63,6 +63,8 @@ bool System::WriteJacobian(int tag) {
|
|||
if(j == paramToIndex.end()) continue;
|
||||
Expr *pd = f->PartialWrt(p);
|
||||
pd = pd->FoldConstants();
|
||||
if(pd->IsZeroConst())
|
||||
continue;
|
||||
mat.A.sym[i][j->second] = pd;
|
||||
}
|
||||
paramsUsed.Clear();
|
||||
|
|
Loading…
Reference in New Issue