inline typename ChunkSparseMatrix<number>::size_type
ChunkSparseMatrix<number>::m() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->rows;
}
inline typename ChunkSparseMatrix<number>::size_type
ChunkSparseMatrix<number>::n() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->cols;
}
inline const ChunkSparsityPattern &
ChunkSparseMatrix<number>::get_sparsity_pattern() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return *cols;
}
{
AssertIsFinite(value);
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
// it is allowed to set elements of the matrix that are not part of the
// sparsity pattern, if the value to which we set it is zero
const size_type index = compute_location(i, j);
{
AssertIsFinite(value);
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
if (std::abs(value) != 0.)
{
inline ChunkSparseMatrix<number> &
ChunkSparseMatrix<number>::operator*=(const number factor)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
const size_type chunk_size = cols->get_chunk_size();
inline ChunkSparseMatrix<number> &
ChunkSparseMatrix<number>::operator/=(const number factor)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(std::abs(factor) != 0, ExcDivideByZero());
ChunkSparseMatrix<number>::operator()(const size_type i,
const size_type j) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
AssertThrow(compute_location(i, j) != SparsityPattern::invalid_entry,
ExcInvalidIndex(i, j));
return val[compute_location(i, j)];
inline number
ChunkSparseMatrix<number>::el(const size_type i, const size_type j) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
const size_type index = compute_location(i, j);
if (index != ChunkSparsityPattern::invalid_entry)
inline number
ChunkSparseMatrix<number>::diag_element(const size_type i) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(m() == n(), ExcNotQuadratic());
AssertIndexRange(i, m());
(void)d;
Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->sparsity_pattern.compressed || cols->empty(),
ChunkSparsityPattern::ExcNotCompressed());
typename ChunkSparseMatrix<number>::size_type
ChunkSparseMatrix<number>::n_nonzero_elements() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->n_nonzero_elements();
}
typename ChunkSparseMatrix<number>::size_type
ChunkSparseMatrix<number>::n_actually_nonzero_elements() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
// count those elements that are nonzero, even if they lie in the padding
// around the matrix. since we have the invariant that padding elements are
void
ChunkSparseMatrix<number>::symmetrize()
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->rows == cols->cols, ExcNotQuadratic());
Assert(false, ExcNotImplemented());
ChunkSparseMatrix<number>::copy_from(
const ChunkSparseMatrix<somenumber> &matrix)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(cols == matrix.cols, ExcDifferentChunkSparsityPatterns());
ChunkSparseMatrix<number>::add(const number factor,
const ChunkSparseMatrix<somenumber> &matrix)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(cols == matrix.cols, ExcDifferentChunkSparsityPatterns());
void
ChunkSparseMatrix<number>::vmult(OutVector &dst, const InVector &src) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
ChunkSparseMatrix<number>::Tvmult(OutVector &dst, const InVector &src) const
{
Assert(val != nullptr, ExcNotInitialized());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(n() == dst.size(), ExcDimensionMismatch(n(), dst.size()));
Assert(m() == src.size(), ExcDimensionMismatch(m(), src.size()));
Assert(!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
void
ChunkSparseMatrix<number>::vmult_add(OutVector &dst, const InVector &src) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
void
ChunkSparseMatrix<number>::Tvmult_add(OutVector &dst, const InVector &src) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
somenumber
ChunkSparseMatrix<number>::matrix_norm_square(const Vector<somenumber> &v) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == v.size(), ExcDimensionMismatch(m(), v.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
const Vector<somenumber> &u,
const Vector<somenumber> &v) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == u.size(), ExcDimensionMismatch(m(), u.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
typename ChunkSparseMatrix<number>::real_type
ChunkSparseMatrix<number>::l1_norm() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
typename ChunkSparseMatrix<number>::real_type
ChunkSparseMatrix<number>::linfty_norm() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
// this function works like l1_norm(). it can be made more efficient
const Vector<somenumber> &u,
const Vector<somenumber> &b) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(m() == b.size(), ExcDimensionMismatch(m(), b.size()));
{
(void)dst;
(void)src;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
// CVS archives to see the original version which is much clearer...
(void)dst;
(void)src;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
const Vector<somenumber> &src,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
const Vector<somenumber> &src,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
const number /*om*/) const
{
(void)dst;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
const number /*om*/) const
{
(void)dst;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
(void)dst;
(void)permutation;
(void)inverse_permutation;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
(void)dst;
(void)permutation;
(void)inverse_permutation;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
{
(void)v;
(void)b;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
{
(void)v;
(void)b;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
const number /*om*/) const
{
(void)dst;
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == n(),
ExcMessage("This operation is only valid on square matrices."));
{
AssertThrow(out, ExcIO());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(false, ExcNotImplemented());
{
AssertThrow(out, ExcIO());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
unsigned int width = width_;
{
AssertThrow(out, ExcIO());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
const size_type chunk_size = cols->get_chunk_size();
*/
DeclException0(ExcDifferentBlockIndices);
+ /**
+ * The operation requires a sparsity pattern.
+ */
+ DeclExceptionMsg(
+ ExcNeedsSparsityPattern,
+ "This function requires that the current object have a "
+ "sparsity pattern attached to it, but no sparsity pattern "
+ "is available. This usually means that there is a missing "
+ "reinit() call which would have added the sparsity pattern.");
+
/**
* Exception thrown when a PETSc function reports an error. If possible,
* this exception uses the message provided by
inline typename SparseMatrix<number>::size_type
SparseMatrix<number>::m() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->rows;
}
inline typename SparseMatrix<number>::size_type
SparseMatrix<number>::n() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->cols;
}
inline SparseMatrix<number> &
SparseMatrix<number>::operator*=(const number factor)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
number * val_ptr = val.get();
inline SparseMatrix<number> &
SparseMatrix<number>::operator/=(const number factor)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(factor != number(), ExcDivideByZero());
inline const number &
SparseMatrix<number>::operator()(const size_type i, const size_type j) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->operator()(i, j) != SparsityPattern::invalid_entry,
ExcInvalidIndex(i, j));
return val[cols->operator()(i, j)];
inline number &
SparseMatrix<number>::operator()(const size_type i, const size_type j)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->operator()(i, j) != SparsityPattern::invalid_entry,
ExcInvalidIndex(i, j));
return val[cols->operator()(i, j)];
inline number
SparseMatrix<number>::el(const size_type i, const size_type j) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
const size_type index = cols->operator()(i, j);
if (index != SparsityPattern::invalid_entry)
inline number
SparseMatrix<number>::diag_element(const size_type i) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(m() == n(), ExcNotQuadratic());
AssertIndexRange(i, m());
inline number &
SparseMatrix<number>::diag_element(const size_type i)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(m() == n(), ExcNotQuadratic());
AssertIndexRange(i, m());
const bool across,
const bool diagonal_first) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
bool hanging_diagonal = false;
(void)d;
Assert(d == 0, ExcScalarAssignmentOnlyForZeroValue());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->compressed || cols->empty(),
SparsityPattern::ExcNotCompressed());
typename SparseMatrix<number>::size_type
SparseMatrix<number>::get_row_length(const size_type row) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->row_length(row);
}
std::size_t
SparseMatrix<number>::n_nonzero_elements() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return cols->n_nonzero_elements();
}
std::size_t
SparseMatrix<number>::n_actually_nonzero_elements(const double threshold) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(threshold >= 0, ExcMessage("Negative threshold!"));
size_type nnz = 0;
const std::size_t nnz_alloc = n_nonzero_elements();
void
SparseMatrix<number>::symmetrize()
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(cols->rows == cols->cols, ExcNotQuadratic());
const size_type n_rows = m();
SparseMatrix<number> &
SparseMatrix<number>::copy_from(const SparseMatrix<somenumber> &matrix)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(cols == matrix.cols, ExcDifferentSparsityPatterns());
SparseMatrix<number>::add(const number factor,
const SparseMatrix<somenumber> &matrix)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(cols == matrix.cols, ExcDifferentSparsityPatterns());
const bool elide_zero_values,
const bool col_indices_are_sorted)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
AssertIndexRange(row, m());
// if we have sufficiently many columns
const number2 * values,
const bool elide_zero_values)
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
AssertIndexRange(row, m());
// First, search all the indices to find
void
SparseMatrix<number>::vmult(OutVector &dst, const InVector &src) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
SparseMatrix<number>::Tvmult(OutVector &dst, const InVector &src) const
{
Assert(val != nullptr, ExcNotInitialized());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(n() == dst.size(), ExcDimensionMismatch(n(), dst.size()));
Assert(m() == src.size(), ExcDimensionMismatch(m(), src.size()));
void
SparseMatrix<number>::vmult_add(OutVector &dst, const InVector &src) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(n() == src.size(), ExcDimensionMismatch(n(), src.size()));
SparseMatrix<number>::Tvmult_add(OutVector &dst, const InVector &src) const
{
Assert(val != nullptr, ExcNotInitialized());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(n() == dst.size(), ExcDimensionMismatch(n(), dst.size()));
Assert(m() == src.size(), ExcDimensionMismatch(m(), src.size()));
somenumber
SparseMatrix<number>::matrix_norm_square(const Vector<somenumber> &v) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == v.size(), ExcDimensionMismatch(m(), v.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
SparseMatrix<number>::matrix_scalar_product(const Vector<somenumber> &u,
const Vector<somenumber> &v) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == u.size(), ExcDimensionMismatch(m(), u.size()));
Assert(n() == v.size(), ExcDimensionMismatch(n(), v.size()));
{
const bool use_vector = V.size() == n() ? true : false;
Assert(n() == B.m(), ExcDimensionMismatch(n(), B.m()));
- Assert(cols != nullptr, ExcNotInitialized());
- Assert(B.cols != nullptr, ExcNotInitialized());
- Assert(C.cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
+ Assert(B.cols != nullptr, ExcNeedsSparsityPattern());
+ Assert(C.cols != nullptr, ExcNeedsSparsityPattern());
const SparsityPattern &sp_A = *cols;
const SparsityPattern &sp_B = *B.cols;
{
const bool use_vector = V.size() == m() ? true : false;
Assert(m() == B.m(), ExcDimensionMismatch(m(), B.m()));
- Assert(cols != nullptr, ExcNotInitialized());
- Assert(B.cols != nullptr, ExcNotInitialized());
- Assert(C.cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
+ Assert(B.cols != nullptr, ExcNeedsSparsityPattern());
+ Assert(C.cols != nullptr, ExcNeedsSparsityPattern());
const SparsityPattern &sp_A = *cols;
const SparsityPattern &sp_B = *B.cols;
typename SparseMatrix<number>::real_type
SparseMatrix<number>::l1_norm() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Vector<real_type> column_sums(n());
typename SparseMatrix<number>::real_type
SparseMatrix<number>::linfty_norm() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
const number *val_ptr = &val[cols->rowstart[0]];
const Vector<somenumber> &u,
const Vector<somenumber> &b) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
Assert(m() == b.size(), ExcDimensionMismatch(m(), b.size()));
const Vector<somenumber> &src,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
AssertDimension(dst.size(), n());
// you may want to take a look at the CVS
// archives to see the original version
// which is much clearer...
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
AssertDimension(dst.size(), n());
const Vector<somenumber> &src,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
dst = src;
const Vector<somenumber> &src,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
dst = src;
void
SparseMatrix<number>::SOR(Vector<somenumber> &dst, const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
AssertDimension(dst.size(), n());
void
SparseMatrix<number>::TSOR(Vector<somenumber> &dst, const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
AssertDimension(dst.size(), n());
const std::vector<size_type> &inverse_permutation,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
const std::vector<size_type> &inverse_permutation,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
const Vector<somenumber> &b,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
const Vector<somenumber> &b,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
Assert(m() == v.size(), ExcDimensionMismatch(m(), v.size()));
const Vector<somenumber> &b,
const number om) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
Assert(m() == v.size(), ExcDimensionMismatch(m(), v.size()));
// missing
Assert(false, ExcNotImplemented());
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
AssertDimension(m(), n());
Assert(m() == dst.size(), ExcDimensionMismatch(m(), dst.size()));
const SparsityPattern &
SparseMatrix<number>::get_sparsity_pattern() const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
return *cols;
}
const char * zero_string,
const double denominator) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
unsigned int width = width_;
SparseMatrix<number>::print_pattern(std::ostream &out,
const double threshold) const
{
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
for (size_type i = 0; i < m(); ++i)
out.precision(precision);
- Assert(cols != nullptr, ExcNotInitialized());
+ Assert(cols != nullptr, ExcNeedsSparsityPattern());
Assert(val != nullptr, ExcNotInitialized());
std::vector<number> rows;