From: bangerth Date: Tue, 9 Mar 2010 16:10:07 +0000 (+0000) Subject: Initialize a member variable in the constructor. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1a5421365d15772082737e54a2947381ffc932c;p=dealii-svn.git Initialize a member variable in the constructor. git-svn-id: https://svn.dealii.org/trunk@20765 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/trilinos_sparsity_pattern.h b/deal.II/lac/include/lac/trilinos_sparsity_pattern.h index dac9686af4..7c26f2fada 100644 --- a/deal.II/lac/include/lac/trilinos_sparsity_pattern.h +++ b/deal.II/lac/include/lac/trilinos_sparsity_pattern.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2008, 2009 by the deal.II authors +// Copyright (C) 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -422,7 +422,7 @@ namespace TrilinosWrappers * sparsity pattern with non-trivial * content. */ - void operator = (const SparsityPattern &input_sparsity_pattern); + SparsityPattern & operator = (const SparsityPattern &input_sparsity_pattern); /** * Release all memory and return to a @@ -1698,8 +1698,10 @@ namespace TrilinosWrappers SparsityPattern::SparsityPattern (const IndexSet ¶llel_partitioning, const MPI_Comm &communicator, const unsigned int n_entries_per_row) + : + compressed (false) { - Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, + Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false); reinit (map, map, n_entries_per_row); } @@ -1710,8 +1712,10 @@ namespace TrilinosWrappers SparsityPattern::SparsityPattern (const IndexSet ¶llel_partitioning, const MPI_Comm &communicator, const std::vector &n_entries_per_row) + : + compressed (false) { - Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, + Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false); reinit (map, map, n_entries_per_row); } @@ -1723,6 +1727,8 @@ namespace TrilinosWrappers const IndexSet &col_parallel_partitioning, const MPI_Comm &communicator, const unsigned int n_entries_per_row) + : + compressed (false) { Epetra_Map row_map = row_parallel_partitioning.make_trilinos_map (communicator, false); @@ -1735,10 +1741,12 @@ namespace TrilinosWrappers inline SparsityPattern:: - SparsityPattern (const IndexSet &row_parallel_partitioning, - const IndexSet &col_parallel_partitioning, - const MPI_Comm &communicator, - const std::vector &n_entries_per_row) + SparsityPattern (const IndexSet &row_parallel_partitioning, + const IndexSet &col_parallel_partitioning, + const MPI_Comm &communicator, + const std::vector &n_entries_per_row) + : + compressed (false) { Epetra_Map row_map = row_parallel_partitioning.make_trilinos_map (communicator, false); @@ -1750,12 +1758,12 @@ namespace TrilinosWrappers inline - void + void SparsityPattern::reinit (const IndexSet ¶llel_partitioning, const MPI_Comm &communicator, const unsigned int n_entries_per_row) { - Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, + Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false); reinit (map, map, n_entries_per_row); } @@ -1767,7 +1775,7 @@ namespace TrilinosWrappers const MPI_Comm &communicator, const std::vector &n_entries_per_row) { - Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, + Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false); reinit (map, map, n_entries_per_row); } @@ -1830,7 +1838,7 @@ namespace TrilinosWrappers const MPI_Comm &communicator, const bool exchange_data) { - Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, + Epetra_Map map = parallel_partitioning.make_trilinos_map (communicator, false); reinit (map, map, nontrilinos_sparsity_pattern, exchange_data); } diff --git a/deal.II/lac/source/trilinos_sparsity_pattern.cc b/deal.II/lac/source/trilinos_sparsity_pattern.cc index b3ab4a11e6..172d0859de 100644 --- a/deal.II/lac/source/trilinos_sparsity_pattern.cc +++ b/deal.II/lac/source/trilinos_sparsity_pattern.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2008, 2009 by the deal.II authors +// Copyright (C) 2008, 2009, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -369,10 +369,11 @@ namespace TrilinosWrappers - void + SparsityPattern & SparsityPattern::operator = (const SparsityPattern &) { Assert (false, ExcNotImplemented()); + return *this; }