]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added a reinit function.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Sep 2008 13:58:52 +0000 (13:58 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Sep 2008 13:58:52 +0000 (13:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@16908 0785d39b-7218-0410-832d-ea1e28bc413d

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

index efe0d9eb49dab09be6306845c8d851bcc36fcdbd..5b64b1ca24dccd5526c5ee4b2a6d66e6a6fe5c2f 100644 (file)
@@ -294,6 +294,17 @@ namespace TrilinosWrappers
                                         */
       void clear ();
 
+                                      /**
+                                       * Reinit functionality, sets
+                                       * the dimension and the
+                                       * possibly parallel
+                                       * partitioning (Epetra_Map) of
+                                       * the calling vector the value
+                                       * of the input vector.
+                                       */
+      void reinit (const VectorBase &v,
+                  const bool        fast = false);
+
                                        /**
                                         * Compress the underlying
                                         * representation of the Trilinos
index a3b49cb309a9e7ff7ff9f7a34d83d0687ece2b22..2522478eab81da42b795d06a661ef4ae4ad323c9 100644 (file)
@@ -103,6 +103,17 @@ namespace TrilinosWrappers
 
 
 
+  void
+  VectorBase::reinit (const VectorBase &v,
+                     const bool        fast)
+  {
+    (void)fast;
+    if (&*vector != 0)
+      vector = std::auto_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
+    else if (vector->Map().SameAs(v.vector->Map()) == false)
+      vector = std::auto_ptr<Epetra_FEVector>(new Epetra_FEVector(*v.vector));
+  }
+
   void
   VectorBase::compress ()
   {

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.