From: Wolfgang Bangerth Date: Fri, 27 Oct 2017 22:02:03 +0000 (-0600) Subject: Use appropriate data types to allow complex-valued vectors. X-Git-Tag: v9.0.0-rc1~860^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad1cab2f4fdb90c6e87bb60646187c4283db26a8;p=dealii.git Use appropriate data types to allow complex-valued vectors. --- diff --git a/include/deal.II/multigrid/multigrid.templates.h b/include/deal.II/multigrid/multigrid.templates.h index 7a1578e109..94a87afff1 100644 --- a/include/deal.II/multigrid/multigrid.templates.h +++ b/include/deal.II/multigrid/multigrid.templates.h @@ -223,7 +223,7 @@ Multigrid::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::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]); diff --git a/source/multigrid/mg_base.cc b/source/multigrid/mg_base.cc index 9ee558cb82..af82320c58 100644 --- a/source/multigrid/mg_base.cc +++ b/source/multigrid/mg_base.cc @@ -33,7 +33,7 @@ MGSmootherBase::apply (const unsigned int level, VectorType &u, const VectorType &rhs) const { - u = 0; + u = typename VectorType::value_type(0.); smooth(level, u, rhs); }