]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
missing couplings in flux_sparsity_pattern added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Jul 2002 14:41:50 +0000 (14:41 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Jul 2002 14:41:50 +0000 (14:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@6244 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_tools.cc

index 2c5542cb9e72d122a3a10c15eaeb5a7cda88fc8a..640d4593c8913b6eae16873ae287f50be4287ddb 100644 (file)
@@ -586,16 +586,63 @@ DoFTools::make_flux_sparsity_pattern (const DoFHandler<dim> &dof,
                            {
                              const bool j_non_zero_i = support_on_face (j, face);
                              const bool j_non_zero_e  =support_on_face (j, neighbor_face);
-                             if (flux_dof_mask(i,j) == 'f'
-                                 || (flux_dof_mask(i,j) == 'a'
-                                      && i_non_zero_i && j_non_zero_e))
-                               sparsity.add (dofs_on_this_cell[i],
-                                             dofs_on_other_cell[j]);
-                             if (flux_dof_mask(j,i) == 'f'
-                                 || (flux_dof_mask(j,i) == 'a'
-                                     && i_non_zero_e && j_non_zero_i))
-                               sparsity.add (dofs_on_other_cell[i],
-                                             dofs_on_this_cell[j]);
+
+                             if (flux_dof_mask(i,j)==0)
+                               flux_dof_mask(i,j) = 'n';
+                         
+                             if (flux_dof_mask(i,j) == 'f')
+                               {
+                                 sparsity.add (dofs_on_this_cell[i],
+                                               dofs_on_other_cell[j]);
+                                 sparsity.add (dofs_on_other_cell[i],
+                                               dofs_on_this_cell[j]);
+                                 sparsity.add (dofs_on_this_cell[i],
+                                               dofs_on_this_cell[j]);
+                                 sparsity.add (dofs_on_other_cell[i],
+                                               dofs_on_other_cell[j]);
+                               }
+                             if (flux_dof_mask(i,j) == 'a')
+                               {
+                                 if (i_non_zero_i && j_non_zero_e)
+                                   sparsity.add (dofs_on_this_cell[i],
+                                                 dofs_on_other_cell[j]);
+                                 if (i_non_zero_e && j_non_zero_i)
+                                   sparsity.add (dofs_on_other_cell[i],
+                                                 dofs_on_this_cell[j]);
+                                 if (i_non_zero_i && j_non_zero_i)
+                                   sparsity.add (dofs_on_this_cell[i],
+                                                 dofs_on_this_cell[j]);
+                                 if (i_non_zero_e && j_non_zero_e)
+                                   sparsity.add (dofs_on_other_cell[i],
+                                                 dofs_on_other_cell[j]);
+                               }
+                             
+                             if (flux_dof_mask(j,i) == 'f')
+                               {
+                                 sparsity.add (dofs_on_this_cell[j],
+                                               dofs_on_other_cell[i]);
+                                 sparsity.add (dofs_on_other_cell[j],
+                                               dofs_on_this_cell[i]);
+                                 sparsity.add (dofs_on_this_cell[j],
+                                               dofs_on_this_cell[i]);
+                                 sparsity.add (dofs_on_other_cell[j],
+                                               dofs_on_other_cell[i]);
+                               }
+                             if (flux_dof_mask(j,i) == 'a')
+                               {
+                                 if (j_non_zero_i && i_non_zero_e)
+                                   sparsity.add (dofs_on_this_cell[j],
+                                                 dofs_on_other_cell[i]);
+                                 if (j_non_zero_e && i_non_zero_i)
+                                   sparsity.add (dofs_on_other_cell[j],
+                                                 dofs_on_this_cell[i]);
+                                 if (j_non_zero_i && i_non_zero_i)
+                                   sparsity.add (dofs_on_this_cell[j],
+                                                 dofs_on_this_cell[i]);
+                                 if (j_non_zero_e && i_non_zero_e)
+                                   sparsity.add (dofs_on_other_cell[j],
+                                                 dofs_on_other_cell[i]); 
+                               }
                            }
                        }
                      sub_neighbor->face(neighbor_face)->set_user_flag ();

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.