--- /dev/null
+Changed: LAPACKFullMatrix::print_formatted is only allowed
+if the state is 'matrix' or 'inverse_matrix'.
+<br>
+(Daniel Arndt, 2017/03/18)
*
* @arg <tt>threshold</tt>: all entries with absolute value smaller than
* this are considered zero.
+ *
+ * @note The entries stored resemble a matrix only if the state is either
+ * LAPACKSupport::matrix or LAPACK::inverse_matrix. Otherwise, calling this
+ * function is not allowed.
*/
void print_formatted (std::ostream &out,
const unsigned int precision = 3,
namespace LAPACKSupport
{
/**
- * Most LAPACK functions change the contents of the matrix applied to to
- * something which is not a matrix anymore. Therefore, LAPACK matrix classes
- * in <tt>deal.II</tt> have a state flag indicating what happened to them.
+ * Most of the LAPACK functions one can apply to a matrix (e.g., by calling
+ * the member functions of this class) change its content in some ways. For
+ * example, they may invert the matrix, or may replace it by a matrix whose
+ * columns represent the eigenvectors of the original content of the matrix.
+ * The elements of this enumeration are therefore used to track what is
+ * currently being stored by this object.
*
* @author Guido Kanschat, 2005
*/
Assert ((!this->empty()) || (this->n_cols()+this->n_rows()==0),
ExcInternalError());
+ Assert (state == LAPACKSupport::matrix ||
+ state == LAPACKSupport::inverse_matrix,
+ ExcState(state));
// set output format, but store old
// state