Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Solve.h File Reference

Go to the source code of this file.


Functions

TMReal SolveOverRelax (const TMat &A, TVec &x, const TVec &b, TMReal epsilon, TMReal omega = 1.0, Int *steps = 0)
Solves Ax = b via gaussian elimination. More...

TMReal SolveOverRelax (const TSparseMat &A, TVec &x, const TVec &b, TMReal epsilon, TMReal omega = 1.0, Int *steps = 0)
Solves Ax = b via gaussian elimination for a sparse matrix. More...

TMReal SolveConjGrad (const TMat &A, TVec &x, const TVec &b, TMReal epsilon, Int *steps = 0)
Solve Ax = b by conjugate gradient method, for symmetric, positive definite A. More...

TMReal SolveConjGrad (const TSparseMat &A, TVec &x, const TVec &b, TMReal epsilon, Int *steps = 0)
Solves Ax = b via conjugate gradient for a sparse matrix. More...


Function Documentation

TMReal SolveConjGrad (const TSparseMat & A, TVec & x, const TVec & b, TMReal epsilon, Int * steps = 0)

Solves Ax = b via conjugate gradient for a sparse matrix.

See the dense version above for details.

Definition at line 230 of file Solve.cc.

TMReal SolveConjGrad (const TMat & A, TVec & x, const TVec & b, TMReal epsilon, Int * steps = 0)

Solve Ax = b by conjugate gradient method, for symmetric, positive definite A.

x is the initial guess on input, and solution vector on output.

Returns squared length of residual vector.

If A is not symmetric, this will solve the system (A + At)x/2 = b

[Strang, "Introduction to Applied Mathematics", 1986, p. 422]

Definition at line 159 of file Solve.cc.

TMReal SolveOverRelax (const TSparseMat & A, TVec & x, const TVec & b, TMReal epsilon, TMReal omega = 1.0, Int * steps = 0)

Solves Ax = b via gaussian elimination for a sparse matrix.

See the dense version above for details.

Definition at line 91 of file Solve.cc.

TMReal SolveOverRelax (const TMat & A, TVec & x, const TVec & b, TMReal epsilon, TMReal omega = 1.0, Int * steps = 0)

Solves Ax = b via gaussian elimination.

Each iteration modifies the current approximate solution x. Omega controls overrelaxation: omega = 1 gives Gauss-Seidel, omega somewhere beteen 1 and 2 gives the fastest convergence.

x is the initial guess on input, and solution vector on output.

If steps is zero, the routine iterates until the residual is less than epsilon. Otherwise, it performs at most *steps iterations, and returns the actual number of iterations performed in *steps.

Returns approximate squared length of residual vector: |Ax-b|^2.

[Strang, "Introduction to Applied Mathematics", 1986, p. 407]

Definition at line 35 of file Solve.cc.


Generated at Sat Aug 5 00:16:47 2000 for Class Library by doxygen 1.1.0 written by Dimitri van Heesch, © 1997-2000