Public Member Functions | List of all members
o2scl::ode_iv_table< func_t, vec_t, alloc_vec_t, alloc_t > Class Template Reference

Solve an initial-value ODE problem and store the result in a table object. More...

#include <ode_iv_table.h>

Inheritance diagram for o2scl::ode_iv_table< func_t, vec_t, alloc_vec_t, alloc_t >:
o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >

Public Member Functions

int solve_grid_table (size_t n, vec_t &ystart, table<> &t, std::string x_col, std::string y_prefix, std::string dydx_prefix, std::string yerr_prefix, func_t &derivs)
 Desc.
 
int solve_store_table (double x0, double x1, double h, size_t n, vec_t &ystart, size_t &n_sol, table<> &t, std::string x_col, std::string y_prefix, std::string dydx_prefix, std::string yerr_prefix, func_t &derivs)
 Desc.
 
- Public Member Functions inherited from o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >
virtual const char * type ()
 Return the type, "ode_iv_solve".
 
int solve_final_value (double x0, double x1, double h, size_t n, vec_t &ystart, vec_t &yend, func_t &derivs)
 Solve the initial-value problem to get the final value. More...
 
int solve_final_value (double x0, double x1, double h, size_t n, vec_t &ystart, vec_t &yend, vec_t &yerr, func_t &derivs)
 Solve the initial-value problem to get the final value with errors. More...
 
int solve_final_value (double x0, double x1, double h, size_t n, vec_t &ystart, vec_t &yend, vec_t &yerr, vec_t &dydx_end, func_t &derivs)
 Solve the initial-value problem to get the final value, derivatives, and errors. More...
 
int solve_store (double x0, double x1, double h, size_t n, size_t &n_sol, vec_t &x_sol, mat_t &y_sol, mat_t &yerr_sol, mat_t &dydx_sol, func_t &derivs, size_t istart=0)
 Solve the initial-value problem and store the associated output. More...
 
int solve_grid (double h, size_t n, size_t nsol, vec_t &xsol, mat_t &ysol, mat_t &err_sol, mat_t &dydx_sol, func_t &derivs)
 Solve the initial-value problem from x0 to x1 over a grid storing derivatives and errors. More...
 
int set_astep (astep_base< vec_t, vec_t, vec_t, func_t > &as)
 Set the adaptive stepper to use.
 

Additional Inherited Members

- Public Types inherited from o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >
typedef boost::numeric::ublas::vector< double > ubvector
 
- Public Attributes inherited from o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >
int verbose
 Set output level.
 
size_t nsteps_out
 Number of output points for verbose output (default 10) More...
 
size_t ntrial
 Maximum number of applications of the adaptive stepper (default 1000)
 
size_t nsteps
 Number of adaptive ste!ps employed.
 
bool exit_on_fail
 If true, stop the solution if the adaptive stepper fails (default true) More...
 
astep_gsl< vec_t, vec_t, vec_t, func_t > gsl_astp
 The default adaptive stepper.
 
- Protected Member Functions inherited from o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >
virtual int print_iter (double x, size_t nv, vec_t &y)
 Print out iteration information.
 
void free ()
 Free allocated memory.
 
void allocate (size_t n)
 Allocate space for temporary vectors.
 
- Protected Attributes inherited from o2scl::ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t >
size_t mem_size
 Desc.
 
astep_base< vec_t, vec_t, vec_t, func_t > * astp
 The adaptive stepper.
 
vec_t vtemp
 
vec_t vtemp2
 
vec_t vtemp3
 
vec_t vtemp4
 

Detailed Description

template<class func_t = ode_funct<>, class vec_t = ubvector, class alloc_vec_t = ubvector, class alloc_t = ubvector_alloc>
class o2scl::ode_iv_table< func_t, vec_t, alloc_vec_t, alloc_t >

This class is experimental.

Idea for Future:
It would be nice not to have to copy the results from a matrix into a table, but this may require a nontrivial modification of the ODE solvers and/or the table class.
Idea for Future:
One possible idea is to redo the name specification as a separate function, which allows one to either specify prefixes or full column names. We also need to figure out how to handle column units.

Definition at line 54 of file ode_iv_table.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).