scikits.bvp_solver.get_template

Because the problem specification format for solving boundary value problems somewhat complex and arbitrary scikits.bvp_solver comes with a template generating function, get_template, that will generate a code skeleton for a problem that can be filled in by the user.

The easiest way to use get_template is to call it in a shell. For example in IPython:

In [1]: from scikits.bvp_solver import get_template

In [2]: print get_template(num_ODE = 3, num_parameters = 1, num_left_boundary_conditions = 1,
function_derivative = True, boundary_conditions_derivative = True, singular_term = True)

This prints a string containing code that can be copy-pasted into a script and then edited with appropriate formulas and variables. The code skeleton that these parameters generates can be seen here.

scikits.bvp_solver.get_template(num_ODE, num_parameters, num_left_boundary_conditions, function_derivative=False, boundary_conditions_derivative=False, singular_term=False, default_object='None', array_space=6)

Generates code for solving a boundary value problem using bvp_solver.

Dummy values (default is None) are used for the places where the user must fill in their own code.

Suggested use (in ipython or other console):

>> print (get_template(parameters))

and then copy-paste the result into your script.

Parameters:

num_ODE : int

Number of first order ordinary differential equations in the problem.

num_parameters : int

Number of unknown parameters in the problem.

num_left_boundary_conditions : int

Number of boundary conditions enforced on the left boundary.

function_derivative : logical

Indicates whether a function for the ODE derivatives will be supplied.

boundary_conditions_derivative : logical

Indicates whether a function for the boundary conditions derivatives will be supplied.

singular_term : logical

Indicates whether a singular term will be supplied.

default_object : string

Default string object to appear in arrays. Default is ‘None’; ‘0.0’ may also be convienient.

array_space : int

Number of spaces between elements in array definitions. More are recommended if terms in the arrays will be long.

Returns:

code : string

Python code skeleton for solving the boundary value problem.

Previous topic

scikits.bvp_solver.solve

This Page