Trisol: Trisol

Description Usage Arguments Details Value Author(s) Examples

View source: R/trisol.R

Description

Solves tri-diagonal matrix equations.

Usage

1
Trisol(a, b, c, d)

Arguments

a

Lower diagonal term [Z], Note: a[,0] is zero

b

Center diagonal term [Z]

c

Upper diagonal term [Z], Note: c[.Z-1] is zero

d

Right-hand side (on input) / solution (on output) [Z]

Details

Solves matrix with Thomas algorithm, Z discretizations with depth.

Value

Solution vector result. In case of heat conduction this is the temperature for the new time step.

Author(s)

Stephan Gruber <stephan.gruber@carleton.ca>

Examples

1
2
3
4
5
a <- c(0, 1, 1, 1)
b <- c(2, 2, 2, 2)
c <- c(1, 1, 1, 0)
d <- c(1, 1, 1, 1)
d <- Trisol(a, b, c, d)

geocryology/PermafrostTools documentation built on Dec. 20, 2021, 10:40 a.m.