Prev | Next |
# include <cppad/speed/ode_evaluate.hpp>
ode_evaluate(x, p, fp)
ode_evaluate
is defined in the CppAD
namespace by including
the file cppad/speed/ode_evaluate.hpp
(relative to the CppAD distribution directory).
Float
must be a NumericType
.
The
Float
operation sequence
for this routine does not depend on the value of the argument
x
,
hence it does not need to be retaped for each value of @(@
x
@)@.
y
and
z
are
Float
objects, the syntax
y = fabs(z)
must be supported. Note that it does not matter if the operation
sequence for fabs
depends on
z
because the
corresponding results are not actually used by ode_evaluate
;
see fabs
in Runge45
.
x
has prototype
const CppAD::vector<Float>& x
It contains he argument value for which the function,
or its derivative, is being evaluated.
The value @(@
n
@)@ is determined by the size of the vector
x
.
p
has prototype
size_t p
x
.
fp
has prototype
CppAD::vector<Float>& fp
The input value of the elements of
fp
does not matter.
p
is zero,
fp
has size equal to @(@
n
@)@
and contains the value of @(@
y(x, 1)
@)@.
p
is one,
fp
has size equal to
n^2
and for @(@
i = 0 , \ldots 1
@)@, @(@
j = 0 , \ldots , n-1
@)@
@[@
\D{y[i]}{x[j]} (x, 1) = fp [ i \cdot n + j ]
@]@
ode_evaluate.hpp
.