From 2bfb98c1099067bd65937cfa23523b54fccd6536 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 19 Apr 2011 00:12:15 +0000 Subject: [PATCH] Compute correct sparsity pattern. Use proper coupling term. Copy local contribution into global matrix. git-svn-id: https://svn.dealii.org/trunk@23608 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-46/step-46.cc | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/deal.II/examples/step-46/step-46.cc b/deal.II/examples/step-46/step-46.cc index 363b7cbcfc..5e093d8e5c 100644 --- a/deal.II/examples/step-46/step-46.cc +++ b/deal.II/examples/step-46/step-46.cc @@ -323,7 +323,7 @@ void FluidStructureProblem::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::assemble_system () for (unsigned int i=0; ineighbor(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()) -- 2.39.5