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
|
<!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/MatGetOwnershipRange.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatGetOwnershipRange</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/MatGetOwnershipRange.html "><small>Report Typos and Errors</small></a></div>
<A NAME="MatGetOwnershipRange"><H1>MatGetOwnershipRange</H1></A>
Returns the range of matrix rows owned by this processor, assuming that the matrix is laid out with the first n1 rows on the first processor, the next n2 rows on the second, etc. For certain parallel layouts this range may not be well defined.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscmat.h"
PetscErrorCode MatGetOwnershipRange(Mat mat,PetscInt *m,PetscInt *n)
</PRE>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<DT><B>mat </B> -the matrix
<br>
<P>
<H3><FONT COLOR="#CC3333">Output Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>m </B></TD><TD>- the global index of the first local row
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n </B></TD><TD>- one more than the global index of the last local row
</TD></TR></TABLE>
<P>
Note: Both output parameters can be NULL on input.
<pre>
This function requires that the matrix be preallocated. If you have not preallocated, consider using
</pre>
<pre>
<A HREF="../Sys/PetscSplitOwnership.html#PetscSplitOwnership">PetscSplitOwnership</A>(<A HREF="../Sys/MPI_Comm.html#MPI_Comm">MPI_Comm</A> comm, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *n, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> *N)
</pre>
<pre>
and then MPI_Scan() to calculate prefix sums of the local sizes.
</pre>
<P>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Mat/MatGetOwnershipRanges.html#MatGetOwnershipRanges">MatGetOwnershipRanges</A>(), <A HREF="../Mat/MatGetOwnershipRangeColumn.html#MatGetOwnershipRangeColumn">MatGetOwnershipRangeColumn</A>(), <A HREF="../Mat/MatGetOwnershipRangesColumn.html#MatGetOwnershipRangesColumn">MatGetOwnershipRangesColumn</A>(), <A HREF="../Sys/PetscSplitOwnership.html#PetscSplitOwnership">PetscSplitOwnership</A>(), <A HREF="../Sys/PetscSplitOwnershipBlock.html#PetscSplitOwnershipBlock">PetscSplitOwnershipBlock</A>()
<BR>
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/interface/matrix.c.html#MatGetOwnershipRange">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>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/mat/examples/tutorials/ex15.c.html">src/mat/examples/tutorials/ex15.c.html</A><BR>
<A HREF="../../../src/mat/examples/tutorials/ex16.c.html">src/mat/examples/tutorials/ex16.c.html</A><BR>
<A HREF="../../../src/mat/examples/tutorials/ex17.c.html">src/mat/examples/tutorials/ex17.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex2.c.html">src/ksp/ksp/examples/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex5.c.html">src/ksp/ksp/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex6.c.html">src/ksp/ksp/examples/tutorials/ex6.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex7.c.html">src/ksp/ksp/examples/tutorials/ex7.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex8.c.html">src/ksp/ksp/examples/tutorials/ex8.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex9.c.html">src/ksp/ksp/examples/tutorials/ex9.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex11.c.html">src/ksp/ksp/examples/tutorials/ex11.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex12.c.html">src/ksp/ksp/examples/tutorials/ex12.c.html</A><BR>
</BODY></HTML>
|