Go to the documentation of this file.
2 #ifndef DUNE_PDELAB_BACKEND_ISTL_PATTERNSTATISTICS_HH
3 #define DUNE_PDELAB_BACKEND_ISTL_PATTERNSTATISTICS_HH
29 , _longest_row(longest_row)
30 , _overflow_count(overflow_count)
52 return _overflow_count;
70 return static_cast<double>(_nnz) / _rows;
75 std::cout <<
"==== Pattern statistics ====" << std::endl
76 <<
"matrix rows: " <<
s.rows() << std::endl
77 <<
"nonzero entries: " <<
s.nonZeros() << std::endl
78 <<
"maximum number of nonzeros per row: " <<
s.longestRow() << std::endl
79 <<
"user-provided estimate of nonzeros per row: " <<
s.estimatedEntriesPerRow() << std::endl
80 <<
"average nonzeros per row: " <<
s.averageEntriesPerRow() << std::endl
81 <<
"number of entries in overflow area during setup: " <<
s.overflowCount() << std::endl;
99 #endif // DUNE_PDELAB_BACKEND_ISTL_PATTERNSTATISTICS_HH
friend std::ostream & operator<<(std::ostream &os, const PatternStatistics &s)
Definition: patternstatistics.hh:73
size_type overflowCount() const
The number of nonzero entries that had to be temporarily stored in the overflow area during pattern c...
Definition: patternstatistics.hh:50
size_type estimatedEntriesPerRow() const
The estimated number of nonzeros per row as provided by the user before pattern construction.
Definition: patternstatistics.hh:56
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
size_type nonZeros() const
The total number of nonzero entries in the matrix.
Definition: patternstatistics.hh:38
size_type rows() const
The number of matrix rows.
Definition: patternstatistics.hh:62
T size_type
size_type of the associated BCRSMatrix.
Definition: patternstatistics.hh:19
Statistics about the pattern of a BCRSMatrix.
Definition: patternstatistics.hh:13
size_type longestRow() const
The maximum number of nonzero entries in any row of the matrix.
Definition: patternstatistics.hh:44
double averageEntriesPerRow() const
The average number of nonzero entries per row, after matrix construction was completed.
Definition: patternstatistics.hh:68
const std::string s
Definition: function.hh:830