From 496d65acf1d08255ffbe7df79ec1a908dd9faae3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 22 Jul 2017 14:28:39 -0600 Subject: [PATCH] Implement a ConstraintMatrix::copy_from() function. --- include/deal.II/lac/constraint_matrix.h | 8 ++++++++ source/lac/constraint_matrix.cc | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index 6c849277fe..f720bd510c 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -202,6 +202,14 @@ public: */ ConstraintMatrix &operator= (ConstraintMatrix &&constraint_matrix) = default; + /** + * Copy the given object to the current one. + * + * This function exists because @p operator=() is explicitly + * disabled. + */ + void copy_from (const ConstraintMatrix &other); + /** * clear() the ConstraintMatrix object and supply an IndexSet with lines * that may be constrained. This function is only relevant in the diff --git a/source/lac/constraint_matrix.cc b/source/lac/constraint_matrix.cc index bd084adf8e..31694628e5 100644 --- a/source/lac/constraint_matrix.cc +++ b/source/lac/constraint_matrix.cc @@ -52,6 +52,17 @@ const Table<2,bool> ConstraintMatrix::default_empty_table = Table<2,bool>(); +void +ConstraintMatrix::copy_from (const ConstraintMatrix &other) +{ + lines = other.lines; + lines_cache = other.lines_cache; + local_lines = other.local_lines; + sorted = other.sorted; +} + + + bool ConstraintMatrix::check_zero_weight (const std::pair &p) { -- 2.39.5