From: buerg Date: Mon, 11 Oct 2010 09:05:56 +0000 (+0000) Subject: H(curl)-save application of boundary values for hanging-nodes. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80d042f72cfcb03693132a9d77cd99028e4857fc;p=dealii-svn.git H(curl)-save application of boundary values for hanging-nodes. git-svn-id: https://svn.dealii.org/trunk@22297 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index 54fc7c1213..dc34cb5c06 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -3135,14 +3135,18 @@ project_boundary_values_curl_conforming (const DoFHandler& dof_handler, // Add the computed // constraints to the - // constraint matrix. + // constraint matrix, + // if the degree of + // freedom is not + // already constrained. for (unsigned int dof = 0; dof < dofs_per_face; ++dof) - { - constraints.add_line (face_dof_indices[dof]); - - if (std::abs (dof_values[dof]) > 1e-14) - constraints.set_inhomogeneity (face_dof_indices[dof], dof_values[dof]); - } + if (!(constraints.is_constrained (face_dof_indices[dof]))) + { + constraints.add_line (face_dof_indices[dof]); + + if (std::abs (dof_values[dof]) > 1e-14) + constraints.set_inhomogeneity (face_dof_indices[dof], dof_values[dof]); + } } break; @@ -3280,9 +3284,11 @@ project_boundary_values_curl_conforming (const DoFHandler& dof_handler, } // Add the computed constraints - // to the constraint matrix. + // to the constraint matrix, if + // the degree of freedom is not + // already constrained. for (unsigned int dof = 0; dof < n_dofs; ++dof) - if (projected_dofs[dof] != -1) + if ((projected_dofs[dof] != -1) && !(constraints.is_constrained (dof))) { constraints.add_line (dof); constraints.set_inhomogeneity (dof, computed_constraints[dof]); @@ -3363,12 +3369,13 @@ project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, cell->active_fe_index ()); for (unsigned int dof = 0; dof < dofs_per_face; ++dof) - { - constraints.add_line (face_dof_indices[dof]); - - if (std::abs (dof_values[dof]) > 1e-14) - constraints.set_inhomogeneity (face_dof_indices[dof], dof_values[dof]); - } + if (!(constraints.is_constrained (face_dof_indices[dof]))) + { + constraints.add_line (face_dof_indices[dof]); + + if (std::abs (dof_values[dof]) > 1e-14) + constraints.set_inhomogeneity (face_dof_indices[dof], dof_values[dof]); + } } break; @@ -3474,7 +3481,7 @@ project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, } for (unsigned int dof = 0; dof < n_dofs; ++dof) - if (projected_dofs[dof] != -1) + if ((projected_dofs[dof] != -1) && !(constraints.is_constrained (dof))) { constraints.add_line (dof); constraints.set_inhomogeneity (dof, computed_constraints[dof]); diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 7f332bef92..31c376625c 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -280,6 +280,13 @@ through DoFHandler::get_tria() and DoFHandler::get_fe(), respectively.

deal.II

    +
  1. Fixed: The methods VectorTools::project_boundary_values_curl_conforming + set the boundary values now also H(curl)-conforming, when hanging node + constraints are present. +
    + (Markus Buerg, 2010/10/11) +

  2. +
  3. Changed: The DataPostprocessor functions now take an additional argument that indicates the location of an evaluation point. For backward compatibility, the old function signature still exists so that applications