]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Compute correct sparsity pattern. Use proper coupling term. Copy local contribution...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Apr 2011 00:12:15 +0000 (00:12 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Apr 2011 00:12:15 +0000 (00:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@23608 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 363b7cbcfcc21e804b82ca3d97ec8581381cab67..5e093d8e5c705c8efc0088a30b989b34c2620321 100644 (file)
@@ -323,7 +323,7 @@ void FluidStructureProblem<dim>::setup_dofs ()
     CompressedSimpleSparsityPattern csp (dof_handler.n_dofs(),
                                         dof_handler.n_dofs());
 
-    DoFTools::make_sparsity_pattern (dof_handler, csp, constraints, false);
+    DoFTools::make_flux_sparsity_pattern (dof_handler, csp, constraints, false);
     sparsity_pattern.copy_from (csp);
   }
 
@@ -505,16 +505,22 @@ void FluidStructureProblem<dim>::assemble_system ()
 
                      for (unsigned int i=0; i<elasticity_dofs_per_cell; ++i)
                        for (unsigned int j=0; j<stokes_dofs_per_cell; ++j)
-                         local_interface_matrix(i,j) += (2 * viscosity *
-                                                         (stokes_phi_grads_u[j] *
-                                                         normal_vector) *
+                         local_interface_matrix(i,j) += ((2 * viscosity *
+                                                          (stokes_phi_grads_u[j] *
+                                                           normal_vector)
+                                                          +
+                                                          stokes_phi_p[j] *
+                                                          normal_vector) *
                                                          elasticity_phi[i] *
                                                          stokes_fe_face_values.JxW(q));
-                         
-                         
-                         neighbor_dof_indices.resize (elasticity_dofs_per_cell);
-                       cell->neighbor(f)->get_dof_indices (neighbor_dof_indices);
-                     //constraints.distribute_local_to_global();
+
+
+                     neighbor_dof_indices.resize (elasticity_dofs_per_cell);
+                     cell->neighbor(f)->get_dof_indices (neighbor_dof_indices);
+                     constraints.distribute_local_to_global(local_interface_matrix,
+                                                            neighbor_dof_indices,
+                                                            local_dof_indices,
+                                                            system_matrix);
                    }
                }
              else if ((cell->neighbor(f)->level() == cell->level())

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.