*/
unsigned int max_constraint_indirections () const;
+ /**
+ * Returns <tt>true</tt> in case the
+ * dof is constrained and there is a
+ * non-trivial inhomogeneous valeus set
+ * to the dof.
+ */
+ bool is_inhomogeneously_constrained (const unsigned int index) const;
+
/**
* Returns <tt>false</tt> if all
* constraints in the ConstraintMatrix
(constraint_line_exists[index] == true));
}
+
+
+inline
+bool
+ConstraintMatrix::is_inhomogeneously_constrained (const unsigned int index) const
+{
+ if (is_constrained(index) == false)
+ return false;
+
+ ConstraintLine index_comparison;
+ index_comparison.line = index;
+
+ const std::vector<ConstraintLine>::const_iterator
+ position = std::lower_bound (lines.begin(),
+ lines.end(),
+ index_comparison);
+ Assert (position != lines.end(), ExcInternalError());
+ return position->inhomogeneity != 0;
+}
+
DEAL_II_NAMESPACE_CLOSE
#endif
{
Assert (is_constrained(position_j->entries[q].first) == false,
ExcMessage ("Tried to distribute to a fixed dof."));
- global_vector(position_j->entries[j].first)
+ global_vector(position_j->entries[q].first)
-= val * position_j->entries[q].second * matrix_entry;
}
}