};
+
SparsityPattern::SparsityPattern (const SparsityPattern &s) :
Subscriptor(),
max_dim(0),
};
+
SparsityPattern::SparsityPattern (const unsigned int m,
const unsigned int n,
const unsigned int max_per_row)
};
+
SparsityPattern::SparsityPattern (const unsigned int m,
const unsigned int n,
const vector<unsigned int> &row_lengths)
};
+
SparsityPattern::SparsityPattern (const unsigned int n,
const unsigned int max_per_row)
: max_dim(0),
};
+
SparsityPattern::SparsityPattern (const unsigned int m,
const vector<unsigned int> &row_lengths)
: max_dim(0),
};
+
SparsityPattern::SparsityPattern (const SparsityPattern &original,
const unsigned int max_per_row,
const unsigned int extra_off_diagonals)
Assert (rowstart == 0, ExcInvalidConstructorCall());
Assert (colnums == 0, ExcInvalidConstructorCall());
+
Assert (rows == 0, ExcInvalidConstructorCall());
Assert (cols == 0, ExcInvalidConstructorCall());
};
+
void
SparsityPattern::reinit (const unsigned int m,
const unsigned int n,
const unsigned int n,
const vector<unsigned int> &row_lengths)
{
+
Assert (((m==0) && (n==0)) || (*max_element(row_lengths.begin(), row_lengths.end()) > 0),
ExcInvalidNumber(*max_element(row_lengths.begin(), row_lengths.end())));
Assert (row_lengths.size() == m, ExcInvalidNumber (m));
{
if (rowstart) delete[] rowstart;
if (colnums) delete[] colnums;
+
rowstart = 0;
colnums = 0;
max_vec_len = max_dim = rows = cols = 0;
unsigned int *new_colnums = new unsigned int[nonzero_elements];
+
// reserve temporary storage to
// store the entries of one row
vector<unsigned int> tmp_entries (max_row_length);
bool
-SparsityPattern::empty () const {
+SparsityPattern::empty () const
+{
// let's try to be on the safe side of
// life by using multiple possibilities in
// the check for emptiness... (sorry for
// called, we can get the maximum
// number of elements per row using
// the stored value
+
if (!compressed)
return max_row_length;
}
+
void
SparsityPattern::add (const unsigned int i,
const unsigned int j)
};
};
+
// if we came thus far, something went
// wrong: there was not enough space
// in this line
// is x-y, that is we have to
// exchange the order of
// output
- out << static_cast<signed int>(colnums[j]) << " " << -i << endl;
+ out << colnums[j] << " " << -static_cast<signed int>(i) << endl;
AssertThrow (out, ExcIO());
}
// leave if at the end of
// the entries of this line
break;
+
return b;
};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+