]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Undo one change that I committed before: It seems that gcc prior v4.4 cannot use...
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 30 Sep 2009 16:56:24 +0000 (16:56 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 30 Sep 2009 16:56:24 +0000 (16:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@19621 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/constraint_matrix.h
deal.II/lac/source/constraint_matrix.cc

index 393c2fc529eeadef3c3577c4c89849374ef259b6..c98ab653e3f5fac8a19847eb83f72378dc6aa658 100644 (file)
@@ -1308,7 +1308,7 @@ class ConstraintMatrix : public Subscriptor
     add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
                                 SparsityType                    &sparsity_pattern,
                                 const bool                       keep_constrained_entries = true,
-                                const Table<2,bool>             &dof_mask = Table<2,bool>()) const;
+                                const Table<2,bool>             &dof_mask = default_empty_table) const;
 
                                      /**
                                       * This function imports values from a
@@ -1622,6 +1622,13 @@ class ConstraintMatrix : public Subscriptor
                                      */
     static bool check_zero_weight (const std::pair<unsigned int, double> &p);
 
+                                    /**
+                                     * Dummy table that serves as default
+                                     * argument for function
+                                     * <tt>add_entries_local_to_global()</tt>.
+                                     */
+    static const Table<2,bool> default_empty_table;
+
                                     /**
                                      * This function actually implements
                                      * the local_to_global function for
@@ -1734,9 +1741,9 @@ ConstraintMatrix::add_line (const unsigned int line)
                                   // existing entries for cache
   if (line >= lines_cache.size())
     lines_cache.resize (line+1,0);
-                                  // enlarge lines vector if necessary. 
-                                  // need to reset the pointers to the 
-                                  // ConstraintLine entries in that case, 
+                                  // enlarge lines vector if necessary.
+                                  // need to reset the pointers to the
+                                  // ConstraintLine entries in that case,
                                   // since new memory will be allocated
   if (lines.size() == lines.capacity())
     {
index e0bc0c15b69a19bea433f07f43d6195b79750775..6e87a8cca5971bbc3e2c5a7be2894991cf2221a6 100644 (file)
@@ -55,6 +55,11 @@ DEAL_II_NAMESPACE_OPEN
 
 
 
+                                       // Static member variable
+const Table<2,bool> ConstraintMatrix::default_empty_table = Table<2,bool>();
+
+
+
 bool
 ConstraintMatrix::check_zero_weight (const std::pair<unsigned int, double> &p)
 {
@@ -237,7 +242,7 @@ void ConstraintMatrix::close ()
                        ExcMessage ("Cycle in constraints detected!"));
 
                const ConstraintLine * constrained_line = lines_cache[dof_index];
-               Assert (constrained_line->line == dof_index, 
+               Assert (constrained_line->line == dof_index,
                        ExcInternalError());
 
                                                 // now we have to
@@ -465,7 +470,7 @@ void ConstraintMatrix::close ()
                                         // make sure that
                                         // entry->first is not the
                                         // index of a line itself
-       const ConstraintLine * it = entry->first < lines_cache.size() ? 
+       const ConstraintLine * it = entry->first < lines_cache.size() ?
          lines_cache[entry->first] : 0;
        Assert (it == 0,
                ExcDoFConstrainedToConstrainedDoF(line->line, entry->first));

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.