]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fixed VectorTools::create_boundary_right_hand_side() with empty boundary_indicators.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Aug 2011 21:57:45 +0000 (21:57 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Aug 2011 21:57:45 +0000 (21:57 +0000)
Fixed: The functions VectorTools::create_boundary_right_hand_side()
called with an empty set of boundary_indicators (the default), did not apply
any boundary conditions. The empty set now applies it to all boundaries.

git-svn-id: https://svn.dealii.org/trunk@24078 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/include/deal.II/numerics/vectors.h
deal.II/include/deal.II/numerics/vectors.templates.h

index 8717958f3b5c216f8c69d4d1b135f09eff12cf65..25db8bea52c7455cb06aa9df9bc722251f1fdee5 100644 (file)
@@ -268,6 +268,12 @@ and DoF handlers embedded in higher dimensional space have been added.
 <h3>Specific improvements</h3>
 
 <ol>
+<li> Fixed: The functions VectorTools::create_boundary_right_hand_side()
+called with an empty set of boundary_indicators (the default), did not apply
+any boundary conditions. The empty set now applies it to all boundaries.
+<br>
+(Timo Heister, Sebastian Pauletti, 2011/08/15)
+
 <li> Fixed: The function VectorTools::compute_no_normal_flux_constraints had
 a bug that led to an exception whenever we were computing constraints for
 vector fields located on edges shared between two faces of a 3d cell if those
index 3b74811600e977982812057f02ad39eaf66a41ae..d1de0b84c05d55832cd81136ed09ee6acf139357 100644 (file)
@@ -185,7 +185,8 @@ class ConstraintMatrix;
  *   inhomogeneous Neumann boundary values in Laplace's equation or
  *   other second order operators. This function also takes an
  *   optional argument denoting over which parts of the boundary the
- *   integration shall extend.
+ *   integration shall extend. If the default argument is used, it is applied
+ *   to all boundaries.
  *
  * <li> Interpolation of boundary values:
  *   The MatrixTools::apply_boundary_values() function takes a list
index 6c12bd2f8916de76defbfb700a180efb53079141..62292846b43ea1ddf698b2cb620797526ba4e213 100644 (file)
@@ -54,6 +54,7 @@
 #include <vector>
 #include <cmath>
 #include <limits>
+#include <set>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -964,9 +965,10 @@ VectorTools::create_boundary_right_hand_side (const Mapping<dim, spacedim>
       for (; cell!=endc; ++cell)
        for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
          if (cell->face(face)->at_boundary () &&
+                 (boundary_indicators.empty() ||
              (boundary_indicators.find (cell->face(face)->boundary_indicator())
               !=
-              boundary_indicators.end()))
+              boundary_indicators.end())))
            {
              fe_values.reinit(cell, face);
 
@@ -993,9 +995,10 @@ VectorTools::create_boundary_right_hand_side (const Mapping<dim, spacedim>
       for (; cell!=endc; ++cell)
        for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
          if (cell->face(face)->at_boundary () &&
+                 (boundary_indicators.empty() ||
              (boundary_indicators.find (cell->face(face)->boundary_indicator())
               !=
-              boundary_indicators.end()))
+              boundary_indicators.end())))
            {
              fe_values.reinit(cell, face);
 
@@ -1132,9 +1135,10 @@ VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<dim,sp
       for (; cell!=endc; ++cell)
        for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
          if (cell->face(face)->at_boundary () &&
+                 (boundary_indicators.empty() ||
              (boundary_indicators.find (cell->face(face)->boundary_indicator())
               !=
-              boundary_indicators.end()))
+              boundary_indicators.end())))
            {
              x_fe_values.reinit(cell, face);
 
@@ -1168,9 +1172,10 @@ VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<dim,sp
       for (; cell!=endc; ++cell)
        for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
          if (cell->face(face)->at_boundary () &&
+                 (boundary_indicators.empty() ||
              (boundary_indicators.find (cell->face(face)->boundary_indicator())
               !=
-              boundary_indicators.end()))
+              boundary_indicators.end())))
            {
              x_fe_values.reinit(cell, face);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.