  #endif // #define __variable_h__
 Index: src/systems/system.C
 ===================================================================
---- src/systems/system.C	(revision 6500)
+--- src/systems/system.C	(revision 6517)
 +++ src/systems/system.C	(working copy)
 @@ -1073,53 +1073,86 @@
  			           const FEType& type,

+   * ncv = ncv_magic*nv + nc
+   * where nv are the number of identical variables of a given type,
+   * and nc is the number of components for this set of variables.
+   */
+  static const index_t ncv_magic = 1000;
+  
+  /**
    * The starting index for system \p s.
    */
   unsigned int start_idx(const unsigned int s) const;
@@ -527,6 +565,33 @@
 
 
 inline
+unsigned int DofObject::n_var_groups(const unsigned int s) const
+{
+  libmesh_assert_less (s, this->n_systems());
+
+  return (this->end_idx(s) - this->start_idx(s)) / 2;
+}
+
+
+
+inline
+unsigned int DofObject::n_vars(const unsigned int s,
+			       const unsigned int vg) const

   libmesh_assert_less (i, _variables.size());
Index: include/base/dof_object.h
===================================================================
--- include/base/dof_object.h	(revision 6517)
+++ include/base/dof_object.h	(working copy)
@@ -67,6 +67,7 @@
 
