From: bangerth Date: Fri, 27 May 2011 22:10:02 +0000 (+0000) Subject: Return reference to derived, rather than reference to base in SparsityPattern::trilin... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62d86c510d3e180399f86172a41480eb029df93c;p=dealii-svn.git Return reference to derived, rather than reference to base in SparsityPattern::trilinos_sparsity_pattern. git-svn-id: https://svn.dealii.org/trunk@23749 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 25e57f3de3..d49a6a01e8 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -131,6 +131,14 @@ should be fixed now.

Specific improvements

    +
  1. 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. +
    +(Wolfgang Bangerth 2011/05/27)
  2. New: The class RelaxationBlockJacobi has been added to the relaxation classes.
    (GK, 2011/05/19) diff --git a/deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h b/deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h index 53f6e21029..348c5d3f68 100644 --- a/deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -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(*graph); + return *graph; }