/[ascend]/trunk/base/generic/solver/mtx_reorder.h
ViewVC logotype

Contents of /trunk/base/generic/solver/mtx_reorder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1013 - (show annotations) (download) (as text)
Wed Jan 3 03:41:35 2007 UTC (13 years, 6 months ago) by johnpye
File MIME type: text/x-chdr
File size: 3998 byte(s)
Added doxygen comments for linear routines in base/generic/solver.
Fixed up missing (still unimplemented) idalinear jacobian sjex.
1 /*
2 * mtx: Ascend Sparse Matrix Package
3 * by Benjamin Andrew Allan
4 * Derived from mtx by Karl Michael Westerberg
5 * Created: 5/3/90
6 * Version: $Revision: 1.4 $
7 * Version control file: $RCSfile: mtx_reorder.h,v $
8 * Date last modified: $Date: 1997/07/18 12:15:17 $
9 * Last modified by: $Author: mthomas $
10 *
11 * This file is part of the SLV solver.
12 *
13 * Copyright (C) 1996 Benjamin Andrew Allan
14 *
15 * The SLV solver is free software; you can redistribute
16 * it and/or modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of the
18 * License, or (at your option) any later version.
19 *
20 * The SLV solver is distributed in hope that it will be
21 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License along with
26 * the program; if not, write to the Free Software Foundation, Inc., 675
27 * Mass Ave, Cambridge, MA 02139 USA. Check the file named COPYING.
28 * COPYING is found in ../compiler.
29 */
30
31 /** @file
32 * mtx2: Ascend Sparse Matrix Package.
33 * <pre>
34 * requires: #include "utilities/ascConfig.h"
35 * requires: #include "mtx.h"
36 * </pre>
37 */
38
39 #ifndef __MTX_REORDER_H_SEEN__
40 #define __MTX_REORDER_H_SEEN__
41
42 /** @addtogroup linear @{ */
43
44 enum mtx_reorder_method {
45 mtx_UNKNOWN, /**< junk method */
46 mtx_SPK1, /**< Stadtherr's SPK1 reordering */
47 mtx_TSPK1, /**< transpose of Stadtherr's SPK1 reordering */
48 mtx_NATURAL /**< kinda pointless, don't you think? */
49 };
50
51 extern int mtx_reorder(mtx_matrix_t mtx,
52 mtx_region_t *region,
53 enum mtx_reorder_method rmeth);
54 /**<
55 *** <!-- mtx_reorder(sys,region,rmeth) -->
56 *** <!-- mtx_matrix_t mtx; -->
57 *** <!-- mtx_region_t *region; -->
58 *** <!-- enum mtx_reorder_method; -->
59 ***
60 *** The specified region of the coefficient matrix is reordered.
61 *** The specified region
62 *** is assumed to contain only nonempty rows and columns and have a full
63 *** diagonal.
64 *** If the matrix in is from a nonlinear system, the
65 *** pattern in the matrix should probably be the structural one (as
66 *** opposed to the numerically derived incidence which may be less.)<br><br>
67 ***
68 *** If you use the numerically derived incidence, you will need to reorder
69 *** before every factorization. This is generally not cost effective.
70 *** If region given is mtx_ENTIRE_MATRIX, a search will be done to find
71 *** an appropriate bounding region in the coefficient mtx. This is
72 *** not a particularly cheap search.<br><br>
73 ***
74 *** The reorder call should be done (once) at
75 *** the beginning of any series of linear solutions being performed on
76 *** on structurally identical matrices.<br><br>
77 ***
78 *** We HATE mtx_ENTIRE_MATRIX as the input region.<br><br>
79 ***
80 *** Brief notes on the reorderings available.
81 *** - SPK1:
82 *** - TSPK1: Both these operate only on a square region which is of.
83 *** full rank (in particular it should have a 0 free diagonal).
84 *** If you give us a bogus region, we will Try to make something
85 *** decent of it, but good results are improbable.
86 *** - Natural: Blesses the system and does nothing.
87 *** Again, the rows/cols not in the diagonal are dependent.
88 ***
89 *** On reordering in general: 'Optimal' reordering is an NP complete
90 *** task. Real reordering methods are heuristic and tend to break down
91 *** when the matrix being reordered is in some sense 'large' so that
92 *** the tie-breaking and other heuristics fail.<br><br>
93 ***
94 *** Return 0 if ok, 1 if bad input detected, 2 if unable to do.
95 **/
96
97 /** @} */
98
99 #endif /* __MTX_REORDER_H_SEEN__ */
100

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22