void
DoFTools::extract_boundary_dofs (const DoFHandler<1> &dof_handler,
const std::vector<bool> &component_select,
- std::vector<bool> &selected_dofs)
+ std::vector<bool> &selected_dofs,
+ const std::set<unsigned char> &boundary_indicators)
{
Assert (component_select.size() == dof_handler.get_fe().n_components(),
ExcWrongSize (component_select.size(),
Assert (dof_handler.get_fe().dofs_per_face == dof_handler.get_fe().dofs_per_vertex,
ExcInternalError());
+
+ // let's see whether we have to
+ // check for certain boundary
+ // indicators or whether we can
+ // accept all
+ const bool check_left_vertex = ((boundary_indicators.size() == 0) ||
+ (boundary_indicators.find(0) !=
+ boundary_indicators.end()));
+ const bool check_right_vertex = ((boundary_indicators.size() == 0) ||
+ (boundary_indicators.find(1) !=
+ boundary_indicators.end()));
// loop over coarse grid cells
for (DoFHandler<1>::cell_iterator cell=dof_handler.begin(0);
cell!=dof_handler.end(0); ++cell)
{
// check left-most vertex
- if (cell->neighbor(0) == dof_handler.end())
- for (unsigned int i=0; i<dof_handler.get_fe().dofs_per_face; ++i)
- if (component_select[dof_handler.get_fe().
- face_system_to_component_index(i).first] == true)
- selected_dofs[cell->vertex_dof_index(0,i)] = true;
+ if (check_left_vertex)
+ if (cell->neighbor(0) == dof_handler.end())
+ for (unsigned int i=0; i<dof_handler.get_fe().dofs_per_face; ++i)
+ if (component_select[dof_handler.get_fe().
+ face_system_to_component_index(i).first] == true)
+ selected_dofs[cell->vertex_dof_index(0,i)] = true;
// check right-most vertex
- if (cell->neighbor(1) == dof_handler.end())
- for (unsigned int i=0; i<dof_handler.get_fe().dofs_per_face; ++i)
- if (component_select[dof_handler.get_fe().
- face_system_to_component_index(i).first] == true)
- selected_dofs[cell->vertex_dof_index(1,i)] = true;
+ if (check_right_vertex)
+ if (cell->neighbor(1) == dof_handler.end())
+ for (unsigned int i=0; i<dof_handler.get_fe().dofs_per_face; ++i)
+ if (component_select[dof_handler.get_fe().
+ face_system_to_component_index(i).first] == true)
+ selected_dofs[cell->vertex_dof_index(1,i)] = true;
};
};
(GK 2001/03/05)
</p>
-
<li> <p> Fix: <code class="class">Logstream</code>::<code
class="member">pop()</code> does not perform anything on empty
stacks.
<h3>deal.II</h3>
<ol>
+ <li> <p>
+ Fixed: due to a bug in gcc, the compiler did not check that we
+ did not use the set of given boundary indicators to the
+ <code class="member">DoFTools::extract_boundary_dofs</code>
+ function in 1d. That set was therefore ignored. This is now
+ fixed.
+ <br>
+ (WB 2001/05/18)
+ </p>
+
<li> <p>
Changed: the flags which are given to the <code
class="class">GridOut</code> class to modify the appearance of