int, int, int, int,
<< "The blocks [" << arg1 << ',' << arg2 << "] and ["
<< arg3 << ',' << arg4 << "] have differing column numbers.");
- /**
- * Exception
- */
- DeclException0 (ExcInvalidConstructorCall);
//@}
protected:
* Exception
*/
DeclException0 (ExcEmptyObject);
- /**
- * Exception
- */
- DeclException0 (ExcInvalidConstructorCall);
/**
* Exception
*/
DeclExceptionMsg (ExcMatrixIsCompressed,
"The operation you attempted changes the structure of the SparsityPattern "
"and is not possible after compress() has been called.");
- /**
- * Exception
- */
- DeclException0 (ExcInvalidConstructorCall);
/**
* Exception
*/
BlockSparsityPatternBase<SparsityPatternBase>::
BlockSparsityPatternBase (const BlockSparsityPatternBase &s)
:
- Subscriptor ()
+ Subscriptor (),
+ rows (0),
+ columns (0)
{
(void)s;
- Assert(s.rows==0, ExcInvalidConstructorCall());
- Assert(s.columns==0, ExcInvalidConstructorCall());
-
- rows = 0;
- columns=0;
+ Assert (s.rows==0 && s.columns==0,
+ ExcMessage("This constructor can only be called if the provided argument "
+ "is the sparsity pattern for an empty matrix. This constructor can "
+ "not be used to copy-construct a non-empty sparsity pattern."));
}
// ---------------------------------------------------------------------
//
-// Copyright (C) 2008 - 2015 by the deal.II authors
+// Copyright (C) 2008 - 2016 by the deal.II authors
//
// This file is part of the deal.II library.
//
chunk_size (s.chunk_size),
sparsity_pattern(s.sparsity_pattern)
{
- Assert (s.rows == 0, ExcInvalidConstructorCall());
- Assert (s.cols == 0, ExcInvalidConstructorCall());
+ Assert (s.rows==0 && s.cols==0,
+ ExcMessage("This constructor can only be called if the provided argument "
+ "is the sparsity pattern for an empty matrix. This constructor can "
+ "not be used to copy-construct a non-empty sparsity pattern."));
reinit (0,0,0,0);
}
ChunkSparsityPattern &
ChunkSparsityPattern::operator = (const ChunkSparsityPattern &s)
{
- Assert (s.rows == 0, ExcInvalidConstructorCall());
- Assert (s.cols == 0, ExcInvalidConstructorCall());
+ Assert (s.rows==0 && s.cols==0,
+ ExcMessage("This operator can only be called if the provided argument "
+ "is the sparsity pattern for an empty matrix. This operator can "
+ "not be used to copy a non-empty sparsity pattern."));
+
+ Assert (rows==0 && cols==0,
+ ExcMessage("This operator can only be called if the current object is "
+ "empty."));
// perform the checks in the underlying object as well
sparsity_pattern = s.sparsity_pattern;
// ---------------------------------------------------------------------
//
-// Copyright (C) 2000 - 2015 by the deal.II authors
+// Copyright (C) 2000 - 2016 by the deal.II authors
//
// This file is part of the deal.II library.
//
store_diagonal_first_in_row(false)
{
(void)s;
- Assert (s.rowstart == 0, ExcInvalidConstructorCall());
- Assert (s.colnums == 0, ExcInvalidConstructorCall());
- Assert (s.rows == 0, ExcInvalidConstructorCall());
- Assert (s.cols == 0, ExcInvalidConstructorCall());
+ Assert (s.rows==0 && s.cols==0 && s.rowstart==0 && s.colnums==0,
+ ExcMessage("This constructor can only be called if the provided argument "
+ "is the sparsity pattern for an empty matrix. This constructor can "
+ "not be used to copy-construct a non-empty sparsity pattern."));
reinit (0,0,0);
}
SparsityPattern::operator = (const SparsityPattern &s)
{
(void)s;
- Assert (s.rowstart == 0, ExcInvalidConstructorCall());
- Assert (s.colnums == 0, ExcInvalidConstructorCall());
- Assert (s.rows == 0, ExcInvalidConstructorCall());
- Assert (s.cols == 0, ExcInvalidConstructorCall());
-
- Assert (rowstart == 0, ExcInvalidConstructorCall());
- Assert (colnums == 0, ExcInvalidConstructorCall());
- Assert (rows == 0, ExcInvalidConstructorCall());
- Assert (cols == 0, ExcInvalidConstructorCall());
+ Assert (s.rows==0 && s.cols==0 && s.rowstart==0 && s.colnums==0,
+ ExcMessage("This operator can only be called if the provided argument "
+ "is the sparsity pattern for an empty matrix. This operator can "
+ "not be used to copy a non-empty sparsity pattern."));
+
+ Assert (rows==0 && cols==0 && rowstart==0 && cols==0,
+ ExcMessage("This operator can only be called if the current object is "
+ "empty."));
return *this;
}