]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compilation for complex-valued PETSc 4281/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 18 Apr 2017 20:53:46 +0000 (22:53 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 18 Apr 2017 21:01:17 +0000 (23:01 +0200)
include/deal.II/fe/fe_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools.templates.h

index 7fb69f1961c00f109557a2cd9330e18f3201c2c7..9b5819b661776356b6d519b1897f25aa702d82d4 100644 (file)
@@ -235,8 +235,9 @@ namespace FETools
                  ExcInternalError());
 
 
-          const double val = ::dealii::internal::ElementAccess<OutVector>::get(
-                               u2, i);
+          const typename OutVector::value_type val
+            = ::dealii::internal::ElementAccess<OutVector>::get(
+                u2, i);
           ::dealii::internal::ElementAccess<OutVector>::set(
             val/::dealii::internal::ElementAccess<OutVector>::get(touch_count,i), i, u2);
         }
index 86be34fa0da71e7f3babbb2a242f4313d047c921..cc33c938fb462422c207c2238b7177adcd010f23 100644 (file)
@@ -358,12 +358,12 @@ namespace VectorTools
       {
         Assert (touch_count[i] != 0,
                 ExcInternalError());
-
-        const double val = ::dealii::internal::ElementAccess<OutVector>::get(
-                             data_2, i);
+        typedef typename OutVector::value_type value_type;
+        const value_type val
+          = ::dealii::internal::ElementAccess<OutVector>::get(data_2, i);
 
         ::dealii::internal::ElementAccess<OutVector>::set(
-          val/touch_count[i], i, data_2);
+          val/static_cast<value_type>(touch_count[i]), i, data_2);
       }
   }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.