00001 /*
00002 File: Solve.h
00003
00004 Function: Contains routines for solving a system of linear equations.
00005 Includes the overrelaxation (a more general version of
00006 Gauss Seidel) and conjugate gradient methods, for both
00007 normal and sparse matrices.
00008
00009 Author(s): Andrew Willmott
00010
00011 Copyright: (c) 1995-2000, Andrew Willmott
00012 */
00013
00014 #ifndef __Solve__
00015 #define __Solve__
00016
00017 TMReal SolveOverRelax(const TMat &A, TVec &x, const TVec &b,
00018 TMReal epsilon, TMReal omega = 1.0, Int *steps = 0);
00019 TMReal SolveOverRelax(const TSparseMat &A, TVec &x, const TVec &b,
00020 TMReal epsilon, TMReal omega = 1.0, Int *steps = 0);
00021
00022 TMReal SolveConjGrad(const TMat &A, TVec &x, const TVec &b,
00023 TMReal epsilon, Int *steps = 0);
00024 TMReal SolveConjGrad(const TSparseMat &A, TVec &x, const TVec &b,
00025 TMReal epsilon, Int *steps = 0);
00026
00027 #endif