]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use the appropriate type to state a zero. 6528/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 8 May 2018 08:35:32 +0000 (16:35 +0800)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 8 May 2018 10:44:27 +0000 (18:44 +0800)
Specifically, make sure that a statement also compiles if we are working with
complex-valued data.

include/deal.II/matrix_free/matrix_free.h

index ed36ce57725bc5fd278069f23e2c07cc84b7f82a..ef2d78fbc72d2e1ba15ac3a741b3f6824fdd8246 100644 (file)
@@ -2759,7 +2759,7 @@ namespace internal
                             LinearAlgebra::distributed::Vector<Number> &vec) const
     {
       if (range_index == numbers::invalid_unsigned_int)
-        vec = 0;
+        vec = Number();
       else
         {
           const unsigned int mf_component = find_vector_in_mf(vec, false);

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.