[petsc-dev] DMCreateMatrix_Moab vs. DMCreateMatrix

Tim Tautges tautges at mcs.anl.gov
Tue Mar 5 10:03:03 CST 2013


Hi all,
   In a previous pull request, Jed suggested "Unless you have grand plans for matrices "in MOAB", you should avoid 
masquerading as a matrix format and just implement DMCreateMatrix_MOAB (preferring a BAIJ matrix, it seems)."  But, in 
the documentation for many specific matrix types (I checked BAIJ and AIJ), it says "For good matrix assembly performance 
the user should preallocate the matrix storage by setting the parameters d_nz (or d_nnz) and o_nz (or o_nnz). By setting 
these parameters accurately, performance can be increased by more than a factor of 50."  So if a matrix can be created 
DMCreateMatrix (which passes just the dm and a Mat*), how does one efficiently create this matrix generically without 
calling the type-specific function?  Do you set options for nz and nnz, or are there MatSet-type functions for setting 
these?

- tim

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
  phone (gvoice): (608) 354-1459      1500 Engineering Dr.
             fax: (608) 263-4499      Madison, WI 53706




More information about the petsc-dev mailing list