(void)d; // removes -Wunused-parameter warning in optimized mode
if (this->n_elements() != 0)
- std::memset (&this->values[0], 0, this->n_elements()*sizeof(number));
+ this->reset_values();
return *this;
}
row_lengths[i] = csp.row_length(locally_owned.nth_index_in_set(i));
sparsity.reinit(locally_owned.n_elements(), locally_owned.n_elements(),
row_lengths);
+ std::vector<types::global_dof_index> row_entries;
for (unsigned int i=0; i<locally_owned.n_elements(); ++i)
{
const types::global_dof_index row = locally_owned.nth_index_in_set(i);
+ row_entries.resize(0);
for (CompressedSimpleSparsityPattern::row_iterator it =
csp.row_begin(row); it != csp.row_end(row); ++it)
if (*it != row && locally_owned.is_element(*it))
- sparsity.add(i, locally_owned.index_within_set(*it));
+ row_entries.push_back(locally_owned.index_within_set(*it));
+ sparsity.add_entries(i, row_entries.begin(), row_entries.end(),
+ true);
}
sparsity.compress();
}
Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
if (this->n_elements() != 0)
- std::fill (this->values.begin(), this->values.end(), number());
+ this->reset_values();
state = LAPACKSupport::matrix;
return *this;
Assert(state == lu, ExcState(state));
Assert(this->n_rows() == this->n_cols(),
LACExceptions::ExcNotQuadratic());
+ AssertDimension(this->n_rows(), v.size());
const char *trans = transposed ? &T : &N;
const int nn = this->n_cols();
Assert(state == lu, ExcState(state));
Assert(B.state == matrix, ExcState(state));
Assert(this->n_rows() == this->n_cols(), LACExceptions::ExcNotQuadratic());
+ AssertDimension(this->n_rows(), B.n_rows());
const char *trans = transposed ? &T : &N;
const int nn = this->n_cols();
{
ForwardIterator it = begin;
bool has_larger_entries = false;
- std::size_t k=rowstart[row];
+ // skip diagonal
+ std::size_t k=rowstart[row]+store_diagonal_first_in_row;
for ( ; k<rowstart[row+1]; k++)
if (colnums[k] == invalid_entry)
break;