Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FuncEval.h
Go to the documentation of this file.
1 /**
2  * @file FuncEval.h
3  */
4 
5 // Copyright 2001 California Institute of Technology
6 
7 #ifndef CT_FUNCEVAL_H
8 #define CT_FUNCEVAL_H
9 
10 #include "cantera/base/ct_defs.h"
11 
12 namespace Cantera
13 {
14 /**
15  * Virtual base class for ODE right-hand-side function evaluators.
16  * Classes derived from FuncEval evaluate the right-hand-side function
17  * \f$ \vec{F}(t,\vec{y})\f$ in
18  * \f[
19  * \dot{\vec{y}} = \vec{F}(t,\vec{y}).
20  * \f]
21  * @ingroup odeGroup
22  */
23 class FuncEval
24 {
25 public:
26  FuncEval() {}
27  virtual ~FuncEval() {}
28 
29  /**
30  * Evaluate the right-hand-side function. Called by the integrator.
31  * @param[in] t time.
32  * @param[in] y solution vector, length neq()
33  * @param[out] ydot rate of change of solution vector, length neq()
34  * @param[in] p sensitivity parameter vector, length nparams()
35  */
36  virtual void eval(double t, double* y, double* ydot, double* p)=0;
37 
38  /**
39  * Fill the solution vector with the initial conditions
40  * at initial time t0.
41  */
42  virtual void getInitialConditions(double t0, size_t leny, double* y)=0;
43 
44  //! Number of equations.
45  virtual size_t neq()=0;
46 
47  //! Number of sensitivity parameters.
48  virtual size_t nparams() {
49  return 0;
50  }
51 };
52 
53 }
54 
55 #endif
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
virtual void eval(double t, double *y, double *ydot, double *p)=0
Evaluate the right-hand-side function.
virtual size_t neq()=0
Number of equations.
virtual size_t nparams()
Number of sensitivity parameters.
Definition: FuncEval.h:48
Virtual base class for ODE right-hand-side function evaluators.
Definition: FuncEval.h:23
virtual void getInitialConditions(double t0, size_t leny, double *y)=0
Fill the solution vector with the initial conditions at initial time t0.