]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add VectorBase::minimal_value.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Feb 2011 20:50:19 +0000 (20:50 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 16 Feb 2011 20:50:19 +0000 (20:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@23380 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 27188dd76aaabea1661c2cb7708cadeb39bd2783..0bff5bc6955c9142017cd99270f3d0a025983175 100644 (file)
@@ -503,6 +503,12 @@ namespace TrilinosWrappers
                                         */
       TrilinosScalar mean_value () const;
 
+                                       /**
+                                        * Compute the minimal value of
+                                        * the elements of this vector.
+                                        */
+      TrilinosScalar minimal_value () const;
+
                                        /**
                                         * $l_1$-norm of the vector.  The
                                         * sum of the absolute values.
@@ -1396,6 +1402,19 @@ namespace TrilinosWrappers
 
 
 
+  inline
+  TrilinosScalar
+  VectorBase::minimal_value () const
+  {
+    TrilinosScalar min_value;
+    const int ierr = vector->MinValue (&min_value);
+    AssertThrow (ierr == 0, ExcTrilinosError(ierr));
+
+    return min_value;
+  }
+
+
+
   inline
   VectorBase::real_type
   VectorBase::l1_norm () const

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.