*/
virtual std::string get_name () const = 0;
+ /**
+ * This operator returns a
+ * reference to the present
+ * object if the argument given
+ * equals to zero. While this
+ * does not seem particularly
+ * useful, it is helpful in
+ * writing code that works with
+ * both ::DoFHandler and the hp
+ * version hp::DoFHandler, since
+ * one can then write code like
+ * this:
+ * @verbatim
+ * dofs_per_cell
+ * = dof_handler->get_fe()[cell->active_fe_index()].dofs_per_cell;
+ * @endverbatim
+ *
+ * This code doesn't work in both
+ * situations without the present
+ * operator because
+ * DoFHandler::get_fe() returns a
+ * finite element, whereas
+ * hp::DoFHandler::get_fe()
+ * returns a collection of finite
+ * elements that doesn't offer a
+ * <code>dofs_per_cell</code>
+ * member variable: one first has
+ * to select which finite element
+ * to work on, which is done
+ * using the
+ * operator[]. Fortunately,
+ * <code>cell-@>active_fe_index()</code>
+ * also works for non-hp classes
+ * and simply returns zero in
+ * that case. The present
+ * operator[] accepts this zero
+ * argument, by returning the
+ * finite element with index zero
+ * within its collection (that,
+ * of course, consists only of
+ * the present finite element
+ * anyway).
+ */
+ const FiniteElement<dim> & operator[] (const unsigned int fe_index) const;
+
/**
* @name Shape function access
* @{
//----------------------------------------------------------------------//
+
+template <int dim>
+inline
+const FiniteElement<dim> &
+FiniteElement<dim>::operator[] (const unsigned int fe_index) const
+{
+ Assert (fe_index == 0,
+ ExcMessage ("A fe_index of zero is the only index allowed here"));
+ return *this;
+}
+
+
+
template <int dim>
inline
std::pair<unsigned int,unsigned int>
return system_to_component_table[index];
}
+
+
template <int dim>
inline
unsigned int
}
+
template <int dim>
inline
std::pair<unsigned int,unsigned int>
}
+
template <int dim>
inline
std::pair<unsigned int,unsigned int>
}
+
template <int dim>
inline
std::pair<unsigned int,unsigned int>
}
+
template <int dim>
inline
bool
}
+
template <int dim>
inline
const std::vector<bool> &
}
+
template <int dim>
inline
bool