-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrhs.hpp
31 lines (23 loc) · 767 Bytes
/
rhs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* ODE RHS and Jacobian function abstract base class definitions.
D.R. Reynolds
Math 6321 @ SMU
Fall 2020 */
#ifndef ODE_RHS_DEFINED__
#define ODE_RHS_DEFINED__
// Inclusions
#include <armadillo>
// Declare abstract base classes for ODE RHS and its Jacobian, to
// define what the time integrator expects from each.
// ODE RHS function abstract base class; derived classes
// must at least implement the Evaluate() routine
class RHSFunction {
public:
virtual int Evaluate(double t, arma::vec& y, arma::vec& f) = 0;
};
// ODE RHS Jacobian function abstract base class; derived
// classes must at least implement the Evaluate() routine
class RHSJacobian {
public:
virtual int Evaluate(double t, arma::vec& y, arma::mat& J) = 0;
};
#endif