<h3>Specific improvements</h3>
<ol>
-<li> New: The PETScWrappers::MPI::Vector::print function overloads the
+<li> New: The PETScWrappers::MatrixBase::write_ascii() now takes a
+(defaulted) argument allowing to select the PETSc Viewer style.
+<br>
+(Fahad Alrashed, 2013/1/2)
+
+<li> New: The PETScWrappers::MPI::Vector::print() function overloads the
function of same name in the base class to ensure that the output
generated by a parallel vector makes sense.
<br>
is_hermitian (const double tolerance = 1.e-12);
/**
- * Abstract PETSc object that helps view
- * in ASCII other PETSc objects. Currently
- * this function simply writes non-zero
- * elements of a matrix to the terminal.
- */
- void write_ascii ();
+ * Prints the PETSc matrix object values
+ * using PETSc internal matrix viewer function
+ * <tt>MatView</tt>. The default format prints
+ * the non-zero matrix elements. For other valid
+ * view formats, consult
+ * http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatView.html
+ */
+ void write_ascii (const PetscViewerFormat format = PETSC_VIEWER_DEFAULT);
/**
* Returns the number bytes consumed
}
void
- MatrixBase::write_ascii ()
+ MatrixBase::write_ascii (const PetscViewerFormat format)
{
// First flush PETSc caches
compress ();
// Set options
PetscViewerSetFormat (PETSC_VIEWER_STDOUT_WORLD,
- PETSC_VIEWER_DEFAULT);
+ format);
// Write to screen
- MatView (matrix,PETSC_VIEWER_STDOUT_WORLD);
+ MatView (matrix, PETSC_VIEWER_STDOUT_WORLD);
}