From e956f6ff037e189ddc8455c1dbbb3c1830c598dc Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth
Date: Fri, 18 May 2001 08:37:20 +0000
Subject: [PATCH] Find gcc bug and fix the resulting invalid code.
git-svn-id: https://svn.dealii.org/trunk@4667 0785d39b-7218-0410-832d-ea1e28bc413d
---
deal.II/deal.II/source/dofs/dof_tools.cc | 36 ++++++++++++++++--------
deal.II/doc/news/2001/c-3-1.html | 11 +++++++-
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/deal.II/deal.II/source/dofs/dof_tools.cc b/deal.II/deal.II/source/dofs/dof_tools.cc
index d43032d5af..b6b5bb4dbe 100644
--- a/deal.II/deal.II/source/dofs/dof_tools.cc
+++ b/deal.II/deal.II/source/dofs/dof_tools.cc
@@ -946,7 +946,8 @@ template <>
void
DoFTools::extract_boundary_dofs (const DoFHandler<1> &dof_handler,
const std::vector &component_select,
- std::vector &selected_dofs)
+ std::vector &selected_dofs,
+ const std::set &boundary_indicators)
{
Assert (component_select.size() == dof_handler.get_fe().n_components(),
ExcWrongSize (component_select.size(),
@@ -959,23 +960,36 @@ DoFTools::extract_boundary_dofs (const DoFHandler<1> &dof_handler,
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; ivertex_dof_index(0,i)] = true;
+ if (check_left_vertex)
+ if (cell->neighbor(0) == dof_handler.end())
+ for (unsigned int i=0; ivertex_dof_index(0,i)] = true;
// check right-most vertex
- if (cell->neighbor(1) == dof_handler.end())
- for (unsigned int i=0; ivertex_dof_index(1,i)] = true;
+ if (check_right_vertex)
+ if (cell->neighbor(1) == dof_handler.end())
+ for (unsigned int i=0; ivertex_dof_index(1,i)] = true;
};
};
diff --git a/deal.II/doc/news/2001/c-3-1.html b/deal.II/doc/news/2001/c-3-1.html
index 07e1f8eb37..4948d4a040 100644
--- a/deal.II/doc/news/2001/c-3-1.html
+++ b/deal.II/doc/news/2001/c-3-1.html
@@ -239,7 +239,6 @@ documentation, etc.
(GK 2001/03/05)
-
Fix: Logstream
::pop()
does not perform anything on empty
stacks.
@@ -408,6 +407,16 @@ documentation, etc.
deal.II
+ -
+ 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
+ DoFTools::extract_boundary_dofs
+ function in 1d. That set was therefore ignored. This is now
+ fixed.
+
+ (WB 2001/05/18)
+
+
-
Changed: the flags which are given to the GridOut
class to modify the appearance of
--
2.39.5