* boundary.
*/
void merge (const ConstraintMatrix &other_constraints);
+
+ /**
+ * Shift all entries of this
+ * matrix down @p{offset} rows
+ * and over @p{offset} columns.
+ *
+ * This function is useful if you
+ * are building block matrices,
+ * where all blocks are built by
+ * the same @p{DoFHandler}
+ * object, i.e. the matrix size
+ * is larger than the number of
+ * degrees of freedom. Since
+ * several matrix rows and
+ * columns correspond to the same
+ * degrees of freedom, you'd
+ * generate several constraint
+ * objects, then shift them, and
+ * finally @p{merge} them
+ * together again.
+ */
+ void shift (const unsigned int offset);
/**
* Clear all entries of this matrix. Reset
+void ConstraintMatrix::shift (const unsigned int offset)
+{
+ for (std::vector<ConstraintLine>::iterator i = lines.begin();
+ i != lines.end(); i++)
+ {
+ i->line += offset;
+ for (std::vector<std::pair<unsigned int,double> >::iterator
+ j = i->entries.begin();
+ j != i->entries.end(); j++)
+ j->first += offset;
+ }
+}
+
+
+
void ConstraintMatrix::clear ()
{
std::vector<ConstraintLine> tmp;
<h3>deal.II</h3>
<ol>
+ <li> <p>
+ New: The <code class="member">ConstraintMatrix::shift</code>
+ function shifts and translates the elements of the constraint
+ matrix by a certain number of indices.
+ <br>
+ (Roy Stogner 2003/02/24)
+ </p>
+
<li> <p>
New: The <code class="class">GridReordering</code> class now uses a
vastly better algorithm in 2d than previously. The new algorithm is