// entry from within the part of the
// matrix that we can see. if we can't
// find such an entry, take one
- PetscScalar average_nonzero_diagonal_entry = 1;
- for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
- if (matrix.diag_element(i) != 0)
- {
- average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
- break;
- }
+ PetscScalar average_nonzero_diagonal_entry = 1;
+ for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
+ if (matrix.diag_element(i) != PetscScalar ())
+ {
+ average_nonzero_diagonal_entry = matrix.diag_element(i);
+ break;
+ }
+
+
// figure out which rows of the matrix we
// have to eliminate on this processor
std::vector<types::global_dof_index> constrained_rows;
for (std::map<types::global_dof_index,double>::const_iterator
-- dof = boundary_values.begin();
++ dof = boundary_values.begin();
dof != boundary_values.end();
++dof)
if ((dof->first >= local_range.first) &&