From d7a680efb9637641b229353244d57ef73dafe4fc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 21 Jan 2011 22:26:42 +0000 Subject: [PATCH] Let TrilinosWrappers::MPI::BlockVector::compress take the same argument as TrilinosWrappers::MPI::Vector::compress already did. git-svn-id: https://svn.dealii.org/trunk@23233 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 7 ++++ .../deal.II/lac/trilinos_block_vector.h | 34 ++++++++++++++++--- deal.II/source/lac/trilinos_block_vector.cc | 6 ++-- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 35efa57dd1..2bc38e92ae 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -47,6 +47,13 @@ should be fixed now.

Specific improvements

    +
  1. Changed: The TrilinosWrappers::MPI::BlockVector::compress function now takes an +argument (with a default value) in exactly the same way as the +TrilinosWrappers::MPI::Vector::compress function already did. +
    +(Wolfgang Bangerth, 2011/01/21) +
  2. +
  3. Fixed: When calling DataOut::build_patches with a mapping, requesting more than one subdivision, and when dim@, then some cells were not properly mapped. This is now fixed. diff --git a/deal.II/include/deal.II/lac/trilinos_block_vector.h b/deal.II/include/deal.II/lac/trilinos_block_vector.h index 78defaef6d..637320636f 100644 --- a/deal.II/include/deal.II/lac/trilinos_block_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_block_vector.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 @@ -308,11 +308,35 @@ namespace TrilinosWrappers const BlockVector &v); /** - * Compresses all the components - * after assembling together all - * elements. + * Compress the underlying + * representation of the Trilinos + * object, i.e. flush the buffers + * of the vector object if it has + * any. This function is + * necessary after writing into a + * vector element-by-element and + * before anything else can be + * done on it. + * + * The (defaulted) argument can + * be used to specify the + * compress mode + * (Add or + * Insert) in case + * the vector has not been + * written to since the last + * time this function was + * called. The argument is + * ignored if the vector has + * been added or written to + * since the last time + * compress() was called. + * + * See @ref GlossCompress "Compressing distributed objects" + * for more information. + * more information. */ - void compress (); + void compress (const Epetra_CombineMode last_action = Zero); /** * Returns the state of the diff --git a/deal.II/source/lac/trilinos_block_vector.cc b/deal.II/source/lac/trilinos_block_vector.cc index f353f7b4f9..706304d45a 100644 --- a/deal.II/source/lac/trilinos_block_vector.cc +++ b/deal.II/source/lac/trilinos_block_vector.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2008, 2009 by the deal.II authors +// Copyright (C) 2008, 2009, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -175,10 +175,10 @@ namespace TrilinosWrappers void - BlockVector::compress () + BlockVector::compress (const Epetra_CombineMode last_action) { for (unsigned int i=0; i