]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Only treat velocity, not pressure components.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 25 Apr 2011 00:23:11 +0000 (00:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 25 Apr 2011 00:23:11 +0000 (00:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@23647 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-46/doc/intro.dox
deal.II/examples/step-46/step-46.cc

index 2d146c1e1c4acfd0dc6e12ac8b4181920cbc593b..1a160ab38849ec199a279ffaaf0ac69c8cf07e20 100644 (file)
@@ -384,7 +384,8 @@ solid cell is refined, yielding the following code:
                {
                  cell->face(f)->get_dof_indices (local_face_dof_indices, 0);
                  for (unsigned int i=0; i<local_face_dof_indices.size(); ++i)
-                   constraints.add_line (local_face_dof_indices[i]);
+                   if (stokes_fe.face_system_to_component_index(i).first < dim)
+                     constraints.add_line (local_face_dof_indices[i]);
                }
            }
 @endcode
@@ -397,7 +398,9 @@ $c_{tl}$ to nonzero values (using ConstraintMatrix::add_entry) or set
 $b_t$ to something nonzero (using
 ConstraintMatrix::set_inhomogeneity); doing nothing as above, funny as
 it looks, simply leaves the constraint to be $x_t=0$, which is exactly
-what we need in the current context.
+what we need in the current context. The call to
+FiniteElement::face_system_to_component_index makes sure that we only set
+boundary values to zero for velocity but not pressure components.
 
 Note that there are cases where this may yield incorrect results:
 notably, once we find a solid neighbor child to a current fluid cell,
index 00b3101bd634d02c8eed7dd0bd2997682355ee0a..bea373cf3a41b6369566cbf95ad27db182c42c17 100644 (file)
@@ -481,7 +481,8 @@ FluidStructureProblem<dim>::setup_dofs ()
                {
                  cell->face(f)->get_dof_indices (local_face_dof_indices, 0);
                  for (unsigned int i=0; i<local_face_dof_indices.size(); ++i)
-                   constraints.add_line (local_face_dof_indices[i]);
+                   if (stokes_fe.face_system_to_component_index(i).first < dim)
+                     constraints.add_line (local_face_dof_indices[i]);
                }
            }
   }

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.