]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
H(curl)-save application of boundary values for hanging-nodes.
authorbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Oct 2010 09:05:56 +0000 (09:05 +0000)
committerbuerg <buerg@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 11 Oct 2010 09:05:56 +0000 (09:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@22297 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 54fc7c1213091b87e5f7a5beebecfe2a2590a1af..dc34cb5c06c1f9648e2fb68474e5377a9b326012 100644 (file)
@@ -3135,14 +3135,18 @@ project_boundary_values_curl_conforming (const DoFHandler<dim>& 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<dim>& 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<dim>& 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<dim>& 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]);
index 7f332bef92ccfb1429a15eb9c360e7e2d4858609..31c376625cc1f814bb99ded482194a9d073e74bd 100644 (file)
@@ -280,6 +280,13 @@ through DoFHandler::get_tria() and DoFHandler::get_fe(), respectively.
 <h3>deal.II</h3>
 
 <ol>
+  <li><p>Fixed: The methods VectorTools::project_boundary_values_curl_conforming
+  set the boundary values now also H(curl)-conforming, when hanging node
+  constraints are present.
+  <br>
+  (Markus Buerg, 2010/10/11)
+  </p></li>
+
   <li><p>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

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.