]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use appropriate data types to allow complex-valued vectors.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Oct 2017 22:02:03 +0000 (16:02 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 27 Oct 2017 22:02:03 +0000 (16:02 -0600)
include/deal.II/multigrid/multigrid.templates.h
source/multigrid/mg_base.cc

index 7a1578e10958d48a7b142532cd189ec77bba8638..94a87afff1c1c9fb485f22293df8a66af08f5190 100644 (file)
@@ -223,7 +223,7 @@ Multigrid<VectorType>::level_step(const unsigned int level,
   // Combine the defect from the initial copy_to_mg with the one that has come
   // from the finer level by the transfer
   defect2[level] += defect[level];
-  defect[level] = 0;
+  defect[level] = typename VectorType::value_type(0.);
 
   if (debug>2)
     deallog << cychar << "-cycle defect norm     " << defect2[level].l2_norm()
@@ -264,7 +264,7 @@ Multigrid<VectorType>::level_step(const unsigned int level,
   if (edge_down != nullptr)
     edge_down->vmult(level, defect2[level-1], solution[level]);
   else
-    defect2[level-1] = 0;
+    defect2[level-1] = typename VectorType::value_type(0.);
 
   transfer->restrict_and_add (level, defect2[level-1], t[level]);
 
index 9ee558cb82013ec936fd7ffed73fc3e07dc0bc46..af82320c5837725fe74d275ca872b037a012b8f2 100644 (file)
@@ -33,7 +33,7 @@ MGSmootherBase<VectorType>::apply (const unsigned int level,
                                    VectorType         &u,
                                    const VectorType   &rhs) const
 {
-  u = 0;
+  u = typename VectorType::value_type(0.);
   smooth(level, u, rhs);
 }
 

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.