From: heister Date: Mon, 15 Aug 2011 21:57:45 +0000 (+0000) Subject: fixed VectorTools::create_boundary_right_hand_side() with empty boundary_indicators. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c477f35480fede1d011829e259f2a0ea5e04148;p=dealii-svn.git fixed VectorTools::create_boundary_right_hand_side() with empty boundary_indicators. 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 --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 8717958f3b..25db8bea52 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -268,6 +268,12 @@ and DoF handlers embedded in higher dimensional space have been added.

Specific improvements

    +
  1. 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. +
    +(Timo Heister, Sebastian Pauletti, 2011/08/15) +
  2. 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 diff --git a/deal.II/include/deal.II/numerics/vectors.h b/deal.II/include/deal.II/numerics/vectors.h index 3b74811600..d1de0b84c0 100644 --- a/deal.II/include/deal.II/numerics/vectors.h +++ b/deal.II/include/deal.II/numerics/vectors.h @@ -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. * *
  3. Interpolation of boundary values: * The MatrixTools::apply_boundary_values() function takes a list diff --git a/deal.II/include/deal.II/numerics/vectors.templates.h b/deal.II/include/deal.II/numerics/vectors.templates.h index 6c12bd2f89..62292846b4 100644 --- a/deal.II/include/deal.II/numerics/vectors.templates.h +++ b/deal.II/include/deal.II/numerics/vectors.templates.h @@ -54,6 +54,7 @@ #include #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -964,9 +965,10 @@ VectorTools::create_boundary_right_hand_side (const Mapping for (; cell!=endc; ++cell) for (unsigned int face=0; face::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 for (; cell!=endc; ++cell) for (unsigned int face=0; face::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::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::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);