]> https://gitweb.dealii.org/ - dealii.git/commitdiff
ConstraintMatrix copy explicit and disable assignment 793/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 13 Apr 2015 21:37:53 +0000 (17:37 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 13 Apr 2015 21:37:53 +0000 (17:37 -0400)
- make Copy constructor explicit
- make conversion from IndexSet explicit
- disable operator=

include/deal.II/lac/constraint_matrix.h

index 0f65eb79b3da5f58db92d7e1525f75ae7382de26..773fda0ad6bec31348897849c6e8c978563e1e9d 100644 (file)
@@ -181,12 +181,12 @@ public:
    * The IndexSet allows the ConstraintMatrix to save memory. Otherwise
    * internal data structures for all possible indices will be created.
    */
-  ConstraintMatrix (const IndexSet &local_constraints = IndexSet());
+  explicit ConstraintMatrix (const IndexSet &local_constraints = IndexSet());
 
   /**
    * Copy constructor
    */
-  ConstraintMatrix (const ConstraintMatrix &constraint_matrix);
+  explicit ConstraintMatrix (const ConstraintMatrix &constraint_matrix);
 
   /**
    * clear() the ConstraintMatrix object and supply an IndexSet with lines
@@ -1318,6 +1318,12 @@ private:
                         const Vector<double>                 &local_vector,
                         const std::vector<size_type>         &local_dof_indices,
                         const FullMatrix<double>             &local_matrix) const;
+
+  /**
+   * The assignment operator is not implemented for performance reasons. You
+   * can clear() or reinit() and merge() manually if needed.
+   */
+  ConstraintMatrix &operator= (const ConstraintMatrix &other);
 };
 
 

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.