*/
unsigned int n_dofs_per_cell () const;
+ /**
+ * Return the number of degrees
+ * per structdim-dimensional
+ * object. For structdim==0, the
+ * function therefore returns
+ * dofs_per_vertex, for
+ * structdim==1 dofs_per_line,
+ * etc. This function is mostly
+ * used to allow some template
+ * trickery for functions that
+ * should work on all sorts of
+ * objects without wanting to use
+ * the different names (vertex,
+ * line, ...) associated with
+ * these objects.
+ */
+ template <int structdim>
+ unsigned int n_dofs_per_object () const;
+
/**
* Number of components.
*/
}
+
+template <int dim>
+template <int structdim>
+inline
+unsigned int
+FiniteElementData<dim>::n_dofs_per_object () const
+{
+ switch (structdim)
+ {
+ case 0:
+ return dofs_per_vertex;
+ case 1:
+ return dofs_per_line;
+ case 2:
+ return dofs_per_quad;
+ case 3:
+ return dofs_per_hex;
+ default:
+ Assert (false, ExcInternalError());
+ }
+ return deal_II_numbers::invalid_unsigned_int;
+}
+
+
template <int dim>
inline
unsigned int
<ol>
<li> <p>
- Changed: <code
+ New: The new function <code class="class">FiniteElementBase</code>::<code
+ class="member">n_dofs_per_object</code> returns either
+ <code>dofs_per_vertex</code>, <code>dofs_per_line</code>,
+ <code>dofs_per_quad</code>, ..., depending on the explicitly
+ specified function template argument. This is often useful for
+ template trickery.
+ <br>
+ (WB, 2006/07/28)
+ </p>
+
+ <li> <p>
+ Fixed: <code
class="member">Triangulation<dim>::fix_coarsen_flags</code>
has been modified to allow coarsening in all possible cases. Up
to now, coarsening was forbidden, if the neighbor cell was not refined
class="member">lines()</code> and <code
class="class">TriaObjectAccessor<2,dim></code>::<code
class="member">quads()</code> functions. By using these
- functions, 30 function specializations could have been removed,
+ functions, 30 function specializations could be removed,
significantly reducing code duplication.
<br>
(RH 2006/06/13)