Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
ode_bv_shoot< func_t, vec_t, alloc_vec_t, alloc_t, vec_int_t > Class Template Reference

Solve boundary-value ODE problems by shooting from one boundary to the other. More...

#include <ode_bv_solve.h>

Inheritance diagram for ode_bv_shoot< func_t, vec_t, alloc_vec_t, alloc_t, vec_int_t >:
ode_bv_solve ode_bv_shoot_grid< mat_t, mat_row_t, func_t, vec_t, alloc_vec_t, alloc_t, vec_int_t >

Detailed Description

template<class func_t = ode_funct<>, class vec_t = ovector_base, class alloc_vec_t = ovector, class alloc_t = ovector_alloc, class vec_int_t = ovector_int_base>
class ode_bv_shoot< func_t, vec_t, alloc_vec_t, alloc_t, vec_int_t >

This class is experimental.

Default template arguments

Definition at line 82 of file ode_bv_solve.h.

Public Member Functions

void allocate (size_t n)
 Allocate internal storage.
int solve_final_value (double x0, double x1, double h, size_t n, vec_t &ystart, vec_t &yend, vec_int_t &index, vec_t &yerr, vec_t &dydx_end, func_t &derivs)
 Solve the boundary-value problem and store the solution.
template<class mat_t , class mat_row_t >
int solve_store (double x0, double x1, double h, size_t n, vec_t &ystart, vec_t &yend, vec_int_t &index, size_t &n_sol, vec_t &x_sol, mat_t &y_sol, mat_t &yerr_sol, mat_t &dydx_sol, func_t &derivs)
 Solve the boundary-value problem and store the solution.
int set_iv (ode_iv_solve< func_t, vec_t, alloc_vec_t, alloc_t > &ois)
 Set initial value solver.
int set_mroot (mroot< mm_funct<> > &root)
 Set the equation solver.

Data Fields

ode_iv_solve< func_t, vec_t,
alloc_vec_t, alloc_t > 
def_ois
 The default initial value solver.
gsl_mroot_hybrids< mm_funct<> > def_mroot
 The default equation solver.

Protected Member Functions

int solve_fun (size_t nv, const vec_t &tx, vec_t &ty)
 The shooting function to be solved by the multidimensional solver.

Protected Attributes

ode_iv_solve< func_t, vec_t,
alloc_vec_t, alloc_t > * 
oisp
 The solver for the initial value problem.
mroot< mm_funct<> > * mrootp
 The equation solver.
vec_int_t * l_index
 The index defining the boundary conditions.
vec_t * l_ystart
 Storage for the starting vector.
vec_t * l_yend
 Storage for the ending vector.
vec_t * l_yerr
 Storage for the starting vector.
vec_t * l_dydx_end
 Storage for the ending vector.
double l_x0
 Storage for the starting point.
double l_x1
 Storage for the ending abcissa.
double l_h
 Storage for the stepsize.
func_t * l_derivs
 The functions to integrate.
size_t l_n
 The number of functions.
alloc_t ao
 Vector allocation object.
size_t mem_size
 Size of recent allocation.
Temporary storage for \ref solve_fun()
alloc_vec_t sy
alloc_vec_t sy2
alloc_vec_t syerr
alloc_vec_t sdydx

Member Function Documentation

template<class func_t = ode_funct<>, class vec_t = ovector_base, class alloc_vec_t = ovector, class alloc_t = ovector_alloc, class vec_int_t = ovector_int_base>
int ode_bv_shoot< func_t, vec_t, alloc_vec_t, alloc_t, vec_int_t >::solve_final_value ( double  x0,
double  x1,
double  h,
size_t  n,
vec_t &  ystart,
vec_t &  yend,
vec_int_t &  index,
vec_t &  yerr,
vec_t &  dydx_end,
func_t &  derivs 
) [inline]

Given the n initial values of the functions in ystart, this function integrates the ODEs specified in derivs over the interval from x0 to x1 with an initial stepsize of h. The final values of the function are given in yend, the derivatives in dydx_end, and the associated errors are given in yerr. The initial values of yend and yerr are ignored.

Definition at line 126 of file ode_bv_solve.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.