// elimination step
const number diagonal_entry = matrix.diag_element(dof_number);
- // we have to loop over all
- // rows of the matrix which
- // have a nonzero entry in
- // the column which we work
- // in presently. if the
- // sparsity pattern is
- // symmetric, then we can
- // get the positions of
- // these rows cheaply by
- // looking at the nonzero
- // column numbers of the
- // present row. we need not
- // look at the first entry,
- // since that is the
- // diagonal element and
- // thus the present row
+ // we have to loop over all rows of the matrix which have
+ // a nonzero entry in the column which we work in
+ // presently. if the sparsity pattern is symmetric, then
+ // we can get the positions of these rows cheaply by
+ // looking at the nonzero column numbers of the present
+ // row. we need not look at the first entry of each row,
+ // since that is the diagonal element and thus the present
+ // row
for (typename SparseMatrix<number>::iterator
- q = matrix.begin(dof_number)++;
+ q = matrix.begin(dof_number)+1;
q != matrix.end(dof_number); ++q)
{
const unsigned int row = q->column();
const unsigned int column)
= &column_less_than<typename SparseMatrix<number>::iterator>;
const typename SparseMatrix<number>::iterator
- p = Utilities::lower_bound(matrix.begin(row)++,
+ p = Utilities::lower_bound(matrix.begin(row)+1,
matrix.end(row),
dof_number,
comp);
- // check whether this line has
- // an entry in the regarding column
- // (check for ==dof_number and
- // != next_row, since if
- // row==dof_number-1, *p is a
- // past-the-end pointer but points
- // to dof_number anyway...)
+ // check whether this line has an entry in the
+ // regarding column (check for ==dof_number and !=
+ // next_row, since if row==dof_number-1, *p is a
+ // past-the-end pointer but points to dof_number
+ // anyway...)
//
- // there should be such an entry!
+ // there should be such an entry! we know this because
+ // we have assumed that the sparsity pattern is
+ // symmetric and we only walk over those rows for
+ // which the current row has a column entry
Assert ((p != matrix.end(row))
&&
(p->column() == dof_number),