]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Implement a ConstraintMatrix::copy_from() function.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 22 Jul 2017 20:28:39 +0000 (14:28 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 22 Jul 2017 20:28:39 +0000 (14:28 -0600)
include/deal.II/lac/constraint_matrix.h
source/lac/constraint_matrix.cc

index 6c849277fe40bf46ea39824aba9829924b32098e..f720bd510cc351ca34464cabf18bd98e8d83a44b 100644 (file)
@@ -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
index bd084adf8e61cbbd803648281efe51a2bf08cec1..31694628e50d22f4171d04a9cbbb8e4588bfdd11 100644 (file)
@@ -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<size_type, double> &p)
 {

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.