]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Don't make function static to avoid warnings in 1d and 3d about an unused static...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Jul 2006 23:36:09 +0000 (23:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 28 Jul 2006 23:36:09 +0000 (23:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@13485 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 52ce982be581b677b86996ab5b08918ab1df7d3c..22df466c734270ec21f774348d741cdfd6a1d6b0 100644 (file)
@@ -1560,63 +1560,66 @@ namespace internal
     template <int> class int2type 
     {};
 
-
-    static
-    void
-    filter_constraints (const std::vector<unsigned int> &dofs_mother,
-                       const std::vector<unsigned int> &dofs_child,
-                       const FullMatrix<double> &face_constraints,
-                       ConstraintMatrix &constraints)
+    namespace 
     {
-                                      // This method removes zero constraints
-                                      // and those, which constrain a DoF which
-                                      // was already eliminated in one of the
-                                      // previous steps of the hp hanging node
-                                      // procedure.
-
-      Assert (face_constraints.m () == dofs_mother.size (),
-             ExcDimensionMismatch(dofs_mother.size (),
-                                  face_constraints.n()));
-      Assert (face_constraints.n () == dofs_child.size (),
-             ExcDimensionMismatch(dofs_child.size (),
-                                  face_constraints.m()));
-
-      const unsigned int n_dofs_mother = dofs_mother.size ();
-      const unsigned int n_dofs_child = dofs_child.size ();      
-
-      Assert (n_dofs_mother <= n_dofs_child,
-             ExcInternalError ());
       
-      for (unsigned int col=0; col!=n_dofs_child; ++col) 
-       {
-         bool constrain = true;
+      void
+      filter_constraints (const std::vector<unsigned int> &dofs_mother,
+                         const std::vector<unsigned int> &dofs_child,
+                         const FullMatrix<double> &face_constraints,
+                         ConstraintMatrix &constraints)
+      {
+                                        // This method removes zero constraints
+                                        // and those, which constrain a DoF which
+                                        // was already eliminated in one of the
+                                        // previous steps of the hp hanging node
+                                        // procedure.
+
+       Assert (face_constraints.m () == dofs_mother.size (),
+               ExcDimensionMismatch(dofs_mother.size (),
+                                    face_constraints.n()));
+       Assert (face_constraints.n () == dofs_child.size (),
+               ExcDimensionMismatch(dofs_child.size (),
+                                    face_constraints.m()));
+
+       const unsigned int n_dofs_mother = dofs_mother.size ();
+       const unsigned int n_dofs_child = dofs_child.size ();      
+
+       Assert (n_dofs_mother <= n_dofs_child,
+               ExcInternalError ());
+      
+       for (unsigned int col=0; col!=n_dofs_child; ++col) 
+         {
+           bool constrain = true;
 
-                                          // Check if we have a constraint,
-                                          // which is already satisfied.
-         for (unsigned int i=0; i!=n_dofs_mother; ++i)
-           {
-                                              // Check for a value of almost exactly
-                                              // 1.0
-             if (fabs (face_constraints (i,col) - 1.0) < 1.0e-15)
-               constrain = (dofs_mother[i] != dofs_child[col]);  
-           }
+                                            // Check if we have a constraint,
+                                            // which is already satisfied.
+           for (unsigned int i=0; i!=n_dofs_mother; ++i)
+             {
+                                                // Check for a value of almost exactly
+                                                // 1.0
+               if (fabs (face_constraints (i,col) - 1.0) < 1.0e-15)
+                 constrain = (dofs_mother[i] != dofs_child[col]);  
+             }
 
-                                          // If this constraint is not
-                                          // automatically satisfied by
-                                          // the previous step of removing
-                                          // equivalent DoFs, add this
-                                          // constraint.
-         if (constrain)
-           { 
-             constraints.add_line (dofs_child[col]);
-             for (unsigned int i=0; i!=n_dofs_mother; ++i)
-               constraints.add_entry (dofs_child[col],
-                                      dofs_mother[i],
-                                      face_constraints (i,col));
-           }  
-       }      
-    }
+                                            // If this constraint is not
+                                            // automatically satisfied by
+                                            // the previous step of removing
+                                            // equivalent DoFs, add this
+                                            // constraint.
+           if (constrain)
+             
+               constraints.add_line (dofs_child[col]);
+               for (unsigned int i=0; i!=n_dofs_mother; ++i)
+                 constraints.add_entry (dofs_child[col],
+                                        dofs_mother[i],
+                                        face_constraints (i,col));
+             }  
+         }      
+      }
 
+    }
+    
     
 #if deal_II_dimension == 1
     static

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.