File: MatGetColoring.html

package info (click to toggle)
petsc 3.1.dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 131,360 kB
  • ctags: 491,710
  • sloc: ansic: 288,064; cpp: 66,909; python: 28,799; fortran: 19,153; makefile: 13,945; sh: 3,502; f90: 1,655; xml: 620; csh: 230; java: 13
file content (98 lines) | stat: -rw-r--r-- 3,718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatGetColoring</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="MatGetColoring"><H1>MatGetColoring</H1></A>
Gets a coloring for a matrix, from its sparsity structure, to reduce the number of function evaluations needed to compute a sparse Jacobian via differencing. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PetscErrorCode PETSCMAT_DLLEXPORT MatGetColoring(Mat mat,const MatColoringType type,ISColoring *iscoloring)
</PRE>
Collective on <A HREF="../Mat/Mat.html#Mat">Mat</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<DT><B>mat </B> -the matrix
<br>
<DT><B>type </B> -type of coloring, one of the following:
<br>
<pre>
     MATCOLORING_NATURAL - natural (one color for each column, very slow)
</pre>
<pre>
     MATCOLORING_SL - smallest-last
</pre>
<pre>
     MATCOLORING_LF - largest-first
</pre>
<pre>
     MATCOLORING_ID - incidence-degree
</pre>
<P>
<H3><FONT COLOR="#CC3333">Output Parameters</FONT></H3>
<DT><B>iscoloring </B> -the coloring
<br>
<P>
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
To specify the coloring through the options database, use one of
the following
<pre>
   -mat_coloring_type natural, -mat_coloring_type sl, -mat_coloring_type lf,
</pre>
<pre>
   -mat_coloring_type id
</pre>
To see the coloring use
<pre>
   -mat_coloring_view
</pre>
<P>

<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
These compute the graph coloring of the graph of A^{T}A. The coloring used
for efficient (parallel or thread based) triangular solves etc is NOT yet
available.
<P>
The user can define additional colorings; see <A HREF="../Mat/MatColoringRegisterDynamic.html#MatColoringRegisterDynamic">MatColoringRegisterDynamic</A>().
<P>
For parallel matrices currently converts to sequential matrix and uses the sequential coloring
on that.
<P>
The colorings SL, LF, and ID are obtained via the Minpack software that was
converted to C using f2c.
<P>
For BAIJ matrices this colors the blocks. The true number of colors would be block size times the number of colors
returned here.
<P>
<H3><FONT COLOR="#CC3333">References</FONT></H3>
<pre>
    Thomas F. Coleman and Jorge J. More, Estimation of Sparse {J}acobian Matrices and Graph Coloring Problems,
</pre>
<pre>
        SIAM Journal on Numerical Analysis, 1983, pages 187-209, volume 20
</pre>
<pre>
    Jorge J. Mor\'{e} and Danny C. Sorenson and  Burton S. Garbow and Kenneth E. Hillstrom, The {MINPACK} Project,
</pre>
<pre>
        Sources and Development of Mathematical Software, Wayne R. Cowell editor, 1984, pages 88-111
</pre>
<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 matrix, get, coloring
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
  MatGetColoringTypeFromOptions(), <A HREF="../Mat/MatColoringRegisterDynamic.html#MatColoringRegisterDynamic">MatColoringRegisterDynamic</A>(), <A HREF="../MatFD/MatFDColoringCreate.html#MatFDColoringCreate">MatFDColoringCreate</A>(),
<BR><A HREF="../SNES/SNESDefaultComputeJacobianColor.html#SNESDefaultComputeJacobianColor">SNESDefaultComputeJacobianColor</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/color/color.c.html#MatGetColoring">src/mat/color/color.c</A>
<BR><A HREF="./index.html">Index of all MatOrderings routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/snes/examples/tutorials/ex45.c.html">src/snes/examples/tutorials/ex45.c.html</A><BR>
</BODY></HTML>