scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
construct_global_jac(n, m, k, i_jac, j_jac, h, df_dy, df_dy_middle, df_dp, df_dp_middle, dbc_dya, dbc_dyb, dbc_dp)

There are n * m + k functions: m - 1 collocations residuals, each containing n components, followed by n + k boundary condition residuals.

There are n * m + k variables: m vectors of y, each containing n components, followed by k values of vector p.

For example, let m = 4, n = 2 and k = 1, then the Jacobian will have the following sparsity structure:

1 1 2 2 0 0 0 0 5 1 1 2 2 0 0 0 0 5 0 0 1 1 2 2 0 0 5 0 0 1 1 2 2 0 0 5 0 0 0 0 1 1 2 2 5 0 0 0 0 1 1 2 2 5

3 3 0 0 0 0 4 4 6 3 3 0 0 0 0 4 4 6 3 3 0 0 0 0 4 4 6

Zeros denote identically zero values, other values denote different kinds of blocks in the matrix (see below). The blank row indicates the separation of collocation residuals from boundary conditions. And the blank column indicates the separation of y values from p values.

Refer to (p. 306) for the formula of n x n blocks for derivatives of collocation residuals with respect to y.

Parameters

n : int

Number of equations in the ODE system.

m : int

Number of nodes in the mesh.

k : int

Number of the unknown parameters.

i_jac, j_jac : ndarray

Row and column indices returned by compute_jac_indices . They represent different blocks in the Jacobian matrix in the following order (see the scheme above):

df_dy : ndarray, shape (n, n, m)

Jacobian of f with respect to y computed at the mesh nodes.

df_dy_middle : ndarray, shape (n, n, m - 1)

Jacobian of f with respect to y computed at the middle between the mesh nodes.

df_dp : ndarray with shape (n, k, m) or None

Jacobian of f with respect to p computed at the mesh nodes.

df_dp_middle: ndarray with shape (n, k, m - 1) or None :

Jacobian of f with respect to p computed at the middle between the mesh nodes.

dbc_dya, dbc_dyb : ndarray, shape (n, n)

Jacobian of bc with respect to ya and yb.

dbc_dp: ndarray with shape (n, k) or None :

Jacobian of bc with respect to p.

Returns

J : csc_matrix, shape (n * m + k, n * m + k)

Jacobian of the collocation system in a sparse form.

Construct the Jacobian of the collocation system.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.integrate._bvp.compute_jac_indices

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/integrate/_bvp.py#158
type: <class 'function'>
Commit: