File: MatMPIBDiagSetPreallocation.html

package info (click to toggle)
petsc 2.3.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 77,732 kB
  • ctags: 314,526
  • sloc: ansic: 254,277; python: 26,350; cpp: 18,257; fortran: 15,694; makefile: 11,000; sh: 3,638; xml: 620; csh: 211
file content (75 lines) | stat: -rw-r--r-- 3,677 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatMPIBDiagSetPreallocation</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="MatMPIBDiagSetPreallocation"><H1>MatMPIBDiagSetPreallocation</H1></A>
Collective on <A HREF="../Mat/Mat.html#Mat">Mat</A> 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PetscErrorCode PETSCMAT_DLLEXPORT MatMPIBDiagSetPreallocation(Mat B,PetscInt nd,PetscInt bs,const PetscInt diag[],PetscScalar *diagv[])
</PRE>
<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>A </B></TD><TD>- the matrix 
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nd </B></TD><TD>- number of block diagonals (global) (optional)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>bs </B></TD><TD>- each element of a diagonal is an bs x bs dense matrix
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>diag </B></TD><TD>- optional array of block diagonal numbers (length nd).
For a matrix element A[i,j], where i=row and j=column, the
diagonal number is
</TD></TR>
<pre>
    diag = i/bs - j/bs  (integer division)
</pre>
Set diag=<A HREF="../Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</A> on input for PETSc to dynamically allocate memory as
needed (expensive).
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>diagv  </B></TD><TD>- pointer to actual diagonals (in same order as diag array), 
if allocated by user. Otherwise, set diagv=<A HREF="../Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</A> on input for PETSc
to control memory allocation.
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
<DT><B>-mat_block_size &lt;bs&gt; </B> -Sets blocksize
<br>
<DT><B>-mat_bdiag_diags &lt;s1,s2,s3,...&gt; </B> -Sets diagonal numbers
<br>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
If <A HREF="../Sys/PETSC_DECIDE.html#PETSC_DECIDE">PETSC_DECIDE</A> or  <A HREF="../Sys/PETSC_DETERMINE.html#PETSC_DETERMINE">PETSC_DETERMINE</A> is used for a particular argument on one processor
than it must be used on all processors that share the object for that argument.
<P>
The parallel matrix is partitioned across the processors by rows, where
each local rectangular matrix is stored in the uniprocessor block
diagonal format.  See the users manual for further details.
<P>
The user MUST specify either the local or global numbers of rows
(possibly both).
<P>
The case bs=1 (conventional diagonal storage) is implemented as
a special case.
<P>
<H3><FONT COLOR="#CC3333">Fortran Notes</FONT></H3>
Fortran programmers cannot set diagv; this variable is ignored.
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 matrix, block, diagonal, parallel, sparse
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../Mat/MatCreate.html#MatCreate">MatCreate</A>(), <A HREF="../Mat/MatCreateSeqBDiag.html#MatCreateSeqBDiag">MatCreateSeqBDiag</A>(), <A HREF="../Mat/MatSetValues.html#MatSetValues">MatSetValues</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/impls/bdiag/mpi/mpibdiag.c.html#MatMPIBDiagSetPreallocation">src/mat/impls/bdiag/mpi/mpibdiag.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/ksp/ksp/examples/tutorials/ex4.c.html">src/ksp/ksp/examples/tutorials/ex4.c.html</A><BR>
</BODY></HTML>