]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Return reference to derived, rather than reference to base in SparsityPattern::trilin...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 May 2011 22:10:02 +0000 (22:10 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 27 May 2011 22:10:02 +0000 (22:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@23749 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h

index 25e57f3de34de7a036eb69a951e36e7450a42c97..d49a6a01e89850849fb3889679f7969ea39e74cb 100644 (file)
@@ -131,6 +131,14 @@ should be fixed now.
 <h3>Specific improvements</h3>
 
 <ol>
+<li> Changed: The TrilinosWrappers::SparsityPattern::trilinos_sparsity_pattern()
+function returned a reference to an object of kind Epetra_CrsMatrix. However, the
+actual object pointed to is of derived class Epetra_FECrsMatrix. The function
+has now been changed to return a reference to the latter type. Since derived
+references can be assigned to references to base, this change should not
+result in any incompatibilities.
+<br>
+(Wolfgang Bangerth 2011/05/27)
 
 <li> New: The class RelaxationBlockJacobi has been added to the relaxation classes.
 <br> (GK, 2011/05/19)
index 53f6e21029758b8e4994abdfbe971f343defc554..348c5d3f68531871cef58df1f7149da4666f9687 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2008, 2009, 2010 by the deal.II authors
+//    Copyright (C) 2008, 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1128,7 +1128,7 @@ namespace TrilinosWrappers
                                         * Epetra_CrsGraph data that stores
                                         * the sparsity pattern.
                                         */
-      const Epetra_CrsGraph & trilinos_sparsity_pattern () const;
+      const Epetra_FECrsGraph & trilinos_sparsity_pattern () const;
 
                                        /**
                                         * Return a const reference to the
@@ -1640,10 +1640,10 @@ namespace TrilinosWrappers
 
 
   inline
-  const Epetra_CrsGraph &
+  const Epetra_FECrsGraph &
   SparsityPattern::trilinos_sparsity_pattern () const
   {
-    return static_cast<const Epetra_CrsGraph&>(*graph);
+    return *graph;
   }
 
 

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.