On Tue, Mar 5, 2013 at 11:03 AM, Tim Tautges <tautges at mcs.anl.gov> wrote:
> 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? The DM is supposed to know both the topology and data layout, which allows you to calculate the sparsity. Matt > > - 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 > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130305/d527404d/attachment.html>
