]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove code duplication.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 11:42:15 +0000 (11:42 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 11:42:15 +0000 (11:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@32401 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_full_matrix.cc

index 8a35af920a89b0ba449064d5b7a3760ce1a91350..bb2271ffda97f256386fd1f5c3b1709bc8b0d861 100644 (file)
@@ -1,7 +1,7 @@
 // ---------------------------------------------------------------------
 // $Id$
 //
-// Copyright (C) 2004 - 2013 by the deal.II authors
+// Copyright (C) 2004 - 2014 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -27,12 +27,8 @@ namespace PETScWrappers
 
   FullMatrix::FullMatrix ()
   {
-    const int m=0, n=0;
-    const int ierr
-      = MatCreateSeqDense (PETSC_COMM_SELF, m, n, PETSC_NULL,
-                          &matrix);
-
-    AssertThrow (ierr == 0, ExcPETScError(ierr));
+    // empty constructor generate an empty matrix
+    do_reinit (0, 0);
   }
 
   FullMatrix::FullMatrix (const size_type m,
@@ -71,7 +67,6 @@ namespace PETScWrappers
   }
 
 
-
   const MPI_Comm &
   FullMatrix::get_mpi_communicator () const
   {

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.