Mercurial > hg > octave-lyh
changeset 1839:5a579fa44924
[project @ 1996-02-03 09:29:57 by jwe]
author | jwe |
---|---|
date | Sat, 03 Feb 1996 09:31:38 +0000 |
parents | 4221a133212e |
children | cf5b42781ecc |
files | src/dassl.cc src/lsode.cc |
diffstat | 2 files changed, 38 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dassl.cc +++ b/src/dassl.cc @@ -29,7 +29,7 @@ #include <strstream.h> -#include "DAE.h" +#include "DASSL.h" #include "defun-dld.h" #include "error.h" @@ -43,7 +43,7 @@ // Global pointer for user defined function required by dassl. static tree_fvc *dassl_fcn; -static ODE_options dassl_opts; +static DASSL_options dassl_opts; ColumnVector dassl_user_function (const ColumnVector& x, const ColumnVector& xdot, double t) @@ -178,7 +178,7 @@ double tzero = out_times.elem (0); DAEFunc func (dassl_user_function); - DAE dae (state, deriv, tzero, func); + DASSL dae (state, deriv, tzero, func); dae.copy (dassl_opts); Matrix output; @@ -195,12 +195,12 @@ return retval; } -typedef void (ODE_options::*d_set_opt_mf) (double); -typedef double (ODE_options::*d_get_opt_mf) (void); +typedef void (DASSL_options::*d_set_opt_mf) (double); +typedef double (DASSL_options::*d_get_opt_mf) (void); #define MAX_TOKENS 3 -struct DAE_OPTIONS +struct DASSL_OPTIONS { const char *keyword; const char *kw_tok[MAX_TOKENS + 1]; @@ -210,31 +210,31 @@ d_get_opt_mf d_get_fcn; }; -static DAE_OPTIONS dassl_option_table [] = +static DASSL_OPTIONS dassl_option_table [] = { { "absolute tolerance", { "absolute", "tolerance", 0, 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_absolute_tolerance, - ODE_options::absolute_tolerance, }, + DASSL_options::set_absolute_tolerance, + DASSL_options::absolute_tolerance, }, { "initial step size", { "initial", "step", "size", 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_initial_step_size, - ODE_options::initial_step_size, }, + DASSL_options::set_initial_step_size, + DASSL_options::initial_step_size, }, { "maximum step size", { "maximum", "step", "size", 0, }, { 2, 0, 0, 0, }, 1, - ODE_options::set_maximum_step_size, - ODE_options::maximum_step_size, }, + DASSL_options::set_maximum_step_size, + DASSL_options::maximum_step_size, }, { "relative tolerance", { "relative", "tolerance", 0, 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_relative_tolerance, - ODE_options::relative_tolerance, }, + DASSL_options::set_relative_tolerance, + DASSL_options::relative_tolerance, }, { 0, { 0, 0, 0, 0, }, @@ -254,7 +254,7 @@ << " keyword value\n" << " ------- -----\n\n"; - DAE_OPTIONS *list = dassl_option_table; + DASSL_OPTIONS *list = dassl_option_table; const char *keyword; while ((keyword = list->keyword) != 0) @@ -278,7 +278,7 @@ static void set_dassl_option (const string& keyword, double val) { - DAE_OPTIONS *list = dassl_option_table; + DASSL_OPTIONS *list = dassl_option_table; while (list->keyword != 0) { @@ -300,7 +300,7 @@ { Octave_object retval; - DAE_OPTIONS *list = dassl_option_table; + DASSL_OPTIONS *list = dassl_option_table; while (list->keyword != 0) {
--- a/src/lsode.cc +++ b/src/lsode.cc @@ -29,7 +29,7 @@ #include <strstream.h> -#include "ODE.h" +#include "LSODE.h" #include "defun-dld.h" #include "error.h" @@ -43,7 +43,7 @@ // Global pointer for user defined function required by lsode. static tree_fvc *lsode_fcn; -static ODE_options lsode_opts; +static LSODE_options lsode_opts; ColumnVector lsode_user_function (const ColumnVector& x, double t) @@ -154,7 +154,7 @@ int nsteps = out_times.capacity (); ODEFunc func (lsode_user_function); - ODE ode (state, tzero, func); + LSODE ode (state, tzero, func); ode.copy (lsode_opts); int nstates = state.capacity (); @@ -170,12 +170,12 @@ return retval; } -typedef void (ODE_options::*d_set_opt_mf) (double); -typedef double (ODE_options::*d_get_opt_mf) (void); +typedef void (LSODE_options::*d_set_opt_mf) (double); +typedef double (LSODE_options::*d_get_opt_mf) (void); #define MAX_TOKENS 3 -struct ODE_OPTIONS +struct LSODE_OPTIONS { const char *keyword; const char *kw_tok[MAX_TOKENS + 1]; @@ -185,37 +185,37 @@ d_get_opt_mf d_get_fcn; }; -static ODE_OPTIONS lsode_option_table [] = +static LSODE_OPTIONS lsode_option_table [] = { { "absolute tolerance", { "absolute", "tolerance", 0, 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_absolute_tolerance, - ODE_options::absolute_tolerance, }, + LSODE_options::set_absolute_tolerance, + LSODE_options::absolute_tolerance, }, { "initial step size", { "initial", "step", "size", 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_initial_step_size, - ODE_options::initial_step_size, }, + LSODE_options::set_initial_step_size, + LSODE_options::initial_step_size, }, { "maximum step size", { "maximum", "step", "size", 0, }, { 2, 0, 0, 0, }, 1, - ODE_options::set_maximum_step_size, - ODE_options::maximum_step_size, }, + LSODE_options::set_maximum_step_size, + LSODE_options::maximum_step_size, }, { "minimum step size", { "minimum", "step", "size", 0, }, { 2, 0, 0, 0, }, 1, - ODE_options::set_minimum_step_size, - ODE_options::minimum_step_size, }, + LSODE_options::set_minimum_step_size, + LSODE_options::minimum_step_size, }, { "relative tolerance", { "relative", "tolerance", 0, 0, }, { 1, 0, 0, 0, }, 1, - ODE_options::set_relative_tolerance, - ODE_options::relative_tolerance, }, + LSODE_options::set_relative_tolerance, + LSODE_options::relative_tolerance, }, { 0, { 0, 0, 0, 0, }, @@ -235,7 +235,7 @@ << " keyword value\n" << " ------- -----\n\n"; - ODE_OPTIONS *list = lsode_option_table; + LSODE_OPTIONS *list = lsode_option_table; const char *keyword; while ((keyword = list->keyword) != 0) @@ -259,7 +259,7 @@ static void set_lsode_option (const string& keyword, double val) { - ODE_OPTIONS *list = lsode_option_table; + LSODE_OPTIONS *list = lsode_option_table; while (list->keyword != 0) { @@ -281,7 +281,7 @@ { Octave_object retval; - ODE_OPTIONS *list = lsode_option_table; + LSODE_OPTIONS *list = lsode_option_table; while (list->keyword != 0) {