]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Initialize the 'matrix' and 'vector' members in the PETSc wrappers. 3579/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 14 Nov 2016 14:10:43 +0000 (07:10 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 14 Nov 2016 14:10:43 +0000 (07:10 -0700)
These members are of type 'Mat' and 'Vec', which are typedefed to pointers to otherwise
opaque types. Initialize these members to 'NULL'.

source/lac/petsc_matrix_base.cc
source/lac/petsc_vector_base.cc

index 350cd548421cde5e4adf61e9b6eab10c5ae95533..294a6ac4fdd82fb0a033659a99c131a25750aa10 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2015 by the deal.II authors
+// Copyright (C) 2004 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -76,6 +76,7 @@ namespace PETScWrappers
 
   MatrixBase::MatrixBase ()
     :
+    matrix (NULL),
     last_action (VectorOperation::unknown)
   {}
 
index febffa9c45d8a1af6291b4f2c4df9023cb7a9a9f..185f78938889fd0872bbee8c164adb4e666c6b4a 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2004 - 2015 by the deal.II authors
+// Copyright (C) 2004 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -150,6 +150,7 @@ namespace PETScWrappers
 
   VectorBase::VectorBase ()
     :
+    vector (NULL),
     ghosted(false),
     last_action (::dealii::VectorOperation::unknown),
     attained_ownership(true)

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.