]> https://gitweb.dealii.org/ - dealii.git/commitdiff
minor change to fe_tools_interpolate to allow complex-valued vectors 2220/head
authorDenis Davydov <davydden@gmail.com>
Mon, 22 Feb 2016 12:42:32 +0000 (13:42 +0100)
committerDenis Davydov <davydden@gmail.com>
Mon, 22 Feb 2016 15:14:51 +0000 (16:14 +0100)
source/fe/fe_tools_interpolate.cc

index 1a611c65216122bc7aa9a8e49645c2bba838ff6f..b3ddcfd21e5d18acda6272715174861df3d10f30 100644 (file)
@@ -222,7 +222,7 @@ namespace FETools
     for (types::global_dof_index i=0; i<dof2.n_dofs(); ++i)
       if (locally_owned_dofs.is_element(i))
         {
-          Assert(touch_count(i) != typename OutVector::value_type(),
+          Assert(static_cast<typename OutVector::value_type>(touch_count(i)) != typename OutVector::value_type(0),
                  ExcInternalError());
           u2(i) /= touch_count(i);
         }
@@ -714,8 +714,8 @@ namespace FETools
     const unsigned int n1 = dof1.get_fe().dofs_per_cell;
     const unsigned int n2 = dof2.get_fe().dofs_per_cell;
 
-    Vector<double> u1_local(n1);
-    Vector<double> u2_local(n2);
+    Vector<typename OutVector::value_type> u1_local(n1);
+    Vector<typename OutVector::value_type> u2_local(n2);
     std::vector<types::global_dof_index> dofs(n2);
 
     FullMatrix<double> matrix(n2,n1);

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.