<p>thank you for your reply. Randy.</p><p>Actually, I have read the manual. In the manual, it just demonstrate how to obtain this information from finite difference and finite element methods. However, if I only have a MPIAIJ matrix, how to obtain this information? one method is to use MatGetInfo() to my knolwedge, however, "info"'s structure is as follows:</p>
<p>476: typedef struct {<br>477: PetscLogDouble block_size; /* block size */<br>478: PetscLogDouble nz_allocated,nz_used,nz_unneeded; /* number of nonzeros */<br>479: PetscLogDouble memory; /* memory allocated */<br>
480: PetscLogDouble assemblies; /* number of matrix assemblies called */<br>481: PetscLogDouble mallocs; /* number of mallocs during MatSetValues() */<br>482: PetscLogDouble fill_ratio_given,fill_ratio_needed; /* fill ratio for LU/ILU */<br>
483: PetscLogDouble factor_mallocs; /* number of mallocs during factorization */<br>484: } MatInfo;<br></p><p>I am wondering what type PetscLogDouble is, double or int? </p><p>Regards,</p><p>Yujie <br>
</p><br><div class="gmail_quote">On Fri, Feb 13, 2009 at 9:37 AM, Randall Mackie <span dir="ltr"><<a href="mailto:rlmackie862@gmail.com">rlmackie862@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yujie,<br>
<br>
This is explained in the manual on page 59, under Preallocation of Memory<br>
for Parallel AIJ Sparse Matrices.<br>
<br>
Randy<div><div class="Wj3C7c"><br>
<br>
<br>
Yujie wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
In MatCreateMPIAIJ() function, it needs d_nz, d_nnz[], o_nz, o_nnz[]. If one has a MATAIJ matrix, how to obtian this information? thanks a lot.<br>
<br>
PetscErrorCode PETSCMAT_DLLEXPORT MatCreateMPIAIJ(MPI_Comm comm,PetscInt m,PetscInt n,PetscInt M,PetscInt N,PetscInt d_nz,const PetscInt d_nnz[],PetscInt o_nz,const PetscInt o_nnz[],Mat *A)<br>
<br>
Regards,<br>
<br>
Yujie<br>
<br>
</blockquote>
</div></div></blockquote></div><br>