ode_it_solve Class Template Reference

ODE solver using a generic linear solver to solve finite-difference equations. More...

#include <ode_it_solve.h>


Detailed Description

template<class func_t, class vec_t, class mat_t, class matrix_row_t, class solver_vec_t, class solver_mat_t>
class ode_it_solve< func_t, vec_t, mat_t, matrix_row_t, solver_vec_t, solver_mat_t >

ODE solver using a generic linear solver to solve finite-difference equations.

Todo:
Implement as a child of ode_bv_solve ?
Todo:
Max and average tolerance?
Todo:
partial correction option?

Definition at line 125 of file ode_it_solve.h.


Public Member Functions

int set_solver (o2scl_linalg::linear_solver< solver_vec_t, solver_mat_t > &ls)
 Set the linear solver.
int solve (size_t ngrid, size_t neq, size_t nbleft, vec_t &x, mat_t &y, func_t &derivs, func_t &left, func_t &right, solver_mat_t &mat, solver_vec_t &rhs, solver_vec_t &dy)
 Solve derivs with boundary conditions left and right.

Data Fields

int verbose
 Set level of output (default 0).
double h
 Stepsize for finite differencing (default $ 10^{-4} $).
double tolf
 Tolerance (default $ 10^{-8} $).
size_t niter
 Maximum number of iterations (default 30).

Protected Member Functions

double fd_left (size_t ieq, size_t ivar, double x, vec_t &y)
 Compute the derivatives of the LHS boundary conditions.
double fd_right (size_t ieq, size_t ivar, double x, vec_t &y)
 Compute the derivatives of the RHS boundary conditions.
double fd_derivs (size_t ieq, size_t ivar, double x, vec_t &y)
 Compute the finite-differenced part of the differential equations.

Protected Attributes

o2scl_linalg::linear_solver
< solver_vec_t, solver_mat_t > * 
solver
 Solver.
Storage for functions
ode_it_funct< vec_t > * fl
ode_it_funct< vec_t > * fr
ode_it_funct< vec_t > * fd

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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page