diff --git a/dune/common/densematrix.hh b/dune/common/densematrix.hh index c696c85d3f94eace7c72e1c7099e01e5941d2261..501178f594d0f7f96fc9c926e3f50c474c43612a 100644 --- a/dune/common/densematrix.hh +++ b/dune/common/densematrix.hh @@ -375,8 +375,8 @@ namespace Dune auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); DUNE_ASSERT_BOUNDS((void*)(&x) != (void*)(&y)); - DUNE_ASSERT_BOUNDS(xx.N() == M()); - DUNE_ASSERT_BOUNDS(yy.N() == N()); + DUNE_ASSERT_BOUNDS(xx.size() == M()); + DUNE_ASSERT_BOUNDS(yy.size() == N()); using y_field_type = typename FieldTraits<Y>::field_type; for (size_type i=0; i<rows(); ++i) @@ -394,8 +394,8 @@ namespace Dune auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); DUNE_ASSERT_BOUNDS((void*)(&x) != (void*)(&y)); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); using y_field_type = typename FieldTraits<Y>::field_type; for(size_type i = 0; i < cols(); ++i) @@ -412,8 +412,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == M()); - DUNE_ASSERT_BOUNDS(yy.N() == N()); + DUNE_ASSERT_BOUNDS(xx.size() == M()); + DUNE_ASSERT_BOUNDS(yy.size() == N()); for (size_type i=0; i<rows(); ++i) for (size_type j=0; j<cols(); j++) yy[i] += (*this)[i][j] * xx[j]; @@ -425,8 +425,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for(size_type i = 0; i<rows(); ++i) for (size_type j=0; j<cols(); j++) yy[j] += (*this)[i][j]*xx[i]; @@ -438,8 +438,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[j] += conjugateComplex((*this)[i][j])*xx[i]; @@ -451,8 +451,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == M()); - DUNE_ASSERT_BOUNDS(yy.N() == N()); + DUNE_ASSERT_BOUNDS(xx.size() == M()); + DUNE_ASSERT_BOUNDS(yy.size() == N()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[i] -= (*this)[i][j] * xx[j]; @@ -464,8 +464,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[j] -= (*this)[i][j]*xx[i]; @@ -477,8 +477,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[j] -= conjugateComplex((*this)[i][j])*xx[i]; @@ -491,8 +491,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == M()); - DUNE_ASSERT_BOUNDS(yy.N() == N()); + DUNE_ASSERT_BOUNDS(xx.size() == M()); + DUNE_ASSERT_BOUNDS(yy.size() == N()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[i] += alpha * (*this)[i][j] * xx[j]; @@ -505,8 +505,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[j] += alpha*(*this)[i][j]*xx[i]; @@ -519,8 +519,8 @@ namespace Dune { auto&& xx = Impl::asVector(x); auto&& yy = Impl::asVector(y); - DUNE_ASSERT_BOUNDS(xx.N() == N()); - DUNE_ASSERT_BOUNDS(yy.N() == M()); + DUNE_ASSERT_BOUNDS(xx.size() == N()); + DUNE_ASSERT_BOUNDS(yy.size() == M()); for (size_type i=0; i<rows(); i++) for (size_type j=0; j<cols(); j++) yy[j] += diff --git a/dune/common/fmatrix.hh b/dune/common/fmatrix.hh index 0ac53c7156c860300b42fb3436e02abeb843e890..5f4a77582e6496bdb13383a12d543ea8c40d618c 100644 --- a/dune/common/fmatrix.hh +++ b/dune/common/fmatrix.hh @@ -39,7 +39,7 @@ namespace Dune col_(col) {} - constexpr size_type N () const { + constexpr size_type size () const { return matrix_.N(); }