]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Set a value to zero with correct number type 6067/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 20 Mar 2018 00:29:33 +0000 (19:29 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 20 Mar 2018 02:09:15 +0000 (21:09 -0500)
Otherwise deal.II fails to build with complex-valued PETSc scalar:

.../source/non_matching/coupling.cc:241:29: error: ambiguous overload for ‘operator=’
(operand types are ‘dealii::FullMatrix<std::complex<double> >’ and ‘int’)

                 cell_matrix = 0;
                 ~~~~~~~~~~~~^~~

source/non_matching/coupling.cc

index 2951c44e5600da6f8e08edefc6a88f572f1dc267..bd4ae01cc61feb971de2d97dc72b316cf0120f25 100644 (file)
@@ -238,7 +238,7 @@ namespace NonMatching
                 ocell->get_dof_indices(odofs);
 
                 // Reset the matrices.
-                cell_matrix = 0;
+                cell_matrix = typename Matrix::value_type();
 
                 for (unsigned int i=0; i<space_dh.get_fe().dofs_per_cell; ++i)
                   {

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.