File: MatGetSubMatrices.html

package info (click to toggle)
petsc 3.7.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 163,864 kB
  • ctags: 618,438
  • sloc: ansic: 515,133; python: 29,793; makefile: 20,458; fortran: 18,998; cpp: 6,515; f90: 3,914; sh: 1,012; xml: 621; objc: 445; csh: 240; java: 13
file content (76 lines) | stat: -rw-r--r-- 4,401 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetSubMatrices.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatGetSubMatrices</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
   <div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/Mat/MatGetSubMatrices.html "><small>Report Typos and Errors</small></a></div>
<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" 
PetscErrorCode MatGetSubMatrices(Mat mat,PetscInt 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>
Some matrix types place restrictions on the row and column
indices, such as that they be sorted or that they be equal to each other.
<P>
The index sets may not have duplicate entries.
<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>
For BAIJ matrices the index sets must respect the block structure, that is if they
request one row/column in a block, they must request all rows/columns that are in
that block. For example, if the block size is 2 you cannot request just row 0 and
column 0.
<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 size 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>(), <A HREF="../Mat/MatReuse.html#MatReuse">MatReuse</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>