pcgtt: Preconditioned Conjugate Gradient for Two-level Toeplitz...

View source: R/adi.R

pcgttR Documentation

Preconditioned Conjugate Gradient for Two-level Toeplitz Left-hand Side

Description

Solves the second ADI equation, i.e. a linear system with two-level Toeplitz left-hand side.

Usage

pcgtt(M, b, init, eigvals_prec, tol = 1e-07)

Arguments

M

symbol of the circulant embedding of a two-level Toeplitz matrix, generated from the symbol the two-level Toeplitz matrix by to_book_format()

b

right-hand side vector

init

initial guess for solution

eigvals_prec

eigenvalues of the circulant preconditioner generated by calc_prec()

tol

relative tolerance - stopping criterion

Value

the solution as a vector

Examples

eigvals <- matrix(9:1,3)
x <- stats::runif(9)
M <- to_book_format(eigvals,3,3)
eigvals_prec <- calc_prec(M)
pcgtt(M, x, runif(9), eigvals_prec)

TMasak/surfcov documentation built on April 25, 2022, 12:15 a.m.