Closed metab0t closed 3 weeks ago
The problem seems that AD<double>
defaults to 0.0, and causes the evaluation function problematic.
Just assign correct values to axp
like
CPPAD_TESTVECTOR(AD<double>) axp(n);
axp[0] = 1.0;
axp[1] = 2.0;
axp[2] = 3.0;
During the recording of a function, the function is evaluated at the independent variable values. These values are unspecified if you do not set them before the call to Independent.
If you are satisfied with this explanation, please close this issue.
Yes, I understand the reasons now. Thanks!
The following code errors:
The error happens at the
size_t n_color = af.sparse_jac_rev(ax, subset, pattern_jac, coloring, work);
line as follows: