From 6c4b2deda9761e5e8ba068044e7803086ed9095f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Fri, 18 Aug 2017 13:42:11 +0200 Subject: [PATCH] make an Assert in LA::distributed::Vector::compress_finish() less rigid --- include/deal.II/lac/la_parallel_vector.templates.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index d4489ca592..c98916c8d8 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -676,9 +676,15 @@ namespace LinearAlgebra for ( ; my_imports!=part.import_indices().end(); ++my_imports) for (unsigned int j=my_imports->first; jsecond; j++, read_position++) + // Below we use relatively large precision in units in the last place (ULP) as + // this Assert can be easily triggered in p::d::SolutionTransfer. + // The rationale is that during interpolation on two elements sharing + // the face, values on this face obtained from each side might + // be different due to additions being done in different order. Assert(*read_position == Number() || std::abs(local_element(j) - *read_position) <= - std::abs(local_element(j)) * 10000. * + std::abs(local_element(j) + *read_position) * + 100000. * std::numeric_limits::epsilon(), ExcNonMatchingElements(*read_position, local_element(j), part.this_mpi_process())); -- 2.39.5