From: Daniel Arndt Date: Tue, 18 Apr 2017 20:53:46 +0000 (+0200) Subject: Fix compilation for complex-valued PETSc X-Git-Tag: v9.0.0-rc1~1676^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=341626d2d52629445feaa193ba64576ea96ff671;p=dealii.git Fix compilation for complex-valued PETSc --- diff --git a/include/deal.II/fe/fe_tools_interpolate.templates.h b/include/deal.II/fe/fe_tools_interpolate.templates.h index 7fb69f1961..9b5819b661 100644 --- a/include/deal.II/fe/fe_tools_interpolate.templates.h +++ b/include/deal.II/fe/fe_tools_interpolate.templates.h @@ -235,8 +235,9 @@ namespace FETools ExcInternalError()); - const double val = ::dealii::internal::ElementAccess::get( - u2, i); + const typename OutVector::value_type val + = ::dealii::internal::ElementAccess::get( + u2, i); ::dealii::internal::ElementAccess::set( val/::dealii::internal::ElementAccess::get(touch_count,i), i, u2); } diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 86be34fa0d..cc33c938fb 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -358,12 +358,12 @@ namespace VectorTools { Assert (touch_count[i] != 0, ExcInternalError()); - - const double val = ::dealii::internal::ElementAccess::get( - data_2, i); + typedef typename OutVector::value_type value_type; + const value_type val + = ::dealii::internal::ElementAccess::get(data_2, i); ::dealii::internal::ElementAccess::set( - val/touch_count[i], i, data_2); + val/static_cast(touch_count[i]), i, data_2); } }