]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a check function for information about inhomogeneities.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 Aug 2009 13:44:51 +0000 (13:44 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 6 Aug 2009 13:44:51 +0000 (13:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@19186 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0eabd8754b6a4e9e8146dc3cd83c3ff14d2029db..8cb639138c7348f2b58580d67d67b92dcc1056d8 100644 (file)
@@ -606,8 +606,15 @@ class ConstraintMatrix : public Subscriptor
                                      */
     unsigned int max_constraint_indirections () const;
 
-    
-    
+                                    /**
+                                     * Returns <tt>false</tt> if all
+                                     * constraints in the ConstraintMatrix
+                                     * are homogeneous ones, and
+                                     * <tt>true</tt> if there is at least
+                                     * one inhomogeneity.
+                                     */
+    bool has_inhomogeneities () const;
+
                                     /**
                                      * Print the constraint lines. Mainly
                                      * for debugging purposes.
index 5bd0c374fe0c3a77e76efb0a4b75af10382f6c54..87d00d487cae7d94bbdf69f36b3d6b678e752509 100644 (file)
@@ -2005,6 +2005,17 @@ unsigned int ConstraintMatrix::max_constraint_indirections () const
   return return_value;
 }
 
+
+
+bool ConstraintMatrix::has_inhomogeneities () const
+{
+  for (std::vector<ConstraintLine>::const_iterator i=lines.begin();
+       i!=lines.end(); ++i)
+    if (i->inhomogeneity != 0.)
+      return true;
+
+  return false;
+}
     
 
 void ConstraintMatrix::print (std::ostream &out) 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.