]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a function that asks for the maximum number of dof indirections.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 29 Mar 2000 14:14:49 +0000 (14:14 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 29 Mar 2000 14:14:49 +0000 (14:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@2638 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_constraints.h
deal.II/deal.II/source/dofs/dof_constraints.cc

index 6ad1c3995c72b81736a66abdfd18409a410c5cd8..1c6b88f5d15f409479dd920e371086fa4f175a4c 100644 (file)
@@ -178,6 +178,28 @@ class ConstraintMatrix : public Subscriptor
                                      * through all entries.
                                      */
     bool is_constrained (const unsigned int index) const;
+
+                                    /**
+                                     * Return the maximum number of
+                                     * other dofs that one dof is
+                                     * constrained to. For example,
+                                     * in 2d a hanging node is
+                                     * constrained only to its two
+                                     * neighbors, so the returned
+                                     * value would be #2#. However,
+                                     * for higher order elements
+                                     * and/or higher dimensions, or
+                                     * other types of constraints,
+                                     * this number is no more
+                                     * obvious.
+                                     *
+                                     * The name indicates that within
+                                     * the system matrix, references
+                                     * to a constrained node are
+                                     * indirected to the nodes it is
+                                     * constrained to.
+                                     */
+    unsigned int max_constraint_indirections () const;
     
                                     /**
                                      * Condense a given sparsity pattern. This
index 0c259e981174b9e9c10852c0eeee7d00021a9cd0..b1f2afbedce5d192e4c2d1f8a134479b5f1ad887 100644 (file)
@@ -370,6 +370,19 @@ bool ConstraintMatrix::is_constrained (const unsigned int index) const
 };
 
 
+
+unsigned int ConstraintMatrix::max_constraint_indirections () const 
+{
+  unsigned int return_value = 0;
+  for (vector<ConstraintLine>::const_iterator i=lines.begin();
+       i!=lines.end(); ++i)
+    return_value = max(return_value, i->entries.size());
+
+  return return_value;
+};
+
+    
+
 void ConstraintMatrix::print (ostream &out) const {
   for (unsigned int i=0; i!=lines.size(); ++i)
     for (unsigned int j=0; j!=lines[i].entries.size(); ++j)

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.