On Thu, 10 Mar 2011, Tim Kroeger wrote: > I would like to implement a method, e.g. called > SparseMatrix::print_sparse(), which works the same way as > SparseMatrix::print() does, but does not print all the 0 entries. It > would e.g. rather print one entry per line in the format > > row column value > > Any objections or thoughts?
Looks like the Matlab sparse matrix format (or at least the representation of it they show to users) - lousy for efficiency but perfect for interoperability. This would be great, thanks! I personally like the print_sparse idea slightly more than John's additional flag idea, but he seems to have a stronger preference the other way so go with that. One question about formatting: do we omit or print entries which are present in the sparsity pattern but have exactly-zero coefficients? I'd lean toward "omit" but could make an argument either way. Nice gotcha (and ugly-but-probably-optimal workaround) you found on the parallel ofstream issue. I usually just print to cout and redirect to file for debugging, so never noticed this before. Not sure how to make your solution any prettier without introducing a new ostream subclass. --- Roy ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
