Use the commented-out version in PreconditionBlock::invert_diagblocks
using the try-catch clauses
-
-
-Someone should take a look at the handling of the sparsity variable
- in the sparse matrix: it is subscribed to twice (explicitely and
- through the subscriptor); the explicit subscription is redundant,
- but I don't have the time to look into that now.
template <typename number>
SparseMatrix<number>::SparseMatrix (const SparseMatrix &m) :
- Subscriptor(),
cols(0),
val(0),
max_len(0)
val(0),
max_len(0)
{
- cols->subscribe ();
reinit();
};
template <typename number>
SparseMatrix<number>::~SparseMatrix ()
{
- if (cols != 0)
- cols->unsubscribe();
cols = 0;
if (val != 0)
void
SparseMatrix<number>::reinit (const SparsityPattern &sparsity)
{
- if (cols != 0)
- cols->unsubscribe();
-
cols = &sparsity;
- cols->subscribe();
-
reinit ();
};
void
SparseMatrix<number>::clear ()
{
- if (cols != 0)
- cols->unsubscribe ();
cols = 0;
if (val) delete[] val;
val = 0;
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams