From 80837ae49f452664ac90296cb9372b695cdad0b0 Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 13 Feb 2013 19:04:33 +0000 Subject: [PATCH] Add missing compress() implementations. Oops. git-svn-id: https://svn.dealii.org/trunk@28391 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/block_vector_base.h | 10 ++++++++++ deal.II/include/deal.II/lac/parallel_vector.h | 14 ++++++++++++-- deal.II/include/deal.II/lac/trilinos_vector_base.h | 9 +++++++++ deal.II/source/lac/petsc_vector_base.cc | 8 ++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/deal.II/include/deal.II/lac/block_vector_base.h b/deal.II/include/deal.II/lac/block_vector_base.h index 07e0a2e265..2eca83b4d2 100644 --- a/deal.II/include/deal.II/lac/block_vector_base.h +++ b/deal.II/include/deal.II/lac/block_vector_base.h @@ -1838,6 +1838,16 @@ BlockVectorBase::compress (::dealii::VectorOperation::values operati +template +inline +void +BlockVectorBase::compress () +{ + compress(VectorOperation::unknown); +} + + + template inline typename BlockVectorBase::iterator diff --git a/deal.II/include/deal.II/lac/parallel_vector.h b/deal.II/include/deal.II/lac/parallel_vector.h index 5a86258671..a99f840b48 100644 --- a/deal.II/include/deal.II/lac/parallel_vector.h +++ b/deal.II/include/deal.II/lac/parallel_vector.h @@ -293,9 +293,12 @@ namespace parallel * distributed vectors and matrices" * in the glossary. */ - void compress (::dealii::VectorOperation::values operation - =::dealii::VectorOperation::unknown); + void compress (::dealii::VectorOperation::values operation); + /** + * @deprecated: use compress(VectorOperation::values) instead. + */ + void compress () DEAL_II_DEPRECATED; /** * Fills the data field for ghost indices with @@ -1144,6 +1147,13 @@ namespace parallel compress_finish (true); } + template + inline + void + Vector::compress () + { + compress(VectorOperation::unknown); + } template diff --git a/deal.II/include/deal.II/lac/trilinos_vector_base.h b/deal.II/include/deal.II/lac/trilinos_vector_base.h index f29f5745f5..71dc754016 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector_base.h +++ b/deal.II/include/deal.II/lac/trilinos_vector_base.h @@ -1295,6 +1295,15 @@ namespace TrilinosWrappers + inline + void + VectorBase::compress () + { + compress(VectorOperation::unknown); + } + + + inline VectorBase & VectorBase::operator = (const TrilinosScalar s) diff --git a/deal.II/source/lac/petsc_vector_base.cc b/deal.II/source/lac/petsc_vector_base.cc index b6560781b0..4e3622e0e1 100644 --- a/deal.II/source/lac/petsc_vector_base.cc +++ b/deal.II/source/lac/petsc_vector_base.cc @@ -405,6 +405,14 @@ namespace PETScWrappers + void + VectorBase::compress () + { + compress(VectorOperation::unknown); + } + + + VectorBase::real_type VectorBase::norm_sqr () const { -- 2.39.5