File: MatGetSubMatrices.html

package info (click to toggle)
petsc 2.2.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 64,404 kB
  • ctags: 284,528
  • sloc: ansic: 223,999; python: 11,758; makefile: 7,707; fortran: 6,327; cpp: 4,104; sh: 3,387; csh: 41; asm: 6
file content (64 lines) | stat: -rw-r--r-- 3,440 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatGetSubMatrices</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="MatGetSubMatrices"><H1>MatGetSubMatrices</H1></A>
Extracts several submatrices from a matrix. If submat points to an array of valid matrices, they may be reused to store the new submatrices. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscmat.h" 
int MatGetSubMatrices(Mat mat,int n,const IS irow[],const IS icol[],MatReuse scall,Mat *submat[])
</PRE>
Collective on <A HREF="../Mat/Mat.html#Mat">Mat</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD>- the matrix
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n   </B></TD><TD>- the number of submatrixes to be extracted (on this processor, may be zero)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>irow, icol </B></TD><TD>- index sets of rows and columns to extract
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>scall </B></TD><TD>- either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>submat </B> -the array of submatrices
<br>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<A HREF="../Mat/MatGetSubMatrices.html#MatGetSubMatrices">MatGetSubMatrices</A>() can extract only sequential submatrices
(from both sequential and parallel matrices). Use <A HREF="../Mat/MatGetSubMatrix.html#MatGetSubMatrix">MatGetSubMatrix</A>()
to extract a parallel submatrix.
<P>
When extracting submatrices from a parallel matrix, each processor can
form a different submatrix by setting the rows and columns of its
individual index sets according to the local submatrix desired.
<P>
When finished using the submatrices, the user should destroy
them with <A HREF="../Mat/MatDestroyMatrices.html#MatDestroyMatrices">MatDestroyMatrices</A>().
<P>
MAT_REUSE_MATRIX can only be used when the nonzero structure of the
original matrix has not changed from that last call to <A HREF="../Mat/MatGetSubMatrices.html#MatGetSubMatrices">MatGetSubMatrices</A>().
<P>
This routine creates the matrices in submat; you should NOT create them before
calling it. It also allocates the array of matrix pointers submat.
<P>
<H3><FONT COLOR="#CC3333">Fortran Note</FONT></H3>
The Fortran interface is slightly different from that given below; it
requires one to pass in  as submat a <A HREF="../Mat/Mat.html#Mat">Mat</A> (integer) array of <A HREF="../Sys/size.html#size">size</A> at least m.
<P>

<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../Mat/MatDestroyMatrices.html#MatDestroyMatrices">MatDestroyMatrices</A>(), <A HREF="../Mat/MatGetSubMatrix.html#MatGetSubMatrix">MatGetSubMatrix</A>(), <A HREF="../Mat/MatGetRow.html#MatGetRow">MatGetRow</A>(), <A HREF="../Mat/MatGetDiagonal.html#MatGetDiagonal">MatGetDiagonal</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/interface/matrix.c.html#MatGetSubMatrices">src/mat/interface/matrix.c</A>
<BR><A HREF="./index.html">Index of all Mat 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>
</BODY></HTML>