]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement a copy_from function.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Aug 2008 21:31:45 +0000 (21:31 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Aug 2008 21:31:45 +0000 (21:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@16678 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/trilinos_sparse_matrix.h
deal.II/lac/source/trilinos_sparse_matrix.cc

index 1e15b143fde574ca6ce9e728723dfd099526a236..14ba1f47842c7c3ae8f2c0296ff99fdc283e70ac 100755 (executable)
@@ -414,6 +414,16 @@ namespace TrilinosWrappers
                                         */
       virtual ~SparseMatrix ();
 
+                                      /**
+                                       * Copy the given matrix to this
+                                       * one.
+                                       *
+                                       * The function returns a reference to
+                                       * <tt>*this</tt>.
+                                       */
+      SparseMatrix &
+      copy_from (const SparseMatrix &source);
+
                                        /**
                                         * This function initializes the
                                        * Trilinos matrix with a deal.II
index 0c4b9ccdbfa402f40d9ad843f17b0e37784e23eb..e04d300dbd35bb6d328818a7f9a0c2cbe00f9390 100755 (executable)
@@ -146,6 +146,15 @@ namespace TrilinosWrappers
 
 
 
+  SparseMatrix &
+  SparseMatrix::copy_from (const SparseMatrix &m)
+  {
+    *matrix = *m.matrix;
+    return *this;
+  }
+  
+
+
   void
   SparseMatrix::reinit (const SparsityPattern &sparsity_pattern)
   {

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.