File: MatCreateSubMatrices.html

package info (click to toggle)
petsc 3.10.3%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 209,064 kB
  • sloc: ansic: 587,333; python: 29,696; makefile: 12,445; fortran: 11,626; f90: 9,677; cpp: 8,768; sh: 1,027; xml: 621; objc: 445; csh: 194; java: 13
file content (93 lines) | stat: -rw-r--r-- 7,597 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
<!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/MatCreateSubMatrices.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatCreateSubMatrices</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.10.3 2018-12-18</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.10.3 v3.10.3 docs/manualpages/Mat/MatCreateSubMatrices.html "><small>Report Typos and Errors</small></a></div>
<A NAME="MatCreateSubMatrices"><H1>MatCreateSubMatrices</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" 
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../Mat/MatCreateSubMatrices.html#MatCreateSubMatrices">MatCreateSubMatrices</A>(<A HREF="../Mat/Mat.html#Mat">Mat</A> mat,<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> n,const <A HREF="../IS/IS.html#IS">IS</A> irow[],const <A HREF="../IS/IS.html#IS">IS</A> icol[],<A HREF="../Mat/MatReuse.html#MatReuse">MatReuse</A> scall,<A HREF="../Mat/Mat.html#Mat">Mat</A> *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 <A HREF="../Mat/MatReuse.html#MatReuse">MAT_INITIAL_MATRIX</A> or <A HREF="../Mat/MatReuse.html#MatReuse">MAT_REUSE_MATRIX</A>
</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/MatCreateSubMatrices.html#MatCreateSubMatrices">MatCreateSubMatrices</A>() can extract ONLY sequential submatrices
(from both sequential and parallel matrices). Use <A HREF="../Mat/MatCreateSubMatrix.html#MatCreateSubMatrix">MatCreateSubMatrix</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/MatDestroySubMatrices.html#MatDestroySubMatrices">MatDestroySubMatrices</A>().
<P>
<A HREF="../Mat/MatReuse.html#MatReuse">MAT_REUSE_MATRIX</A> can only be used when the nonzero structure of the
original matrix has not changed from that last call to <A HREF="../Mat/MatCreateSubMatrices.html#MatCreateSubMatrices">MatCreateSubMatrices</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 n+1.
<P>

<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../Mat/MatDestroySubMatrices.html#MatDestroySubMatrices">MatDestroySubMatrices</A>(), <A HREF="../Mat/MatCreateSubMatrix.html#MatCreateSubMatrix">MatCreateSubMatrix</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></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>advanced<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/mat/interface/matrix.c.html#MatCreateSubMatrices">src/mat/interface/matrix.c</A>
<P><H3><FONT COLOR="CC3333">Implementations</FONT></H3><A HREF="../../../src/mat/impls/adj/mpi/mpiadj.c.html#MatCreateSubMatrices_MPIAdj_Private">MatCreateSubMatrices_MPIAdj_Private in src/mat/impls/adj/mpi/mpiadj.c</A><BR>
<A HREF="../../../src/mat/impls/adj/mpi/mpiadj.c.html#MatCreateSubMatrices_MPIAdj">MatCreateSubMatrices_MPIAdj in src/mat/impls/adj/mpi/mpiadj.c</A><BR>
<A HREF="../../../src/mat/impls/aij/mpi/mpiov.c.html#MatCreateSubMatrices_MPIAIJ_SingleIS_Local">MatCreateSubMatrices_MPIAIJ_SingleIS_Local in src/mat/impls/aij/mpi/mpiov.c</A><BR>
<A HREF="../../../src/mat/impls/aij/mpi/mpiov.c.html#MatCreateSubMatrices_MPIAIJ_SingleIS">MatCreateSubMatrices_MPIAIJ_SingleIS in src/mat/impls/aij/mpi/mpiov.c</A><BR>
<A HREF="../../../src/mat/impls/aij/mpi/mpiov.c.html#MatCreateSubMatrices_MPIAIJ">MatCreateSubMatrices_MPIAIJ in src/mat/impls/aij/mpi/mpiov.c</A><BR>
<A HREF="../../../src/mat/impls/aij/mpi/mpiov.c.html#MatCreateSubMatrices_MPIAIJ_Local">MatCreateSubMatrices_MPIAIJ_Local in src/mat/impls/aij/mpi/mpiov.c</A><BR>
<A HREF="../../../src/mat/impls/aij/seq/aij.c.html#MatCreateSubMatrices_SeqAIJ">MatCreateSubMatrices_SeqAIJ in src/mat/impls/aij/seq/aij.c</A><BR>
<A HREF="../../../src/mat/impls/baij/mpi/baijov.c.html#MatCreateSubMatrices_MPIBAIJ">MatCreateSubMatrices_MPIBAIJ in src/mat/impls/baij/mpi/baijov.c</A><BR>
<A HREF="../../../src/mat/impls/baij/mpi/baijov.c.html#MatCreateSubMatrices_MPIBAIJ_local">MatCreateSubMatrices_MPIBAIJ_local in src/mat/impls/baij/mpi/baijov.c</A><BR>
<A HREF="../../../src/mat/impls/baij/seq/baij2.c.html#MatCreateSubMatrices_SeqBAIJ">MatCreateSubMatrices_SeqBAIJ in src/mat/impls/baij/seq/baij2.c</A><BR>
<A HREF="../../../src/mat/impls/dense/mpi/mmdense.c.html#MatCreateSubMatrices_MPIDense">MatCreateSubMatrices_MPIDense in src/mat/impls/dense/mpi/mmdense.c</A><BR>
<A HREF="../../../src/mat/impls/dense/mpi/mmdense.c.html#MatCreateSubMatrices_MPIDense_Local">MatCreateSubMatrices_MPIDense_Local in src/mat/impls/dense/mpi/mmdense.c</A><BR>
<A HREF="../../../src/mat/impls/dense/seq/dense.c.html#MatCreateSubMatrices_SeqDense">MatCreateSubMatrices_SeqDense in src/mat/impls/dense/seq/dense.c</A><BR>
<A HREF="../../../src/mat/impls/maij/maij.c.html#MatCreateSubMatrices_MAIJ">MatCreateSubMatrices_MAIJ in src/mat/impls/maij/maij.c</A><BR>
<A HREF="../../../src/mat/impls/sbaij/mpi/mpisbaij.c.html#MatCreateSubMatrices_MPISBAIJ">MatCreateSubMatrices_MPISBAIJ in src/mat/impls/sbaij/mpi/mpisbaij.c</A><BR>
<A HREF="../../../src/mat/impls/sbaij/seq/sbaij2.c.html#MatCreateSubMatrices_SeqSBAIJ">MatCreateSubMatrices_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaij2.c</A><BR>
<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>