From 1bc39551d0b01e409443991ea328ee610d8b845e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 28 Oct 2013 21:06:47 +0000 Subject: [PATCH] fix DerivativeApproximation in parallel git-svn-id: https://svn.dealii.org/trunk@31473 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 6 ++++++ deal.II/include/deal.II/numerics/derivative_approximation.h | 6 ++++-- deal.II/source/numerics/derivative_approximation.cc | 6 ++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index a2277474cb..ac3ebd69e1 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -174,6 +174,12 @@ inconvenience this causes.

Specific improvements

    +
  1. + Fixed: the DerivativeApproximation class was not working correctly when + used with parallel vectors. + (Timo Heister, 2013/10/28) +
  2. +
  3. ~Subscriptor and ~GrowingVectorMemory no longer throw an exception (the former if disable_abort_on_exception was called) to be compatible with the diff --git a/deal.II/include/deal.II/numerics/derivative_approximation.h b/deal.II/include/deal.II/numerics/derivative_approximation.h index 3b47dd3904..72dbe95895 100644 --- a/deal.II/include/deal.II/numerics/derivative_approximation.h +++ b/deal.II/include/deal.II/numerics/derivative_approximation.h @@ -24,6 +24,8 @@ #include #include #include +#include + #include DEAL_II_NAMESPACE_OPEN @@ -676,8 +678,8 @@ private: template class DH, class InputVector, int spacedim> static void - approximate (SynchronousIterators - ::active_cell_iterator,Vector::iterator> > const &cell, + approximate (SynchronousIterators::active_cell_iterator>, + Vector::iterator> > const &cell, const Mapping &mapping, const DH &dof, const InputVector &solution, diff --git a/deal.II/source/numerics/derivative_approximation.cc b/deal.II/source/numerics/derivative_approximation.cc index cb8825c807..a3311a4961 100644 --- a/deal.II/source/numerics/derivative_approximation.cc +++ b/deal.II/source/numerics/derivative_approximation.cc @@ -651,7 +651,7 @@ approximate_derivative (const Mapping &mapping, // Only act on the locally owned cells typedef FilteredIterator::active_cell_iterator> CellFilter; - typedef std_cxx1x::tuple::active_cell_iterator,Vector::iterator> + typedef std_cxx1x::tuple::iterator> Iterators; SynchronousIterators begin(Iterators (CellFilter(IteratorFilters::LocallyOwnedCell(), dof_handler.begin_active()),derivative_norm.begin())), @@ -679,8 +679,7 @@ approximate_derivative (const Mapping &mapping, template class DH, class InputVector, int spacedim> void -DerivativeApproximation::approximate (SynchronousIterators - ::active_cell_iterator,Vector::iterator> > const &cell, +DerivativeApproximation::approximate (SynchronousIterators::active_cell_iterator>,Vector::iterator> > const &cell, const Mapping &mapping, const DH &dof_handler, const InputVector &solution, @@ -760,7 +759,6 @@ approximate_cell (const Mapping &mapping, // ...and the place where it lives const Point this_center = fe_midpoint_value.quadrature_point(0); - // loop over all neighbors and // accumulate the difference // quotients from them. note -- 2.39.5