I am trying to run the step-32 example program (Boussinesq convection in
a spherical shell) and have been running into compilation problems.
Specifically, I get the following error upon trying to make the project
(making no changes to the code):

$HOME/dealii/deal.II-7.1.0/
include/deal.II/lac/trilinos_vector_base.h(84): error: implicitly
generated assignment operator cannot copy:
             reference member
"dealii::TrilinosWrappers::internal::VectorReference::vector"
             const member
"dealii::TrilinosWrappers::internal::VectorReference::index"
       class VectorReference
             ^
           detected during:
             implicit generation of
"dealii::TrilinosWrappers::internal::VectorReference
&dealii::TrilinosWrappers::internal::VectorReference::operator=(const
dealii::TrilinosWrappers::internal::VectorReference &)" at line 4031 of

Interesting. Does the attached patch help?
Best
 W.

------------------------------------------------------------------------
Wolfgang Bangerth               email:            [email protected]
                                www: http://www.math.tamu.edu/~bangerth/

Index: include/deal.II/lac/trilinos_vector_base.h
===================================================================
--- include/deal.II/lac/trilinos_vector_base.h  (revision 24738)
+++ include/deal.II/lac/trilinos_vector_base.h  (working copy)
@@ -121,6 +121,13 @@
        const VectorReference &
          operator = (const VectorReference &r) const;
 
+                                        /**
+                                         * Same as above but for non-const
+                                         * reference objects.
+                                         */
+       const VectorReference &
+         operator = (const VectorReference &r);
+
                                        /**
                                        * Set the referenced element of the
                                        * vector to <tt>s</tt>.
@@ -1043,6 +1050,17 @@
 
     inline
     const VectorReference &
+    VectorReference::operator = (const VectorReference &r)
+    {
+                                        // as above
+      *this = static_cast<TrilinosScalar> (r);
+
+      return *this;
+    }
+
+
+    inline
+    const VectorReference &
     VectorReference::operator = (const TrilinosScalar &value) const
     {
       vector.set (1, &index, &value);
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to