Compute banded-storage dimensions for the Newton-step Jacobian.
n_dof = neq * n_pt. The Jacobian is banded with kl = ku = neq*coupling_radius because resid(i) depends on ub(j) only when |i_cell - j_cell| <= coupling_radius.
LAPACK dgbsv needs kl extra pivot rows: ldab = 2*kl+ku+1, diag_row = kl+ku+1. Built-in solver uses compact storage: ldab = kl+ku+1, diag_row = ku+1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(solver_state_t), | intent(in) | :: | state |
Solver state (reads n_pt and cfg%lapack_solver). |
||
| integer, | intent(out) | :: | n_dof |
Total degrees of freedom (neq * n_pt) |
||
| integer, | intent(out) | :: | kl |
Total degrees of freedom (neq * n_pt) Lower bandwidth |
||
| integer, | intent(out) | :: | ku |
Total degrees of freedom (neq * n_pt) Lower bandwidth Upper bandwidth |
||
| integer, | intent(out) | :: | ldab |
Total degrees of freedom (neq * n_pt) Lower bandwidth Upper bandwidth Leading dimension of band matrix |
||
| integer, | intent(out) | :: | diag_row |
Total degrees of freedom (neq * n_pt) Lower bandwidth Upper bandwidth Leading dimension of band matrix Band-storage row that holds the diagonal |