From: Guido Kanschat Date: Mon, 21 May 2001 21:17:35 +0000 (+0000) Subject: vector2d for LAPACK enhancement X-Git-Tag: v8.0.0~19110 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58d87e178ad5a47c4a2385243ddb418a0583ca2;p=dealii.git vector2d for LAPACK enhancement git-svn-id: https://svn.dealii.org/trunk@4684 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/full_matrix.double.cc b/deal.II/lac/source/full_matrix.double.cc index 0b6cfca695..15986ce5bd 100644 --- a/deal.II/lac/source/full_matrix.double.cc +++ b/deal.II/lac/source/full_matrix.double.cc @@ -91,13 +91,18 @@ template<> void FullMatrix::invert (const FullMatrix &M) { + double* val = const_cast (data()); + Assert (val != 0, ExcEmptyMatrix()); + unsigned int dim_range = n_cols (); + unsigned int dim_image = n_rows (); + Assert (dim_range == dim_image, ExcNotQuadratic()); - Assert (dim_range == M.dim_range, - ExcDimensionMismatch(dim_range,M.dim_range)); - Assert (dim_image == M.dim_image, - ExcDimensionMismatch(dim_image,M.dim_image)); + Assert (dim_range == M.n_cols(), + ExcDimensionMismatch(dim_range,M.n_cols())); + Assert (dim_image == M.n_rows(), + ExcDimensionMismatch(dim_image,M.n_rows())); clear(); diagadd(1.); @@ -112,7 +117,7 @@ FullMatrix::invert (const FullMatrix &M) double* s = new double[dim_range]; double* matrix = new double[dim_range*dim_range]; - std::copy (&M.val[0], &M.val[dim_image*dim_range], matrix); + std::copy (M.data(), M.data()+dim_image*dim_range, matrix); int erg = dgelss_ (&dim_range, &dim_range, &dim_range,