Skip to content

add rows() and cols() methods to matrix classes

Felix Gruber requested to merge feature/rows-and-cols-methods into master

The existing methods N() and M() do not convey their meaning very well. I always have to look up which one was used for rows and which one for colums. The DenseMatrix class from dune-common already implements the rows() and cols() methods, so I was a bit surprised that all the matrix classes from ISTL didn't have these methods.

The only matrix class that is still missing the rows() and cols() methods after merging this MR is ScaledIdentityMatrix as it defines enum {rows = n, cols = n} which we would have to remove to introduce the rows() and cols() methods.

Edited by Simon Praetorius

Merge request reports

Loading