]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also interpolate displacement boundary.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 10 Mar 2011 00:39:14 +0000 (00:39 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 10 Mar 2011 00:39:14 +0000 (00:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@23475 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-46/step-46.cc

index 176fbb7e1e9d66b97eebe14a162cbff148b63dd9..3bce07265343a51252ee40c5d7dda2aa8b5ae0a4 100644 (file)
@@ -220,16 +220,25 @@ void StokesProblem<dim>::setup_dofs ()
 
   {
     constraints.clear ();
-    std::vector<bool> component_mask (dim+1+dim, false);
-    for (unsigned int d=0; d<dim; ++d)
-      component_mask[d] = true;
     DoFTools::make_hanging_node_constraints (dof_handler,
                                             constraints);
+
+    std::vector<bool> velocity_mask (dim+1+dim, false);
+    for (unsigned int d=0; d<dim; ++d)
+      velocity_mask[d] = true;
     VectorTools::interpolate_boundary_values (dof_handler,
                                              1,
                                              BoundaryValues<dim>(),
                                              constraints,
-                                             component_mask);
+                                             velocity_mask);
+    std::vector<bool> elasticity_mask (dim+1+dim, false);
+    for (unsigned int d=dim+1; d<dim+1+dim; ++d)
+      elasticity_mask[d] = true;
+    VectorTools::interpolate_boundary_values (dof_handler,
+                                             0,
+                                             ZeroFunction<dim>(dim+1+dim),
+                                             constraints,
+                                             elasticity_mask);
   }
 
                                   // make sure velocity is zero at

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.