*/
bool has_children () const;
+ /**
+ * Return the number of times that this
+ * cell is refined. Note that not all
+ * its children are refined that often
+ * (which is why we prepend #max_#),
+ * the returned number is rather the
+ * maximum number of refinement in
+ * any branch of children of this object.
+ */
+ unsigned int max_refinement_depth () const;
+
/**
* Return the boundary indicator of this
* line. Since boundary data is only useful
*/
bool has_children () const;
+ /**
+ * Return the number of times that this
+ * cell is refined. Note that not all
+ * its children are refined that often
+ * (which is why we prepend #max_#),
+ * the returned number is rather the
+ * maximum number of refinement in
+ * any branch of children of this object.
+ */
+ unsigned int max_refinement_depth () const;
+
/**
* Return the boundary indicator of this
* quad. Since boundary data is only useful
*/
bool has_children () const;
+ /**
+ * Return the number of times that this
+ * cell is refined. Note that not all
+ * its children are refined that often
+ * (which is why we prepend #max_#),
+ * the returned number is rather the
+ * maximum number of refinement in
+ * any branch of children of this object.
+ */
+ unsigned int max_refinement_depth () const;
+
/**
* Return the boundary indicator of this
* hex. Since boundary data is only useful
+template <int dim>
+inline
+unsigned int
+LineAccessor<dim>::max_refinement_depth () const
+{
+ if (!has_children())
+ return 0;
+
+ const unsigned int depths[2] = { child(0)->max_refinement_depth() + 1,
+ child(1)->max_refinement_depth() + 1 };
+ return max (depths[0], depths[1]);
+};
+
+
+
+
template <int dim>
inline
void
+template <int dim>
+inline
+unsigned int
+QuadAccessor<dim>::max_refinement_depth () const
+{
+ if (!has_children())
+ return 0;
+
+ const unsigned int depths[4] = { child(0)->max_refinement_depth() + 1,
+ child(1)->max_refinement_depth() + 1,
+ child(2)->max_refinement_depth() + 1,
+ child(3)->max_refinement_depth() + 1 };
+ return max (max (depths[0], depths[1]),
+ max (depths[2], depths[3]));
+};
+
+
+
template <int dim>
inline
void
+template <int dim>
+bool HexAccessor<dim>::has_children () const {
+ Assert (state() == valid, ExcDereferenceInvalidObject());
+ return (tria->levels[present_level]->hexes.children[present_index] != -1);
+};
+
+
+
+template <int dim>
+inline
+unsigned int
+HexAccessor<dim>::max_refinement_depth () const
+{
+ if (!has_children())
+ return 0;
+
+ const unsigned int depths[8] = { child(0)->max_refinement_depth() + 1,
+ child(1)->max_refinement_depth() + 1,
+ child(2)->max_refinement_depth() + 1,
+ child(3)->max_refinement_depth() + 1,
+ child(4)->max_refinement_depth() + 1,
+ child(5)->max_refinement_depth() + 1,
+ child(6)->max_refinement_depth() + 1,
+ child(7)->max_refinement_depth() + 1 };
+ return max (max (max (depths[0], depths[1]),
+ max (depths[2], depths[3])),
+ max (max (depths[4], depths[5]),
+ max (depths[6], depths[7])));
+};
+
+
template <int dim>
inline
void FEValuesBase<dim>::get_function_grads (const Vector<double> &fe_function,
vector<Tensor<1,dim> > &gradients) const
{
- Assert (fe->n_components == 1,
- ExcWrongNoOfComponents());
+// Assert (fe->n_components == 1,
+// ExcWrongNoOfComponents());
Assert (gradients.size() == n_quadrature_points,
ExcWrongVectorSize(gradients.size(), n_quadrature_points));
-template <int dim>
-bool HexAccessor<dim>::has_children () const {
- Assert (state() == valid, ExcDereferenceInvalidObject());
- return (tria->levels[present_level]->hexes.children[present_index] != -1);
-};
-
-
-
template <int dim>
unsigned char HexAccessor<dim>::boundary_indicator () const {
Assert (dim<4, ExcNotUsefulForThisDimension());