[CppAD] newbie - help: Assertion `Taylor[depvar[i]] == z[i].value'
bradbell at seanet.com
Wed Nov 30 09:12:30 EST 2005
Marco Morandini wrote:
> I'm a new user, and I'm trying to use
> CppAD within a scientific simulation code.
> The idea is to compute the Jacobian matrix of
> some experimental complex joint elements without the need
> to code them explicitly.
> Currently I'm stuck with this run-time error (cppad-05-11-28):
> error from an unknown source:
> mbdyn: ../../libraries/libcppad/CppAD/local/Fun.h:491:
> CppAD::ADFun<Base>::ADFun(const VectorADBase&, const VectorADBase&)
> [with VectorADBase = std::vector<CppAD::AD<double>,
> std::allocator<CppAD::AD<double> > >, Base = double]: Assertion
> `Taylor[depvar[i]] == z[i].value' failed.
> that is triggered by ADFun:
> CppAD::ADFun<doublereal> f(x_indep, y_dep);
CppAD is doing a sanity check at the time of construction of the ADFun
object. It has found that the values computed by the function object do
not equal the values computed during the computation.
The IEEE standard states that Nan == Nan should return false (where Nan
denotes not a number), so it is possible that this happens because one
of the elements of y_dep is a Nan (this turned out to be the problem for
the case above).
More information about the CppAD