*/
unsigned int n_used_vertices () const;
+ /**
+ * Return @p true if the vertex
+ * with this @p index is used.
+ */
+ bool vertex_used (unsigned int index) const;
+
/**
* Return a constant reference to
* the array of @p bools
friend class TriaRawIterator<3,CellAccessor<3> >;
friend class hp::DoFHandler<dim>;
- friend class MGDoFHandler<dim>;
};
+#ifndef DOXYGEN
+
+template <int dim>
+inline
+bool
+Triangulation<dim>::vertex_used(const unsigned int index) const
+{
+ Assert (index < vertices_used.size(),
+ ExcIndexRange(index, 0, vertices_used.size()));
+ return vertices_used[index];
+}
+
+
/* -------------- declaration of explicit specializations ------------- */
-#ifndef DOXYGEN
+
template <> Triangulation<1>::cell_iterator Triangulation<1>::begin (const unsigned int level) const;
template <> Triangulation<1>::raw_cell_iterator Triangulation<1>::end () const;
template <> unsigned int Triangulation<3>::n_active_cells (const unsigned int level) const;
template <> unsigned int Triangulation<1>::n_quads () const;
template <> unsigned int Triangulation<1>::n_quads (const unsigned int) const;
+template <> unsigned int Triangulation<1>::n_raw_quads (const unsigned int) const;
+template <> unsigned int Triangulation<1>::n_raw_hexs (const unsigned int) const;
template <> unsigned int Triangulation<1>::n_active_quads (const unsigned int) const;
template <> unsigned int Triangulation<1>::n_active_quads () const;
template <> unsigned int Triangulation<1>::max_adjacent_cells () const;
else
// if index is invalid_dof_index: check if this one
// really is unused
-// Assert (tria->vertices_used[(i-vertex_dofs.begin()) /
-// selected_fe->dofs_per_vertex] == false,
-// ExcInternalError ());
+ Assert (tria->vertex_used((i-vertex_dofs.begin()) /
+ selected_fe->dofs_per_vertex) == false,
+ ExcInternalError ());
for (unsigned int level=0; level<levels.size(); ++level)
for (std::vector<unsigned int>::iterator i=levels[level]->line_dofs.begin();
else
// if index is invalid_dof_index: check if this one
// really is unused
-// Assert (tria->vertices_used[(i-vertex_dofs.begin()) /
-// selected_fe->dofs_per_vertex] == false,
-// ExcInternalError ());
+ Assert (tria->vertex_used((i-vertex_dofs.begin()) /
+ selected_fe->dofs_per_vertex) == false,
+ ExcInternalError ());
for (unsigned int level=0; level<levels.size(); ++level)
{
else
// if index is invalid_dof_index: check if this one
// really is unused
-// Assert (tria->vertices_used[(i-vertex_dofs.begin()) /
-// selected_fe->dofs_per_vertex] == false,
-// ExcInternalError ());
+ Assert (tria->vertex_used((i-vertex_dofs.begin()) /
+ selected_fe->dofs_per_vertex) == false,
+ ExcInternalError ());
for (unsigned int level=0; level<levels.size(); ++level)
{
{
levels.push_back (new internal::DoFHandler::DoFLevel<1>);
- levels.back()->line_dofs
- = std::vector<unsigned int>(tria->n_raw_lines(i) *
- selected_fe->dofs_per_line,
- invalid_dof_index);
- }
+ levels.back()->line_dofs = std::vector<unsigned int>(tria->n_raw_lines(i) *
+ selected_fe->dofs_per_line,
+ invalid_dof_index);
+ };
}
{
levels.push_back (new internal::DoFHandler::DoFLevel<2>);
- levels.back()->line_dofs
- = std::vector<unsigned int> (tria->n_raw_lines(i) *
- selected_fe->dofs_per_line,
- invalid_dof_index);
- levels.back()->quad_dofs
- = std::vector<unsigned int> (tria->n_raw_quads(i) *
- selected_fe->dofs_per_quad,
- invalid_dof_index);
+ levels.back()->line_dofs = std::vector<unsigned int> (tria->n_raw_lines(i) *
+ selected_fe->dofs_per_line,
+ invalid_dof_index);
+ levels.back()->quad_dofs = std::vector<unsigned int> (tria->n_raw_quads(i) *
+ selected_fe->dofs_per_quad,
+ invalid_dof_index);
};
}
{
levels.push_back (new internal::DoFHandler::DoFLevel<3>);
- levels.back()->line_dofs
- = std::vector<unsigned int> (tria->n_raw_lines(i) *
- selected_fe->dofs_per_line,
- invalid_dof_index);
- levels.back()->quad_dofs
- = std::vector<unsigned int> (tria->n_raw_quads(i) *
- selected_fe->dofs_per_quad,
- invalid_dof_index);
- levels.back()->hex_dofs
- = std::vector<unsigned int> (tria->n_raw_hexs(i) *
- selected_fe->dofs_per_hex,
- invalid_dof_index);
+ levels.back()->line_dofs = std::vector<unsigned int> (tria->n_raw_lines(i) *
+ selected_fe->dofs_per_line,
+ invalid_dof_index);
+ levels.back()->quad_dofs = std::vector<unsigned int> (tria->n_raw_quads(i) *
+ selected_fe->dofs_per_quad,
+ invalid_dof_index);
+ levels.back()->hex_dofs = std::vector<unsigned int> (tria->n_raw_hexs(i) *
+ selected_fe->dofs_per_hex,
+ invalid_dof_index);
};
}