]> https://gitweb.dealii.org/ - dealii.git/commitdiff
do not overwrite original matrix
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 28 Aug 2000 20:33:23 +0000 (20:33 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 28 Aug 2000 20:33:23 +0000 (20:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@3283 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/full_matrix.double.cc

index 1cc3f7b6cc50f2d24eb17304f6df0a431aad4926..ab4b863e688b3cdf185fb83813759ee54e0c3902 100644 (file)
@@ -101,13 +101,17 @@ FullMatrix<double>::invert (const FullMatrix<double> &M)
   double* work = new double[lwork];
   int info;
   
-  const char* trans = "N";
+//  const char* trans = "N";
   int rank;
   const double rcond=-1.;
   double* s = new double[dim_range];
   
+  double* matrix = new double[dim_range*dim_range];
+  copy (&M.val[0], &M.val[dim_image*dim_range], matrix);
+  
+
   int erg = dgelss_ (&dim_range, &dim_range, &dim_range,
-                    M.val, &dim_range,
+                    matrix, &dim_range,
                     val, &dim_range,
                     s, &rcond, &rank,
                     work, &lwork,
@@ -118,14 +122,12 @@ FullMatrix<double>::invert (const FullMatrix<double> &M)
 //                 work, &lwork,
 //                 &info);
 
-  double condition = s[0]/s[dim_range-1];
+//  double condition = s[0]/s[dim_range-1];
   
   if (info!=0)
     deallog << "inverting error " << info << ' ' << erg << endl;
   if (rank<(int)dim_range)
     deallog << "rank deficiency " << rank << endl;
-  if (condition > 1.e6)
-    deallog << "Condition " <<  condition << endl;
   delete[] work;
   delete[] s;
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.