From f603b1e39d974543c2d095bf74ddf74691471ae8 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 13 Apr 2015 17:37:53 -0400 Subject: [PATCH] ConstraintMatrix copy explicit and disable assignment - make Copy constructor explicit - make conversion from IndexSet explicit - disable operator= --- include/deal.II/lac/constraint_matrix.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index 0f65eb79b3..773fda0ad6 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -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 &local_vector, const std::vector &local_dof_indices, const FullMatrix &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); }; -- 2.39.5