|
template<typename RI , typename CI > |
void | add_link (const RI &ri, const CI &ci) |
| Add a link between the row indicated by ri and the column indicated by ci.
|
|
template<typename I > |
void | sizes (I rit) const |
| Stream the sizes of all rows into the output iterator rit.
|
|
std::vector< size_type > | sizes () const |
| Returns a vector with the size of all rows in the pattern.
|
|
iterator | begin (size_type i) const |
| Returns an iterator to the first column index of row i.
|
|
iterator | end (size_type i) const |
| Returns an iterator past the last column index of row i.
|
|
| BCRSPattern (const RowOrdering &row_ordering, const ColOrdering &col_ordering, size_type entries_per_row) |
| Constructs a BCRSPattern for the given pair of orderings and reserves space for the provided average number of entries per row.
|
|
const RowOrdering & | rowOrdering () const |
|
const ColOrdering & | colOrdering () const |
|
void | clear () |
| Discard all internal data.
|
|
size_type | entriesPerRow () const |
|
size_type | overflowCount () const |
|
template<typename RowOrdering, typename ColOrdering>
class Dune::PDELab::ISTL::BCRSPattern< RowOrdering, ColOrdering >
Pattern builder for generic BCRS-like sparse matrices.
BCRSPattern is a pattern builder for unstructured sparse matrices for operators mapping from a vector that conforms to RowOrdering to a vector that conforms to ColOrdering.
BCRSPattern has much better runtime performance and requires far less memory than the older pattern constructon method in PDELab. By letting the user specify the average number of nonzeroes per row, it is possible to use a more efficient array-based storage scheme for the majority of the pattern entries, only using expensive map-like lookups for those entries that exceed that average.
BCRSPattern requires a recent version of the BCRSMatrix with support for row-wise setting of column indices and split allocation of column index and data arrays.
Note that unlike the implicit construction mode of the BCRSMatrix itself, this pattern builder will neither throw an exception if the number of nonzeroes was set too low nor retain excess memory if it was set too high after the pattern construction is complete. Performance will degrade if the user-provided estimate is too far away from the real value.