| pde_matrix_solve | R Documentation |
Solve the linear system A x = rhs arising from one implicit
finite-difference timestep, where A is the matrix assembled by
construct_tridiagonals and b is the vector of
price space-grid values from the previously calculated timestep (which
corresponds to one step further in our future).
pde_matrix_solve(tridiag_matrix_entries, rhs, method = "auto")
tridiag_matrix_entries |
Diagonal, superdiagonal and subdiagonal
of the matrix from the numerical integrator, as a list with elements
|
rhs |
A vector forming the right-hand side of the linear system, typically the space grid values from the previously calculated timestep |
method |
Character string selecting the linear-system solver. One of
|
By default (method='auto') the solver prefers
limSolve::Solve.tridiag(), which calls LAPACK DGTSV Gaussian
elimination with partial pivoting, then falls back to a sparse banded
solve from the Matrix package, and finally to a pure-R Thomas
algorithm that requires no additional packages. Passing an explicit
method forces that solver; forcing 'lapack' or
'banded' requires the corresponding package to be installed.
The solution vector x of the linear system
Other Implicit Grid Solver:
construct_implicit_grid_structure(),
find_present_value(),
form_present_value_grid(),
infer_conforming_time_grid(),
integrate_pde(),
iterate_grid_from_timestep(),
take_implicit_timestep(),
timestep_instruments()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.