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
|
<!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/MatCheckCompressedRow.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatCheckCompressedRow</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/MatCheckCompressedRow.html "><small>Report Typos and Errors</small></a></div>
<A NAME="MatCheckCompressedRow"><H1>MatCheckCompressedRow</H1></A>
Determines whether the compressed row matrix format should be used. If the format is to be used, this routine creates Mat_CompressedRow struct. Compressed row format provides high performance routines by taking advantage of zero rows. Supported types are <A HREF="../Mat/MATAIJ.html#MATAIJ">MATAIJ</A>, <A HREF="../Mat/MATBAIJ.html#MATBAIJ">MATBAIJ</A> and <A HREF="../Mat/MATSBAIJ.html#MATSBAIJ">MATSBAIJ</A>.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscmat.h"
PETSC_EXTERN PetscErrorCode MatCheckCompressedRow(Mat A,PetscInt nrows,Mat_CompressedRow *compressedrow,PetscInt *ai,PetscInt mbs,PetscReal ratio)
</PRE>
Collective
<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>A </B></TD><TD>- the matrix
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>nrows </B></TD><TD>- number of rows with nonzero entries
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>compressedrow </B></TD><TD>- pointer to the struct Mat_CompressedRow
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ai </B></TD><TD>- row pointer used by seqaij and seqbaij
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mbs </B></TD><TD>- number of (block) rows represented by ai
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ratio </B></TD><TD>- ratio of (num of zero rows)/m, used to determine if the compressed row format should be used
</TD></TR></TABLE>
<P>
Notes: By default PETSc will not check for compressed rows on sequential matrices. Call <A HREF="../Mat/MatSetOption.html#MatSetOption">MatSetOption</A>(<A HREF="../Mat/Mat.html#Mat">Mat</A>,MAT_CHECK_COMPRESSED_ROW,<A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A>); before
<A HREF="../Mat/MatAssemblyBegin.html#MatAssemblyBegin">MatAssemblyBegin</A>() to have it check.
<P>
Developer Note: The reason this takes the compressedrow, ai and mbs arguments is because it is called by both the SeqAIJ and SEQBAIJ matrices and
the values are not therefore obtained by directly taking the values from the matrix object.
This is not a general public routine and hence is not listed in petscmat.h (it exposes a private data structure) but it is used
by some preconditioners and hence is labeled as PETSC_EXTERN
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>developer
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/utils/compressedrow.c.html#MatCheckCompressedRow">src/mat/utils/compressedrow.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>
|