From: heister Date: Mon, 28 Oct 2013 21:06:47 +0000 (+0000) Subject: fix DerivativeApproximation in parallel X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2414cd4aa783ff37721433a7108e379b306f7fa;p=dealii-svn.git fix DerivativeApproximation in parallel git-svn-id: https://svn.dealii.org/trunk@31473 0785d39b-7218-0410-832d-ea1e28bc413d --- 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