\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
ode_evaluate¶
Evaluate a Function Defined in Terms of an ODE¶
Purpose¶
This routine evaluates a function \(f : \B{R}^n \rightarrow \B{R}^n\) defined by
where \(y(x, t)\) solves the ordinary differential equation
where \(g : \B{R}^n \times \B{R} \rightarrow \B{R}^n\) is an unspecified function.
Inclusion¶
The template function ode_evaluate
is defined in the CppAD
namespace by including
the file cppad/speed/ode_evaluate.hpp
(relative to the CppAD distribution directory).
Float¶
Operation Sequence¶
The type 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\).
x¶
The argument 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¶
The argument p has prototype
size_t
p
fp¶
The argument fp has prototype
CppAD::vector<
Float >& fp
The input value of the elements of fp does not matter.
Example¶
The file
ode_evaluate.cpp
contains an example and test of ode_evaluate.hpp
.